This data destination connector sends data to a Microsoft SQL Server database.
Create a new configuration of the SQL Server data destination connector.
The first step is to Set Up Database Credentials. You need to provide a host name, user name, password, database name, and SQL Server version; optionally, an instance name if needed for the connection.
We highly recommend that you create a dedicated credentials for the connector in your database. You can use the following SQL code to get started:
It is also possible to secure the connection using an SSH tunnel.
The next step is to configure the tables to write. Click the Add new table button and select an existing table from Storage:
The next step is to specify table configuration. Use the preview icon to peek at the column contents.
For each column you can specify its
IGNORE
means that column will not be present in the destination table.''
) in that column will be converted to NULL
. Use this for non-string columns with missing data.When done configuring the columns, don’t forget to save the settings.
At the top of the page, you can specify the target table name and additional load options. There are two main options how the data destination connector can write data to tables — Full Load and Incremental Load.
In the Incremental Load mode, the data are bulk inserted into the destination table and the table structure must match (including the data types). That means the structure of the target table will not be modified. If the target table doesn’t exist, it will be created. If a primary key is defined on the table, the data is upserted. If no primary key is defined, the data is inserted.
In the Full Load mode, the table is completely overwritten including the table structure. The table is removed
using the DROP
command and recreated. The
DROP
command needs to acquire a table-level lock.
This means that if the database is used by other applications which acquire table-level locks, the connector may
freeze waiting for the locks to be released.
Additionally, you can specify a Primary key of the table, a simple column Data filter, and a filter for incremental processing.
For binary types binary
, varbinary
, image
, the following rules apply:
0x
and length of the value is even number, then it is a HEX value according to the MsSQL specification (style 1).
"0xabcdef"
is converted to binary value 0xabcdef
.\0
after each char code, when storing string as the binary type.
"0xabcde"
is converted to binary value 0\0x\0a\0b\0c\0d\0e
."dog"
is converted to binary value d\0o\0g\0
.