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
+36-4Lines changed: 36 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -629,9 +629,6 @@ When a column list isn't specified, COPY maps columns based on the source and ta
629
629
630
630
#### *External location*
631
631
632
-
> [!NOTE]
633
-
> [Fabric OneLake](/fabric/onelake/onelake-overview) paths are currently not supported, only BLOB and ADLS Gen2 storage accounts are supported.
634
-
635
632
Specifies where the files containing the data is staged. Currently Azure Data Lake Storage (ADLS) Gen2 and Azure Blob Storage are supported:
636
633
637
634
-*External location* for Blob Storage: `https://<account\>.blob.core.windows.net/<container\>/<path\>`
@@ -802,6 +799,16 @@ Parser version 1.0 is available for backward compatibility only, and should be u
802
799
> [!NOTE]
803
800
> *MATCH_COLUMN_COUNT* works independently from *MAXERRORS*. A column count mismatch causes `COPY INTO` to fail regardless of *MAXERRORS*.
804
801
802
+
## Using COPY INTO with OneLake (Public Preview)
803
+
You can now use `COPY INTO` to load data directly from files stored in **OneLake**, specifically from the **Files folder** of a Lakehouse. This eliminates the need for external staging accounts (such as ADLS Gen2 or Blob Storage) and enables workspace-governed, SaaS-native ingestion using Fabric permissions.
804
+
805
+
This functionality supports:
806
+
- Reading from `Files` folders in Lakehouses
807
+
- Workspace-to-Warehouse loads within the same tenant
808
+
- Native identity enforcement using Microsoft Entra ID
809
+
> [!NOTE]
810
+
> This feature is currently in Public Preview.
811
+
805
812
## Permissions
806
813
807
814
### Control plane permissions
@@ -821,14 +828,28 @@ GO
821
828
GRANT INSERT to [mike@contoso.com];
822
829
GO
823
830
```
824
-
825
831
> [!NOTE]
826
832
> When using the *ErrorFile* option, the user must have the minimal permission of Blob Storage Contributor on the Storage Account container.
827
833
834
+
> [!NOTE]
835
+
> When using OneLake as the source (Public Preview), the user must have **Contributor** or higher permissions on both the **source workspace** (where the Lakehouse is located) and the **target workspace** (where the Warehouse resides).
836
+
> All access is governed via Microsoft Entra ID and Fabric workspace roles.
837
+
828
838
## Remarks
829
839
830
840
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 may 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.
831
841
842
+
## Limitations for OneLake as source (Public Preview)
843
+
844
+
-**Only Microsoft Entra ID authentication is supported.** Other authentication methods, such as SAS tokens, shared keys, or connection strings, are not permitted.
845
+
846
+
-**Only the `Files` folder of a Lakehouse is supported as a source.** Access to subfolders, shortcuts, or other OneLake locations is not currently available.
847
+
848
+
-**OneLake paths must use workspace and warehouse IDs.** Friendly names for workspaces or Lakehouses are not supported at this time.
849
+
850
+
-**Contributor permissions are required on both workspaces.** The executing user must have at least Contributor role on the source Lakehouse workspace and the target Warehouse workspace.
851
+
852
+
832
853
## Examples
833
854
834
855
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).
0 commit comments