Table of Contents

Search

  1. Preface
  2. Introduction to Microsoft Azure Synapse SQL Connector
  3. Connections for Microsoft Azure Synapse SQL
  4. Mappings for Microsoft Azure Synapse SQL
  5. Upgrading to Microsoft Azure Synapse SQL Connector
  6. Migrating a mapping
  7. SQL ELT optimization
  8. Data type reference
  9. Troubleshooting

Microsoft Azure Synapse SQL Connector

Microsoft Azure Synapse SQL Connector

Copy command

Copy command

You can use the copy command to load data from Microsoft Azure Blob Storage or Microsoft Azure Data Lake Storage Gen2 to Microsoft Azure Synapse SQL.
When you stage files in Microsoft Azure Data Lake Storage Gen2, you can use the copy command only with Service Principal Authentication.
You can specify the options for the copy command in key=value format in the Copy Command Options field. Specify each option in a new line.
The following image shows an example of the copy command options:
The image shows an example of the copy command options:
You can configure only the following copy command options in the advanced target properties. The default value is considered for other copy command options supported by Microsoft Azure.
ERRORFILE
Specifies the directory where you want to write rejected rows and the corresponding error file. The ERRORFILE option is equivalent to the Reject Directory advanced target property.
Use the following format:
ERRORFILE=<Directory Location>
.
You can specify the absolute path or relative path for the directory. The error file path must not contain special characters.
If you specify an absolute path, for example,
Dir1/Dir2
, the agent creates the reject directory in the following path:
Dir1/Dir2
If you specify a relative path, for example,
/Dir1/Dir2
, the agent creates the reject directory in the following path:
<staging path>/Dir1/Dir2
If you do not specify the directory, the agent creates the reject directory in the following path:
<staging path>/Reject_<UUID Randomly Generated>
MAXERRORS
Specifies the maximum number of reject rows allowed in the load before the copy command is canceled. Each row that cannot be imported by the copy command is ignored and counted as one error. The MAXERRORS option is equivalent to the Reject Threshold advanced target property.
Use the following format:
MAXERRORS=max_errors
. For example,
MAXERRORS=20
.
COMPRESSION
Specifies the data compression method for the data. You can use only Gzip compression for CSV files.
The COMPRESSION option is equivalent to the Compression Format advanced target property.
Use the following format:
COMPRESSION='method'
. For example,
COMPRESSION='GZIP'
.
FIELDQUOTE
Specifies a single character that is used as the quote character in the CSV file.
The FIELDQUOTE option is equivalent to the Quote Character advanced target property.
Use the following format:
FIELDQUOTE='field_quote'
.
FIELDTERMINATOR
Specifies the field terminator that is used in the CSV file.
The FIELDTERMINATOR option is equivalent to the Field Delimiter advanced target property.
Use the following format:
FIELDTERMINATOR='field_terminator'
. For example,
FIELDTERMINATOR='ox1f'
.
For more details about the copy command options, see the Microsoft Azure documentation.

0 COMMENTS

We’d like to hear from you!