Skip to content

Commit 336a2a4

Browse files
20251119 COPY INTO
1 parent 2a20a5d commit 336a2a4

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

docs/t-sql/statements/copy-into-transact-sql.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Use the COPY statement in Azure Synapse Analytics and Warehouse in
55
author: WilliamDAssafMSFT
66
ms.author: wiassaf
77
ms.reviewer: procha, mikeray, fresantos, jovanpop
8-
ms.date: 11/10/2025
8+
ms.date: 11/19/2025
99
ms.service: sql
1010
ms.subservice: t-sql
1111
ms.topic: reference
@@ -559,9 +559,6 @@ For more information on using `COPY INTO` on your [!INCLUDE [fabricdw](../../inc
559559

560560
By default, `COPY INTO` authenticates as the executing Entra ID user.
561561

562-
> [!NOTE]
563-
> For [!INCLUDE[ssazuresynapse_md](../../includes/ssazuresynapse-md.md)], visit [COPY INTO for [!INCLUDE [ssazuresynapse_md](../../includes/ssazuresynapse-md.md)]](copy-into-transact-sql.md?view=azure-sqldw-latest&preserve-view=true).
564-
565562
Use `COPY` for the following capabilities:
566563

567564
- Use lower privileged users to load without needing strict CONTROL permissions on the data warehouse.
@@ -622,8 +619,8 @@ An optional list of one or more columns used to map source data fields to target
622619
[(Column_name [default Default_value] [Field_number] [,...n])]
623620

624621
- *Column_name* - the name of the column in the target table.
625-
- *Default_value* - the default value that replaces any `NULL` value in the input file. Default value applies to all file formats. `COPY` attempts to load `NULL` from the input file when a column is omitted from the column list or when there's an empty input file field. Default value is preceded by the keyword 'default'.
626-
- *Field_number* - The input file field number that is mapped to the target column.
622+
- *Default_value* - the default value that replaces any `NULL` value in the input file. Default value applies to all file formats. `COPY` attempts to load `NULL` from the input file when a column is omitted from the column list or when there's an empty input file field. Default value is preceded by the keyword 'default'
623+
- *Field_number* - The input file field number that is mapped to the target column.
627624
- The field indexing starts at 1.
628625

629626
When *column_list* isn't specified, `COPY` maps columns based on the source and target order: Input field 1 goes to target column 1, field 2 goes to column 2, etc.
@@ -855,6 +852,10 @@ When using OneLake as the source, the user must have **Contributor** or higher p
855852

856853
The `COPY` statement accepts only UTF-8 and UTF-16 valid characters for row data and command parameters. Source files or parameters (such as `ROW TERMINATOR` or `FIELD TERMINATOR`) that use invalid characters might be interpreted incorrectly by the `COPY` statement and cause unexpected results such as data corruption, or other failures. Make sure your source files and parameters are UTF-8 or UTF-16 compliant before you invoke the `COPY` statement.
857854

855+
The `COPY INTO` statement has restrictions on the size of individual **varchar(max)** and **varbinary(max)** columns, as well as on the total row size that can be ingested.
856+
- Parquet: maximum **varchar(max)**/**varbinary(max)** column size 16MB, max row size 1GB.
857+
- CSV: maximum **varchar(max)**/**varbinary(max)** column size 1MB, max row size 16MB.
858+
858859
To ensure reliable execution, the source files and folders must remain unchanged throughout the duration of the `COPY INTO` operation.
859860
- Modifying, deleting, or replacing any referenced files or folders while the command is running can cause the operation to fail or result in inconsistent data ingestion.
860861
- Before executing `COPY INTO`, verify that all source data is stable and will not be altered during the process.
@@ -898,8 +899,8 @@ The default values of the `COPY` command are:
898899

899900
- `ROWTERMINATOR = '\n'`
900901

901-
> [!IMPORTANT]
902-
> `COPY` treats `\n` as `\r\n` internally. For more information, see the `ROWTERMINATOR` section.
902+
> [!IMPORTANT]
903+
> `COPY` treats `\n` as `\r\n` internally. For more information, see the `ROWTERMINATOR` section.
903904
904905
- `FIRSTROW = 1`
905906

0 commit comments

Comments
 (0)