Connectors → Custom SQL

About the Custom SQL Connector

The Custom SQL Connector enables Incorta to access data stored in any SQL database. It is recommended that this connector be used when a dedicated Incorta database connector does not already exist. You can access the data you want with a standard SQL query.

The Custom SQL connector supports the following Incorta specific functionality:

Feature Supported
Incremental Loading
Encryption at Ingest
Performance Optimization
Webhook Callbacks
Load Filter

Deployment Steps

To use the Custom SQL Connector, a System Administrator with root access will need to copy the JDBC driver JAR file of the database to each Incorta Node in an Incorta cluster. A CMC Administrator will need to restart the Analytics and Loader Services in the cluster.

Deployment to an Incorta Node

Here are the steps to deploy the JDBC driver JAR file to the extensions directory of an Incorta Node that is running the Analytics and/or Loader Services in an Incorta cluster.

  • Download the JDBC driver JAR file from the database vendor.

    As the root user for the hosts running Incorta Nodes, use Secure Copy for shell or similar to copy the JDBC driver JAR file to the /tmp directory of the hosts.

    PATH_JAR_FILE='~/Downloads/<JDBC_JAR_FILENAME>
    INCORTA_NODE_HOST_IPv4_LIST='1.1.1.1  2.2.2.2  3.3.3.3  4.4.4.4'
    PATH_PEM_KEY_FILE='~/.ssh/incorta_2020.pem'
    HOST_ROOT_USER='ec2-user'
    for i in ${INCORTA_NODE_HOST_IPv4_LIST}
    do
    echo $i
    scp -o StrictHostKeyChecking=no -i ${PATH_PEM_KEY_FILE} ${PATH_JAR_FILE} ${HOST_ROOT_USER}@${i}:/tmp/${PATH_JAR_FILE}
    wait
    done
  • Secure shell into each Incorta Node, and if needed, change the ownership of the file to that of the incorta user.

    sudo su incorta
    sudo chown incorta:incorta /tmp/<JDBC_JAR_FILENAME>
  • For each Incorta Node, as the incorta user, move the JDBC driver JAR file from the /tmp directory to the /lib directory.

    mv /tmp/<JDBC_JAR_FILENAME> ${INCORTA_NODE_INSTALLATION_PATH}/runtime/lib
Restart the Analytics and Loader Services

Here are the steps to restart the Analytics and Loader Services in an Incorta Cluster from the Cluster Management Console (CMC).

  • As the CMC Administrator, sign in to the CMC.
  • In the Navigation bar, select Clusters.
  • In the cluster list, select a Cluster name.
  • Select the Details tab, if not already selected.
  • In the footer, select Restart.

Steps to connect a Custom SQL Database and Incorta

To connect a Custom SQL Database and Incorta, here are the high level steps, tools, and procedures:

Create an external data source

Here are the steps to create a external data source with the Custom SQL connector:

  • Sign in to the Incorta Direct Data Platform™.
  • In the Navigation bar, select Data.
  • In the Action bar, select + NewAdd Data Source.
  • In the Choose a Data Source dialog, in Custom, select Custom SQL.
  • In the New Data Source dialog, specify the applicable connector properties.
  • To test, select Test Connection.
  • Select Ok to save your changes.

Custom SQL connector properties

Here are the properties for the Custom SQL connector:

Property Control Description
Data Source Name text box Enter the name of the data source
Username text box Enter the database username
Password text box Enter the database password
Connection Pool text box Enter the connection pool. The default is 30.
Driver Class text box Enter the driver class for the database. For example, the Informix driver class is com.informix.jdbc.IfxDriver.
Connection String text box Enter the database connection string. For example, the Informix database connection string is: jdbc:informix-sqli://<host>:
<port>/<database>:informixserver=
<dbservername>
Connection Properties text box Optionally enter connector properties for a custom connection to the database in the format: propertyName=propertyValue, where each connector property is on a new line.

The available connector properties are specified by the database JDBC driver.

Create a schema with the Schema Wizard

Here are the steps to create a Custom SQL schema with the Schema Wizard:

  • Sign in to the Incorta Direct Data Platform™.
  • In the Navigation bar, select Schema.
  • In the Action bar, select + New → Schema Wizard
  • In (1) Choose a Source, specify the following:

    • For Enter a name, enter the schema name.
    • For Select a Datasource, select the Custom SQL external data source.
    • Optionally create a description.
  • In the Schema Wizard footer, select Next.
  • In (2) Manage Tables, in the Data Panel, navigate the directory tree as necessary to select the Custom SQL tables. You can either check the Select All checkbox or select individual sheets.
  • In the Schema Wizard footer, select Next.
  • In (3) Finalize, in the Schema Wizard footer, select Create Schema.

Create a schema with the Schema Designer

Here are the steps to create a custom SQL schema using the Schema Designer:

  • Sign in to the Incorta Direct Data Platform™.
  • In the Navigation bar, select Schema.
  • In the Action bar, select + New → Create Schema.
  • In Name, specify the schema name, and select Save.
  • In Start adding tables to your schema, select SQL Database.
  • In the Data Source dialog, specify the Custom SQL table data source properties.
  • Select Add.
  • In the Table Editor, in the Table Summary section, enter the table name.
  • To save your changes, select Done in the Action bar.

Custom SQL table data source properties

For a schema table in Incorta, you can define the following Custom SQL specific data source properties as follows:

Property Control Description
Type drop down list Default is SQL Database
Data Source drop down list Select the Custom SQL external data source
Incremental toggle Enable the incremental load configuration for the schema table
Fetch Size text box Used for performance improvement, fetch size defines the number of records that will be retrieved from the database in each batch until all records are retrieved. The default is 5000.
Query text box Enter the SQL query to retrieve data from the Custom SQL database table
Update Query text box Enable Incremental to configure this property. Enter the SQL query to retrieve data updates from the Custom SQL database table.
Incremental Field Type drop down list Enable Incremental to configure this property. Select the format of the table date column:
  • Timestamp
  • Unix Epoch (seconds)
  • Unix Epoch (milliseconds)
  • Enable Spark Based Extraction toggle Enable a Spark job to parallelize the data ingest
    Max Number of Parallel Queries text box Enable Spark Based Extraction to configure this property. Enter the maximum number of parallel queries to run at a time
    Column to Parallelize Queries on drop down list Enable Spark Based Extraction to configure this property. Select a numerical column in the source table that you want Spark to parallelize the extraction queries on.
    Memory per Extractor text box Enable Spark Based Extraction to configure this property. Enter the numerical amount of memory to use per extractor in gigabytes (GB).
    Callback toggle Enable this option to call back on the source data set
    Callback URL text box Enable Callback to configure this property. Specify the URL.

    View the schema diagram with the Schema Diagram Viewer

    Here are the steps to view the schema diagram using the Schema Diagram Viewer:

    • Sign in to the Incorta Direct Data Platform™.
    • In the Navigation bar, select Schema.
    • In the list of schemas, select the Custom SQL schema.
    • In the Schema Designer, in the Action bar, select Diagram.

    Load the schema

    Here are the steps to perform a Full Load of the Custom SQL schema using the Schema Designer:

    • Sign in to the Incorta Direct Data Platform™.
    • In the Navigation bar, select Schema.
    • In the list of schemas, select the Custom SQL schema.
    • In the Schema Designer, in the Action bar, select Load → Load Now → Full.
    • To review the load status, in Last Load Status, select the date.

    Explore the schema

    With the full load of the Custom SQL schema complete, you can use the Analyzer to explore the schema, create your first insight, and save the insight to a new dashboard.

    To open the Analyzer from the schema, follow these steps:

    • In the Navigation bar, select Schema.
    • In the Schema Manager, in the List view, select the Custom SQL schema.
    • In the Schema Designer, in the Action bar, select Explore Data.

    © Incorta, Inc. All Rights Reserved.