Connectors → Microsoft SQL Server (jTDS)

About Microsoft SQL Server

Microsoft SQL Server is a relational database management system (RDMS). The primary function of Microsoft SQL Server, as a database server, is storing and retrieving data requested by other software applications. Similar to other common RDMSs, Microsoft SQL Server uses Transact Structured Query Language (T-SQL) statements to perform tasks such as inserting, updating, deleting, or retrieving data from a database.

Incorta can connect to a Microsoft SQL Server database using either the Microsoft JDBC driver or the jTDS JDBC driver for SQL Server. For more information about connecting to a Microsoft SQL Server database using the Microsoft JDBC driver, see Microsoft SQL Server Connector.

About The Microsoft SQL Server (jTDS) Connector

When Incorta loads data from a SQL database using the SQL Server (jTDS) connector, it uses the jtds-1.3.1.jar driver.

The Microsoft SQL Server (jTDS) connector supports the following Incorta specific functionality:

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

The Microsoft SQL Server (jTDS) Connector supports two types of incremental loads, including support for using a numeric column. To learn more, see Types of Incremental Loads.

Steps to connect Microsoft SQL Server (jTDS) and Incorta

To connect Microsoft SQL Server and Incorta using the jTDS JDBC driver, here are the high-level steps, tools, and procedures:

Create an external data source

Here are the steps to create an external data source with the SQL Server (jTDS) connector:

  1. Sign in to the Incorta Direct Data Platform™.
  2. In the Navigation bar, select Data.
  3. In the Action bar, select + NewAdd Data Source.
  4. In the Choose a Data Source dialog, in Database, select SQL Server (jTDS).
  5. In the New Data Source dialog, specify the applicable connector properties.
  6. To test, select Test Connection.
  7. Select Ok to save your changes.

SQL Server jTDS connector properties

Here are the properties for the SQL Server (jTDS) 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 user password
Connection Pool text box Enter the connection pool. The default is 30.
Connection String text box Enter the connection string for the SQL Server jTDS JDBC driver. The format is:
jdbc:jtds:sqlserver://<HOST>:<PORT>/<DATABASE_NAME>;<PROPERTY>=<VALUE>;<PROPERTY>=<VALUE>
The <HOST> is the host DNS name or IPv4 address. The <PORT> is the TCP port number. The default is 1433. The properties part in the connection string is optional.
Connection Properties text box Optional. Customized string input of key/value pair properties. See below for details on connection properties.
Connection Properties

The connection properties, whether defined in the Connection String or the Connection Properties, allow for customized connection to your SQL Server database. The properties are accepted in a key=value format. The type of connector properties can range from username and password to SSL settings. The jtds-1.3.1.jar driver determines the available connection properties. For a list of connection properties available with Incorta and a SQL Server database through the jTDS JDBC driver, refer to jTDS Frequently Asked Questions.

Important

If the SQL Server uses TLS/SSL encryption, you need to add the following connection property to the data source :

ssl=require

Create a schema with the Schema Wizard

Here are the steps to create a SQL Server (jTDS) schema with the Schema Wizard:

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

    • For Enter a name, enter the schema name.
    • For Select a Datasource, select the SQL Server (jTDS) external data source.
    • Optionally, enter a description.
  • In the Schema Wizard footer, select Next.
  • In (2) Manage Tables, in the Data Panel, first select the name of the Data Source, and then check the Select All checkbox.
  • 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 SQL Server (jTDS) schema using the Schema Designer:

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

SQL Server jTDS table data source properties

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

Property Control Description
Type drop down list Default is SQL Database
Data Source drop down list Select the SQL Server (jTDS) external data source
Incremental toggle Enable the incremental load configuration for the schema table. See Types of Incremental Loads.
Incremental Extract Using drop down list Enable Incremental to configure this property. Select between Last Successful Extract Time and Maximum Value of a Column. See Types of Incremental Loads.
Incremental Column drop down list Enable Incremental and select Maximum Value of a Column to configure this property. Select the column to be used for Maximum Value of a Column. The Loader will track and use the greatest value or most recent timestamp for each load operation.
Fetch Size text box For performance improvement, define 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 SQL database using the jTDS JDBC driver for SQL Server
Update Query text box Enable Incremental to configure this property. Define the SQL update query to use during an incremental load. The query and update query should be of the same structure, that is, the same selected columns.
Incremental Field Type drop down list Enable Incremental to configure this property. Select what the format of the incremental field is: Timestamp, Unix Epoch (seconds), or Unix Epoch (milliseconds).
Callback toggle Enable post extraction callback, that is, enabling callback on the data source data set(s) by invoking a certain callback URL with parameters containing details about the load job
Callback URL text box Enable Callback to configure this property. Specify the callback 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 SQL Server (jTDS) 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 SQL Server (jTDS) 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 SQL Server (jTDS) schema.
  • In the Schema Designer, in the Action bar, select LoadLoad NowFull.
  • To review the load status, in Last Load Status, select the date.

Explore the schema

With the full load of the SQL Server (jTDS) 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 SQL Server (jTDS) schema.
  • In the Schema Designer, in the Action bar, select Explore Data.

For more information about how to use the Analyzer to create insights, see Analyzer and Visualizations.

Additional Considerations

Types of Incremental Loads

You can enable Incremental Load for a SQL Server (jTDS) data source. There are two types of incremental extracts:

Last Successful Extract Time

Fetch updates since the last time the tables were loaded. It is determined by the difference between the current time and the database timestamp.

Maximum Value of a Column

The column-based strategy depends on an extra column called Incremental Column in each table. The SQL Server (jTDS) connector supports both timestamp and numeric columns. A timestamp column is of the type date or timestamp. A numeric column is of the type int or long.

Note

Changing the incremental load strategy requires a full load to ensure data integrity.

Incremental Load Example

In this example, the invoices table must contain a column of the type Date or Timestamp in order to load the table incrementally with a last successful extract time strategy. In this case, the name of the date column is ModifiedDate and the format of the column is Timestamp.

Here are the data source property values for this example:

Incremental is enabled

Query contains SELECT * FROM invoices

Update Query contains SELECT * FROM invoices WHERE ModifiedDate > ?

Note

? is a variable in the update query that contains the last schema refresh date.

Incremental Field Type = Timestamp

Note

If running an update query for an incremental load, you are able to use the ? reference character. The ? character will be replaced with the last incremental reference to construct a valid query to the database. The ? reference character is not valid in a standard query.

Valid Query Types

When creating a query for the SQL Server (jTDS) connector, only SELECT statements are valid.

Known Issues

If you are using Java 8 or OpenJDK 8 and you try to connect to a SQL Server that has SSL/TLS certificate installed, it will throw errors. Use Microsoft SQL Server connector instead.


© Incorta, Inc. All Rights Reserved.