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: articles/synapse-analytics/sql/tutorial-load-data-using-entra-id.md
+12-4Lines changed: 12 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -63,7 +63,13 @@ Where:
63
63
64
64
To learn more and explore the full syntax, see [COPY INTO (Transact-SQL)](/sql/t-sql/statements/copy-into-transact-sql?view=azure-sqldw-latest&preserve-view=true).
65
65
66
-
## Create the required database objects
66
+
## Query data on ADLS Gen2 using external tables
67
+
68
+
External tables allow users to query data from Azure Data Lake Storage (ADLS) Gen2 accounts without the need to ingest data first. Users can create an external table which points to files on an ADLS Gen2 container, and query it just like a regular user table.
69
+
70
+
The following steps describe the process to create a new external table pointing to data on ADLS Gen2, using Entra ID authentication.
71
+
72
+
### Create the required database objects
67
73
68
74
External tables require the following objects to be created:
69
75
@@ -73,7 +79,7 @@ External tables require the following objects to be created:
73
79
74
80
To follow these steps, you need to use the SQL editor in the Azure Synapse Workspace, or your preferred SQL client connected to your dedicated SQL pool. Let's look at these steps in detail.
75
81
76
-
### Create the external data source
82
+
####Create the external data source
77
83
78
84
The next step is to create an external data source that specifies where the source data used by the external table resides.
79
85
@@ -96,7 +102,7 @@ Where:
96
102
97
103
To learn more about external data sources, see [CREATE EXTERNAL DATA SOURCE (Transact-SQL)](/sql/t-sql/statements/create-external-data-source-transact-sql?view=azure-sqldw-latest&preserve-view=true&tabs=dedicated).
98
104
99
-
### Create the external file format
105
+
#### Create the external file format
100
106
101
107
The next step is to create the external file format. It specifies the actual layout of the data referenced by the external table.
102
108
@@ -117,7 +123,7 @@ WITH (
117
123
118
124
In this example, adjust parameters such as `FIELD_TERMINATOR`, `STRING_DELIMITER`, `FIRST_ROW`, and others as needed in accordance with your source data. For more formatting options and to learn more, see [CREATE EXTERNAL FILE FORMAT (Transact-SQL)](/sql/t-sql/statements/create-external-file-format-transact-sql?view=azure-sqldw-latest&preserve-view=true&tabs=delimited).
119
125
120
-
### Create the external table
126
+
#### Create the external table
121
127
122
128
Now that the necessary objects that hold the metadata to securely access external data are created, it's time to create the external table. To create the external table, use the following T-SQL command:
123
129
@@ -145,6 +151,8 @@ Where:
145
151
146
152
Make sure to adjust the table name and schema to the desired name and the schema of the data in your source files.
147
153
154
+
### Query the external table
155
+
148
156
At this point, all the metadata required to access the external table are created. To test your external table, use a query such as the following T-SQL sample to validate your work:
0 commit comments