For onboarding data from a SQL Server source, see Onboarding a RDBMS Source. Ensure that the Source Type selected is SQL Server.
Field | Description |
---|---|
Fetch Data Using | The mechanism through which Infoworks fetches data from the database. |
Connection URL | The connection URL through which Infoworks connects to the database. The URL must be in the following format: jdbc:sqlserver://<ip>/TMODE=<tmode>,database=<databasename> |
Username | The username for the connection to the database. |
Authentication Type for Password | Select the authentication type from the dropdown. For example, Infoworks Managed or External Secret Store. If you select Infoworks Managed, then provide Authentication Password for Password. If you select External Secret Store, then select the Secret which contains the password. |
Source Schema | The schema in the database to be crawled. The schema value is case sensitive. |
Custom Tags | This dropdown provides the list of tags which you can choose. It can be used to identify/segregate the source based on the selected tags. |
Once the settings are saved, you can test the connection.
Add the catalog name in the Connection URL string. For example, to connect to the test_sql_pool_catalog
, the following string can be used: jdbc:sqlserver://<ip>/TMODE=<tmode>;database=test_sql_pool
And Use the same in the Catalog filter:
With the source metadata in the catalog, you can now configure the table for CDC and incremental synchronization.
Field | Description |
---|---|
Ingestion Configuration | |
Query | The custom query based on which the table has been created. |
Ingest Type | The type of synchronization for the table. The options include full refresh and incremental. |
Natural Keys | The combination of keys to uniquely identify the row. This field is mandatory in incremental ingestion tables. It helps in identifying and merging incremental data with the already existing data on target. |
Incremental Mode | The option to indicate if the incremental data must be appended or merged to the base table. This field is displayed only for incremental ingestion. The options include append, merge and insert overwrite. |
Incremental Fetch Mechanism | The fetch mechanism options include Archive Log and Watermark Column. This field is available only for Oracle log-based ingestion. |
Watermark Column | Select single/multiple watermark columns to identify the incremental records. The selected watermark column(s) should be of the same datatype. |
Enable Watermark Offset | For Timestamp and Date watermark columns, this option enables an additional offset (decrement) to the starting point for ingested data. Records created or modified within the offset time period are included in the next incremental ingestion job. |
Ingest subset of data | The option to configure filter conditions to ingest a subset of data. For more details, see Filter Query for RDBMS Sources |
Sorting Columns | Select columns on which the target table will be sorted. |
Target Configuration | |
Target Table Name | The name of the target table. The name cannot contain special characters except underscore. |
Database Name | The name of the target database. |
Catalog Name | The name of the target catalog. |
Staging Catalog Name | The staging catalog name for temp tables. |
Staging Schema Name | The staging schema name for temp tables. |
Schema Name | The name of the target schema. The name cannot contain special characters except underscore. |
Merged Table Name | The name of the merged table. This table is created only in case of Merge mode. This table has the de-duplicated data. |
Table Name | The name of the target table maintained in Infoworks UI. |
Storage Format | The format in which the tables must be stored. The options include Read Optimized (Delta), Write Optimized (Avro) and Universal Format (UniForm). |
Partition Column | The column used to partition the data in target. Selecting the Create Derived Column option allows you to derive a column and then use that as the partition column. This option is enabled only if the partition column datatype is date or timestamp. Provide the Derived Column Function and Derived Column Name. Data will be partitioned based on this derived column. |
Optimization Configuration | |
Split By Column | The column used to crawl the table in parallel with multiple connections to database. Split-by column can be an existing column in the data. Any column for which minimum and maximum values can be computed, can be a split-by key. Select the Create Derived Split Column option and provide the Derived Split Column Function to derive a column from the split-by column. This option is enabled only if the split-by column datatype is date or timestamp. The data will be split based on the derived value. |
Generate History View | The option to preserve data in the history table. If enabled, after each CDC, the data will be appended to the history table. |
Through MSSQL Server Log Based method, data is ingested and continuously synchronised with the database using captured CDC tables provided by MSSQL Server. But this method works only with the enterprise editions of MSSQL Server. In this method, change data capture must be enabled for the incremental tables. Before enabling for a table, it must be enabled for the schema in which the table is present.
Infoworks uses SQL Server transactional replication to capture change data from SQL server distribution databases. For CDC to work, you must enable SQL Server Replication on the system from which change data is to be captured. If the database has a high volume of change activity, a distributed server must be used as the host of the distribution database.
To configure CDC in Infoworks, you must define a capture registration for each source table. In the capture registration, you can select a subset of columns for which the data is to be captured.
Logs in MSSQL server is enabled using the CDC program of the SQL Server. This program is bundled with Enterprise, Developer, and Evaluation editions of MSSQL Server installations. Once logs are enabled for a table, the corresponding table changes will be stored in a capture table instance in a default database called CDC. The capture table name can be the same as source table name or user can configure this while enabling logging for the table.
Following is a two-step process {[1,2] or [1,3]} to enable logging. In these scripts, to execute the commands, we assume that there is a database called automation_db and a table timestamps_inserts_updates in that database.
xxxxxxxxxx
use automation_db;
EXEC sys.sp_cdc_enable_db;
NOTE:If you do not specify the name of the capture instance, the capture instance name will be same as source table name in the CDC schema.
xxxxxxxxxx
EXEC sys.sp_cdc_enable_table
@source_schema = N'automation_db',
@source_name = N'timestamp_inserts_updates',
@role_name = N'NULL'
GO
NOTE: If you specify the name of the capture instance while enabling logging for the table, the source table name is timestamp_inserts_updates logging the CDC table name as name_of_capture_instance.
xxxxxxxxxx
EXEC sys.sp_cdc_enable_table
@source_schema = N'automation_db',
@source_name = N'timestamp_inserts_updates',
@role_name = N'NULL',
@capture_instance = N'name_of_capture_instance'
GO
xxxxxxxxxx
select * from cdc.change_tables;
Below figure shows the sample output of the CDC-enabled tables:
Following are the steps to perform incremental ingestion from SQL Server replication table:
Following are the steps to set advanced configuration for a table:
Using this option, you can configure the Target connections and sync data as described in the section Synchronizing Data to External Target
The following are the steps to sync data to target.
Field | Description |
---|---|
Job Name | The name of the ingestion job. |
Max Parallel Tables | The maximum number of tables that can be crawled at a given instance. |
Compute Cluster | The template based on which the cluster will spin up for each table.The compute clusters created by admin and are accessible by the user are listed in the drop down. |
Overwrite Worker Count | The option to override the maximum and minimum number of worker node values as configured in the compute template |
Number of Worker Nodes | The number of worker nodes that will spin up in the cluster. |
Save as a Table Group | The option to save the list of tables as a table group. |
Click Onboarding a RDBMS Source to navigate back to complete the onboarding process.