Data Destination - SQL Server
- 07 Dec 2022
- Print
- DarkLight
- PDF
Data Destination - SQL Server
- Updated on 07 Dec 2022
- Print
- DarkLight
- PDF
Article Summary
Share feedback
Thanks for sharing your feedback!
This is a machine-translated version of the original Japanese article.
Please understand that some of the information contained on this page may be inaccurate.
summary
This page is a help page for setting up data transfer to SQLServer.
Supported Protocols
- Data Transfer (Embulk)
Using embulk-output-sqlserver
constraint
- Nothing in particular
Setting items
STEP1 Basic settings
Item | namerequireddefault | valuecontent | |
---|---|---|---|
SQL Server connection information | Yes | - | From the connection information registered in advance, select the one that has the necessary permissions for this transfer setting. |
Database name | Yes | - | Specify the name of the database to which you want to transfer. |
schema | No | - | Specify the destination schema name. |
table | Yes | - | Specify the name of the destination table Custom variables can also be used to dynamically determine the setting value during trocco data transfer. |
Transfer Mode | Yes | insert | Select the appropriate transfer mode: insert, insert_direct, truncate_insert, replace, or merge. For details on modes, please refer to About Transfer Modes below. |
Merge Key | No | - | When the transfer mode is merge and the primary key does not exist in the destination table, specify the key column name of the data to be transferred. |
About Transfer Modes
Mode Name | Content |
---|---|
insert | First, create an intermediate table and transfer the data. Once all intermediate tables have been created, insert data into the target tables. If the target table does not exist, it is created automatically. |
insert_direct | Inserts rows directly into the target table. If the target table does not exist, it is created automatically. However, when the transfer fails, data may have been inserted into the target table. |
truncate_insert | In insert mode, all contents of the target table are deleted before data is inserted into the target table. |
replace | First, create an intermediate table and transfer the data. When the intermediate table creation is complete, delete the target table and change the intermediate table to the target table name. However, if the transfer fails, the target table may be dropped. |
merge | First, create an intermediate table and transfer the data. Once all intermediate tables have been created, the merge key for the intermediate table data will be updated if it already exists in the target table, otherwise the insert will be processed. If the target table does not exist, it is created automatically. |
STEP2 Advanced settings
Item name | default | value content |
---|---|---|
Maximum number of retries | 12 | You can specify the maximum number of retries. |
Retry latency (ms) | 1000 | You can specify the amount of time to wait when retrying. |
Maximum retry wait time (ms) | 1800000 | You can specify the maximum amount of time to wait during retry. |
Batch | 16777216 | You can specify the batch size. |
Default time zone | UTC | You can specify a default time zone. |
Connection Timeout (seconds) | 300 | You can specify the timeout in seconds before the driver connects. If it is set to 0, it will be 15 seconds, which is the default for SQL Server. |
Socket Timeout (seconds) | 1800 | You can specify the timeout in seconds before the query runs. If it is set to 0, there is no timeout. |
Was this article helpful?