Skip to content

Commit fb385b3

Browse files
authored
Merge pull request #232518 from WilliamDAssafMSFT/20230328-redundant-create-external-content
20230328 merge/move redundant content into TSQL reference articles instead
2 parents 1696804 + 4b66bdf commit fb385b3

File tree

3 files changed

+18
-347
lines changed

3 files changed

+18
-347
lines changed

articles/synapse-analytics/sql/develop-tables-cetas.md

Lines changed: 3 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ author: filippopovic
55
ms.service: synapse-analytics
66
ms.topic: overview
77
ms.subservice: sql
8-
ms.date: 09/15/2020
8+
ms.date: 02/17/2023
99
ms.author: fipopovi
10-
ms.reviewer: sngun
10+
ms.reviewer: sngun, wiassaf
1111
---
1212

1313
# CETAS with Synapse SQL
@@ -29,55 +29,7 @@ For dedicated SQL pool, CETAS usage and syntax, check the [CREATE EXTERNAL TABLE
2929

3030
When using serverless SQL pool, CETAS is used to create an external table and export query results to Azure Storage Blob or Azure Data Lake Storage Gen2.
3131

32-
## Syntax
33-
34-
```syntaxsql
35-
CREATE EXTERNAL TABLE [ [database_name . [ schema_name ] . ] | schema_name . ] table_name
36-
WITH (
37-
LOCATION = 'path_to_folder',
38-
DATA_SOURCE = external_data_source_name,
39-
FILE_FORMAT = external_file_format_name
40-
)
41-
AS <select_statement>
42-
[;]
43-
44-
<select_statement> ::=
45-
[ WITH <common_table_expression> [ ,...n ] ]
46-
SELECT <select_criteria>
47-
```
48-
49-
## Arguments
50-
51-
*[ [ *database_name* . [ *schema_name* ] . ] | *schema_name* . ] *table_name**
52-
53-
The one to three-part name of the table to create. For an external table, serverless SQL pool stores only the table metadata. No actual data is moved or stored in serverless SQL pool.
54-
55-
LOCATION = *'path_to_folder'*
56-
57-
Specifies where to write the results of the SELECT statement on the external data source. The root folder is the data location specified in the external data source. LOCATION must point to a folder and have a trailing /. Example: aggregated_data/
58-
59-
DATA_SOURCE = *external_data_source_name*
60-
61-
Specifies the name of the external data source object that contains the location where the external data will be stored. To create an external data source, use [CREATE EXTERNAL DATA SOURCE (Transact-SQL)](develop-tables-external-tables.md#create-external-data-source).
62-
63-
FILE_FORMAT = *external_file_format_name*
64-
65-
Specifies the name of the external file format object that contains the format for the external data file. To create an external file format, use [CREATE EXTERNAL FILE FORMAT (Transact-SQL)](develop-tables-external-tables.md#create-external-file-format). Only external file formats with FORMAT_TYPE=PARQUET and FORMAT_TYPE=DELIMITEDTEXT are currently supported. GZip compression for DELIMITEDTEXT format is not supported.
66-
67-
WITH *<common_table_expression>*
68-
69-
Specifies a temporary named result set, known as a common table expression (CTE). For more information, see [WITH common_table_expression (Transact-SQL)](/sql/t-sql/queries/with-common-table-expression-transact-sql?view=azure-sqldw-latest&preserve-view=true).
70-
71-
SELECT <select_criteria>
72-
73-
Populates the new table with the results from a SELECT statement. *select_criteria* is the body of the SELECT statement that determines which data to copy to the new table. For information about SELECT statements, see [SELECT (Transact-SQL)](/sql/t-sql/queries/select-transact-sql?view=azure-sqldw-latest&preserve-view=true).
74-
75-
> [!NOTE]
76-
> ORDER BY clause in SELECT is not supported for CETAS.
77-
78-
## Permissions
79-
80-
You need to have permissions to list folder content and write to the LOCATION folder for CETAS to work.
32+
For complete syntax, refer to [CREATE EXTERNAL TABLE AS SELECT (Transact-SQL)](/sql/t-sql/statements/create-external-data-source-transact-sql?view=azure-sqldw-latest&preserve-view=true).
8133

8234
## Examples
8335

0 commit comments

Comments
 (0)