You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/t-sql/statements/copy-into-transact-sql.md
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -199,7 +199,7 @@ Multiple file locations can only be specified from the same storage account and
199
199
200
200
#### *ERRORFILE = Directory Location*
201
201
202
-
*ERRORFILE* only applies to CSV. Specifies the directory within the COPY statement where the rejected rows and the corresponding error file should be written. The full path from the storage account can be specified or the path relative to the container can be specified. If the specified path doesn't exist, one is created on your behalf. A child directory is created with the name "\_rejectedrows". The "\_" character ensures that the directory is escaped for other data processing unless explicitly named in the location parameter.
202
+
*ERRORFILE* only applies to CSV. Specifies the directory within the COPY statement where the rejected rows and the corresponding error file should be written. The full path from the storage account can be specified or the path relative to the container can be specified. If the specified path doesn't exist, one is created on your behalf. A child directory is created with the name `_rejectedrows`. The `_` character ensures that the directory is escaped for other data processing unless explicitly named in the location parameter.
203
203
204
204
> [!NOTE]
205
205
> When a relative path is passed to *ERRORFILE*, the path is relative to the container path specified in *external_location*.
@@ -247,7 +247,7 @@ Using a storage account key with ERRORFILE_CREDENTIAL is not supported.
247
247
248
248
*MAXERRORS* cannot be used with AUTO_CREATE_TABLE.
249
249
250
-
When *FILE_TYPE* is 'PARQUET', exceptions that are caused by data type conversion errors (e.g., Parquet binary to SQL integer) still cause COPY INTO will to fail, ignoring *MAXERRORS*.
250
+
When *FILE_TYPE* is `PARQUET`, exceptions that are caused by data type conversion errors (for example, Parquet binary to SQL integer) still cause `COPY INTO` to fail, ignoring *MAXERRORS*.
@@ -523,7 +523,7 @@ There's no need to split Parquet and ORC files because the COPY command automati
523
523
524
524
### Are there any limitations on the number or size of files?
525
525
526
-
There are no limitations on the number or size of files; however, for best performance, we recommend files that are at least 4 MB. Also, limit the count of source files to a maximum of 5000 files for better performance.
526
+
There are no limitations on the number or size of files; however, for best performance, we recommend files that are at least 4 MB. Also, limit the count of source files to a maximum of 5,000 files for better performance.
527
527
528
528
### Are there any known issues with the COPY statement?
529
529
@@ -555,7 +555,7 @@ In [!INCLUDE [fabric](../../includes/fabric.md)], the [COPY (Transact-SQL)](/sql
555
555
556
556
For more information on using COPY INTO on your [!INCLUDE [fabricdw](../../includes/fabric-dw.md)] in [!INCLUDE [fabric](../../includes/fabric.md)], see [Ingest data into your [!INCLUDE [fabricdw](../../includes/fabric-dw.md)] using the COPY statement](/fabric/data-warehouse/ingest-data-copy).
557
557
558
-
By default, `COPY INTO`will authenticate as the executing Entra ID user.
558
+
By default, `COPY INTO`authenticates as the executing Entra ID user.
559
559
560
560
> [!NOTE]
561
561
> 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).
@@ -682,7 +682,7 @@ To access files on Azure Data Lake Storage (ADLS) Gen2 and Azure Blob Storage lo
682
682
683
683
*CREDENTIAL* specifies the authentication mechanism to access the external storage account. On [!INCLUDE [fabric-dw](../../includes/fabric-dw.md)] in [!INCLUDE [fabric](../../includes/fabric.md)], the only supported authentication mechanisms are Shared Access Signature (SAS) and Storage Account Key (SAK).
684
684
685
-
The user's EntraID authentication is default, no credential needs to be specified. COPY INTO using OneLake as source only supports EntraID authentication.
685
+
The user's EntraID authentication is default. No credential needs to be specified. COPY INTO using OneLake as source only supports EntraID authentication.
686
686
687
687
> [!NOTE]
688
688
> When using a public storage account, CREDENTIAL does not need to be specified. By default the executing user's Entra ID is used.
@@ -700,7 +700,7 @@ The user's EntraID authentication is default, no credential needs to be specifie
700
700
701
701
#### *ERRORFILE = Directory Location*
702
702
703
-
*ERRORFILE* only applies to CSV. Specifies the directory where the rejected rows and the corresponding error file should be written. The full path from the storage account can be specified or the path relative to the container can be specified. If the specified path doesn't exist, one is created on your behalf. A child directory is created with the name "\_rejectedrows". The "\_" character ensures that the directory is escaped for other data processing unless explicitly named in the location parameter.
703
+
*ERRORFILE* only applies to CSV. Specifies the directory where the rejected rows and the corresponding error file should be written. The full path from the storage account can be specified or the path relative to the container can be specified. If the specified path doesn't exist, one is created on your behalf. A child directory is created with the name `_rejectedrows`. The `_` character ensures that the directory is escaped for other data processing unless explicitly named in the location parameter.
704
704
705
705
> [!NOTE]
706
706
> When a relative path is passed to *ERRORFILE*, the path is relative to the container path specified in *external_location*.
@@ -709,7 +709,7 @@ Within this directory, there's a folder created based on the time of load submis
709
709
710
710
If ERRORFILE has the full path of the storage account defined, then the ERRORFILE_CREDENTIAL is used to connect to that storage. Otherwise, the value mentioned for CREDENTIAL is used. When the same credential that is used for the source data is used for ERRORFILE, restrictions that apply to ERRORFILE_CREDENTIAL also apply.
711
711
712
-
When using a firewall protected Azure Storage Account, the error file will be created in the same container specified in the storage account path. When considering using the *ERRORFILES* option in this scenario, it is also required to specify the *MAXERROR* parameter. If ERRORFILE has the full path of the storage account defined, then the ERRORFILE_CREDENTIAL is used to connect to that storage. Otherwise, the value mentioned for CREDENTIAL is used.
712
+
When using a firewall protected Azure Storage Account, the error file is created in the same container specified in the storage account path. When considering using the *ERRORFILES* option in this scenario, it is also required to specify the *MAXERROR* parameter. If ERRORFILE has the full path of the storage account defined, then the ERRORFILE_CREDENTIAL is used to connect to that storage. Otherwise, the value mentioned for CREDENTIAL is used.
@@ -727,7 +727,7 @@ When using a firewall protected Azure Storage Account, the error file will be cr
727
727
728
728
*MAXERRORS* specifies the maximum number of reject rows allowed in the load before the COPY operation fails. Each row that the COPY operation can't import is ignored and counted as one error. If max_errors isn't specified, the default is 0.
729
729
730
-
In Microsoft Fabric, *MAXERRORS* cannot be used when *FILE_TYPE* is 'PARQUET'.
730
+
In Microsoft Fabric, *MAXERRORS* cannot be used when *FILE_TYPE* is `PARQUET`.
@@ -855,7 +855,7 @@ When using OneLake as the source, the user must have **Contributor** or higher p
855
855
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.
856
856
857
857
To ensure reliable execution, the source files and folders must remain unchanged throughout the duration of the COPY INTO operation.
858
-
- Modifying, deleting, or replacing any referenced files or folders while the command is running may cause the operation to fail or result in inconsistent data ingestion.
858
+
- 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.
859
859
- Before executing COPY INTO, verify that all source data is stable and will not be altered during the process.
0 commit comments