Skip to content

Commit 37f4dcb

Browse files
20250728 refresh, update for Fabric
1 parent 49eeaa8 commit 37f4dcb

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

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

Lines changed: 15 additions & 13 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
8-
ms.date: 06/29/2025
8+
ms.date: 07/28/2025
99
ms.service: sql
1010
ms.subservice: t-sql
1111
ms.topic: reference
@@ -85,7 +85,7 @@ WITH
8585

8686
#### *schema_name*
8787

88-
Optional if the default schema for the user performing the operation is the schema of the specified table. If *schema* isn't specified, and the default schema of the user performing the COPY operation is different from the schema of the specified table, COPY is canceled, and an error message is returned.
88+
Optional if the default schema for the user performing the operation is the schema of the specified table. If *schema* isn't specified, and the default schema of the user performing the COPY operation is different from the schema of the specified table, then the COPY operation is canceled and an error message is returned.
8989

9090
#### *table_name*
9191

@@ -116,7 +116,7 @@ Is where the files containing the data is staged. Currently Azure Data Lake Stor
116116
- *External location* for ADLS Gen2: `https://<account\>.dfs.core.windows.net/<container\>/<path\>`
117117

118118
> [!NOTE]
119-
> The .blob endpoint is available for ADLS Gen2 as well and currently yields the best performance. Use the .blob endpoint when .dfs is not required for your authentication method.
119+
> The `.blob` endpoint is available for ADLS Gen2 as well and currently yields the best performance. Use the `.blob` endpoint when `.dfs` is not required for your authentication method.
120120
121121
- *Account* - The storage account name
122122

@@ -128,7 +128,7 @@ Wildcards cards can be included in the path where
128128

129129
- Wildcard path name matching is case-sensitive
130130
- Wildcard can be escaped using the backslash character (`\`)
131-
- Wildcard expansion is applied recursively. For instance, all CSV files under Customer1 (including subdirectories of Customer1) are loaded in the following example: `Account/Container/Customer1/*.csv`
131+
- Wildcard expansion is applied recursively. For instance, all CSV files under `Customer1` (including subdirectories of `Customer1`) are loaded in the following example: `Account/Container/Customer1/*.csv`
132132

133133
> [!NOTE]
134134
> For best performance, avoid specifying wildcards that would expand over a larger number of files. If possible, list multiple file locations instead of specifying wildcards.
@@ -260,9 +260,9 @@ When *FILE_TYPE* is 'PARQUET', exceptions that are caused by data type conversio
260260

261261
The COPY command autodetects the compression type based on the file extension when this parameter isn't specified:
262262

263-
- .gz - **GZIP**
264-
- .snappy **Snappy**
265-
- .deflate - **DefaultCodec** (Parquet and ORC only)
263+
- `.gz` - **GZIP**
264+
- `.snappy` - **Snappy**
265+
- `.deflate` - **DefaultCodec** (Parquet and ORC only)
266266

267267
The COPY command requires that gzip files do not contain any trailing garbage to operate normally. The gzip format strictly requires that files be composed of valid members without any additional information before, between, or after them. Any deviation from this format, such as the presence of trailing non-gzip data, will result in the failure of the COPY command. Make sure to verify there's no trailing garbage at the end of gzip files to ensure COPY can successfully process these files.
268268

@@ -299,7 +299,7 @@ DATEFORMAT only applies to CSV and specifies the date format of the date mapping
299299

300300
#### *IDENTITY_INSERT = 'ON' | 'OFF'*
301301

302-
IDENTITY_INSERT specifies whether the identity value or values in the imported data file are to be used for the identity column. If IDENTITY_INSERT is OFF (default), the identity values for this column are verified, but not imported. Azure Synapse Analytics automatically assigns unique values based on the seed and increment values specified during table creation. Note the following behavior with the COPY command:
302+
IDENTITY_INSERT specifies whether the identity value or values in the imported data file are to be used for the identity column. If IDENTITY_INSERT is OFF (default), the identity values for this column are verified, but not imported. Note the following behavior with the COPY command:
303303

304304
- If IDENTITY_INSERT is OFF, and table has an identity column
305305
- A column list must be specified which doesn't map an input field to the identity column.
@@ -308,6 +308,8 @@ IDENTITY_INSERT specifies whether the identity value or values in the imported d
308308
- Default value isn't supported for the IDENTITY COLUMN in the column list.
309309
- IDENTITY_INSERT can only be set for one table at a time.
310310

311+
Azure Synapse Analytics automatically assigns unique values based on the seed and increment values specified during table creation.
312+
311313
#### *AUTO_CREATE_TABLE = { 'ON' | 'OFF' }*
312314

313315
*AUTO_CREATE_TABLE* specifies if the table could be automatically created by working alongside with automatic schema discovery. It's available only for Parquet files.
@@ -318,9 +320,9 @@ IDENTITY_INSERT specifies whether the identity value or values in the imported d
318320
> [!NOTE]
319321
> The automatic table creation works alongside with automatic schema discovery. The automatic table creation is NOT enabled by default.
320322
321-
Don't load into hash distributed tables from Parquet files using COPY INTO with AUTO_CREATE_TABLE = 'ON'.
323+
Don't load into hash distributed tables from Parquet files using `COPY INTO` with `AUTO_CREATE_TABLE = 'ON'`.
322324

323-
If Parquet files are to be loaded into hash distributed tables using COPY INTO, load it into a round robin staging table followed by INSERT ... SELECT from that table to the target hash distributed table.
325+
If Parquet files are to be loaded into hash distributed tables using `COPY INTO`, load it into a round robin staging table followed by `INSERT ... SELECT` from that table to the target hash distributed table.
324326

325327
### Permissions
326328

@@ -637,7 +639,7 @@ Specifies where the files containing the data is staged. Currently Azure Data La
637639
Azure Data Lake Storage (ADLS) Gen2 offers better performance than Azure Blob Storage (legacy). Consider using an ADLS Gen2 account whenever possible.
638640

639641
> [!NOTE]
640-
> The .blob endpoint is available for ADLS Gen2 as well and currently yields the best performance. Use the `blob` endpoint when `dfs` is not required for your authentication method.
642+
> The `.blob` endpoint is available for ADLS Gen2 as well and currently yields the best performance. Use the `blob` endpoint when `dfs` is not required for your authentication method.
641643
642644
- *Account* - The storage account name
643645

@@ -659,7 +661,7 @@ Multiple file locations can only be specified from the same storage account and
659661

660662
**External locations behind firewall**
661663

662-
To access files on Azure Data Lake Storage (ADLS) Gen2 and Azure Blob Storage locations that are behind a firewall, the following prerequisites are apply:
664+
To access files on Azure Data Lake Storage (ADLS) Gen2 and Azure Blob Storage locations that are behind a firewall, the following prerequisites apply:
663665

664666
- A **workspace identity** for the workspace hosting your warehouse must be provisioned. For more information on how to set up a workspace identity, see [Workspace identity](/fabric/security/workspace-identity).
665667
- Your Entra ID account must be able to use the workspace identity.
@@ -730,7 +732,7 @@ In Microsoft Fabric, *MAXERRORS* cannot be used when *FILE_TYPE* is 'PARQUET'.
730732

731733
The COPY command autodetects the compression type based on the file extension when this parameter isn't specified:
732734

733-
- .gz - **GZIP**
735+
- `.gz` - **GZIP**
734736

735737
Loading compressed files is currently only supported with *PARSER_VERSION* 1.0.
736738

0 commit comments

Comments
 (0)