Azure SQL - Bulk Load
In this article
Overview
You can use this Snap to perform a bulk load operation from the input view document stream to the target table by using SQLServerBulkCopy API. It uses a memory buffer to send records to the target table instead of a temporary CSV file. The Batch size and Bulk copy timeout values can be used to tune the performance and memory used.
This Snap supports a dot (.) as a separator for milliseconds in date and time formats, which helps in handling date and time data types and functions when working with SQL Server (Transact-SQL). Learn more: Date and Time Data Types and Functions - SQL Server (Transact-SQL)
Snap Type
The Azure SQL Bulk Load Snap is a Write-type Snap that performs a bulk load operation.
Prerequisites
The Azure SQL database account requires the SQL Server JDBC driver. Version 4.1 and older do not support the SQLServerBulkCopy API.
Support for Ultra Pipelines
Does not support Ultra Pipelines.
Limitation
Microsoft does not support the DateTime data type when writing to Azure Data Warehouse. As a workaround, change the data type from DateTime to varchar when writing to Azure Data Warehouse. Note that if the table does not exist in the database, enabling the Create table if not present property automatically converts all DateTime fields to varchar fields. For more information on this known issue, see Known Limitations for the batch insert operation.
You cannot modify certain columns in Azure SQL because they might either be computed columns or the result of a UNION operator, such as "InventoryValue."
The Azure Bulk Load Snap supports the
money
andsmallmoney
data types only within the following specific ranges:
Data Type | Range |
---|---|
| -922,337,203,685,477.5808 to 922,337,203,685,477.5807 |
| -214,748.3648 to 214,748.3647 |
When you insert a value beyond the specific range, the Snap does not fail but inserts incorrect values. For instance, see the table below for the incorrect inserted values against the specific value:
Data Type | When you update | Bulk Load is updated to |
| -214758.3648 | -214738.3649 |
| 922337203685487.5808 | 922337203685467.5808 |
| 214758.3647 | 214738.3648 |
| 922337203685487.5807 | -922337203685467.5809 |
This issue is caused by MSSQL-JDBC dependency from Microsoft®, that converts small-money/money values to int/long values. SnapLogic® has reported a bug in Microsoft®MSSQL-JDBC GitHub repository. You can track the issue here.
Snap Views
Type | Format | Number of Views | Examples of Upstream and Downstream Snaps | Description |
---|---|---|---|---|
Input | Document
|
| Mapper |
|
Output | Document |
| JSON Formatter |
|