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-data-warehouse/design-elt-data-loading.md
+30-15Lines changed: 30 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
title: Instead of ETL, design ELT
3
-
description: Implement flexible data loading strategies for SQL Analytics within Azure Synapse Analytics
3
+
description: Implement flexible data loading strategies for Synapse SQL pool within Azure Synapse Analytics
4
4
services: synapse-analytics
5
5
author: kevinvngo
6
6
manager: craigg
@@ -13,9 +13,15 @@ ms.reviewer: igorstan
13
13
ms.custom: azure-synapse
14
14
---
15
15
16
-
# Data loading strategies for data warehousing
16
+
# Data loading strategies for Synapse SQL pool
17
17
18
-
Traditional SMP data warehouses use an Extract, Transform, and Load (ETL) process for loading data. SQL pools in Azure Synapse Analytics have a massively parallel processing (MPP) architecture that takes advantage of the scalability and flexibility of compute and storage resources. Utilizing an Extract, Load, and Transform (ELT) process can take advantage of MPP and eliminate resources needed to transform the data prior to loading. While SQL pools support many loading methods including popular SQL Server options such as BCP and the SQL BulkCopy API, the fastest and most scalable way to load data is through PolyBase external tables and the [COPY statement](/sql/t-sql/statements/copy-into-transact-sql?view=azure-sqldw-latest) (preview). With PolyBase and the COPY statement, you can access external data stored in Azure Blob storage or Azure Data Lake Store via the T-SQL language. For the most flexibility when loading, we recommend using the COPY statement.
18
+
Traditional SMP SQL pools use an Extract, Transform, and Load (ETL) process for loading data. Synapse SQL pool, within Azure Synapse Analytics, has a massively parallel processing (MPP) architecture that takes advantage of the scalability and flexibility of compute and storage resources.
19
+
20
+
Using an Extract, Load, and Transform (ELT) process leverages MPP and eliminates the resources needed for data transformation prior to loading.
21
+
22
+
While SQL pool supports many loading methods, including popular SQL Server options such as [bcp](https://docs.microsoft.com/sql/tools/bcp-utility?view=sql-server-ver15) and the [SqlBulkCopy API](https://msdn.microsoft.com/library/system.data.sqlclient.sqlbulkcopy.aspx), the fastest and most scalable way to load data is through PolyBase external tables and the [COPY statement](/sql/t-sql/statements/copy-into-transact-sql?view=azure-sqldw-latest) (preview).
23
+
24
+
With PolyBase and the COPY statement, you can access external data stored in Azure Blob storage or Azure Data Lake Store via the T-SQL language. For the most flexibility when loading, we recommend using the COPY statement.
19
25
20
26
> [!NOTE]
21
27
> The COPY statement is currently in public preview. To provide feedback, send email to the following distribution list: [email protected].
@@ -26,7 +32,7 @@ Traditional SMP data warehouses use an Extract, Transform, and Load (ETL) proces
26
32
27
33
## What is ELT?
28
34
29
-
Extract, Load, and Transform (ELT) is a process by which data is extracted from a source system, loaded into a data warehouse, and then transformed.
35
+
Extract, Load, and Transform (ELT) is a process by which data is extracted from a source system, loaded into a SQL pool, and then transformed.
30
36
31
37
The basic steps for implementing ELT are:
32
38
@@ -49,17 +55,19 @@ Getting data out of your source system depends on the storage location. The goa
49
55
50
56
### PolyBase and COPY external file formats
51
57
52
-
With PolyBase and the COPY statement, you can load data from UTF-8 and UTF-16 encoded delimited text or CSV files. In addition to delimited text or CSV files, it loads from the Hadoop file formats such as ORC and Parquet. PolyBase and the COPY statement can also load data from Gzip and Snappy compressed files. Extended ASCII, fixed-width format, and nested formats such as WinZip or XML are not supported. If you are exporting from SQL Server, you can use the [bcp command-line tool](/sql/tools/bcp-utility?view=azure-sqldw-latest) to export the data into delimited text files.
58
+
With PolyBase and the COPY statement, you can load data from UTF-8 and UTF-16 encoded delimited text or CSV files. In addition to delimited text or CSV files, it loads from the Hadoop file formats such as ORC and Parquet. PolyBase and the COPY statement can also load data from Gzip and Snappy compressed files.
59
+
60
+
Extended ASCII, fixed-width format, and nested formats such as WinZip or XML aren't supported. If you're exporting from SQL Server, you can use the [bcp command-line tool](/sql/tools/bcp-utility?view=azure-sqldw-latest) to export the data into delimited text files.
53
61
54
62
## 2. Land the data into Azure Blob storage or Azure Data Lake Store
55
63
56
64
To land the data in Azure storage, you can move it to [Azure Blob storage](../../storage/blobs/storage-blobs-introduction.md) or [Azure Data Lake Store Gen2](../../data-lake-store/data-lake-store-overview.md). In either location, the data should be stored in text files. PolyBase and the COPY statement can load from either location.
57
65
58
66
Tools and services you can use to move data to Azure Storage:
59
67
60
-
-[Azure ExpressRoute](../../expressroute/expressroute-introduction.md) service enhances network throughput, performance, and predictability. ExpressRoute is a service that routes your data through a dedicated private connection to Azure. ExpressRoute connections do not route data through the public internet. The connections offer more reliability, faster speeds, lower latencies, and higher security than typical connections over the public internet.
61
-
-[AZCopy utility](../../storage/common/storage-choose-data-transfer-solution.md) moves data to Azure Storage over the public internet. This works if your data sizes are less than 10 TB. To perform loads on a regular basis with AZCopy, test the network speed to see if it is acceptable.
62
-
-[Azure Data Factory (ADF)](../../data-factory/introduction.md) has a gateway that you can install on your local server. Then you can create a pipeline to move data from your local server up to Azure Storage. To use Data Factory with SQL Analytics, see [Loading data for SQL Analytics](../../data-factory/load-azure-sql-data-warehouse.md).
68
+
-[Azure ExpressRoute](../../expressroute/expressroute-introduction.md) service enhances network throughput, performance, and predictability. ExpressRoute is a service that routes your data through a dedicated private connection to Azure. ExpressRoute connections don't route data through the public internet. The connections offer more reliability, faster speeds, lower latencies, and higher security than typical connections over the public internet.
69
+
-[AZCopy utility](../../storage/common/storage-choose-data-transfer-solution.md) moves data to Azure Storage over the public internet. This method works if your data sizes are less than 10 TB. To perform loads on a regular basis with AZCopy, test the network speed to see if it's acceptable.
70
+
-[Azure Data Factory (ADF)](../../data-factory/introduction.md) has a gateway that you can install on your local server. Then you can create a pipeline to move data from your local server up to Azure Storage. To use Data Factory with SQL pool, see [Loading data for Synapse SQL pool](../../data-factory/load-azure-sql-data-warehouse.md).
63
71
64
72
65
73
## 3. Prepare the data for loading
@@ -68,9 +76,11 @@ You might need to prepare and clean the data in your storage account before load
68
76
69
77
### Define external tables
70
78
71
-
If you are using PolyBase, you need to define external tables in your data warehouse before loading. External tables are not required by the COPY statement. PolyBase uses external tables to define and access the data in Azure Storage. An external table is similar to a database view. The external table contains the table schema and points to data that is stored outside the data warehouse.
79
+
If you are using PolyBase, you need to define external tables in your SQL pool before loading. External tables are not required by the COPY statement. PolyBase uses external tables to define and access the data in Azure Storage.
72
80
73
-
Defining external tables involves specifying the data source, the format of the text files, and the table definitions. T-SQL syntax topics that you will need are:
81
+
An external table is similar to a database view. The external table contains the table schema and points to data that is stored outside the SQL pool.
82
+
83
+
Defining external tables involves specifying the data source, the format of the text files, and the table definitions. T-SQL syntax reference articles that you will need are:
74
84
-[CREATE EXTERNAL DATA SOURCE](/sql/t-sql/statements/create-external-data-source-transact-sql?view=azure-sqldw-latest)
@@ -110,26 +120,31 @@ If you are using PolyBase, the external objects defined need to align the rows o
110
120
To format the text files:
111
121
112
122
- If your data is coming from a non-relational source, you need to transform it into rows and columns. Whether the data is from a relational or non-relational source, the data must be transformed to align with the column definitions for the table into which you plan to load the data.
113
-
- Format data in the text file to align with the columns and data types in the destination table. Misalignment between data types in the external text files and the data warehouse table causes rows to be rejected during the load.
114
-
- Separate fields in the text file with a terminator. Be sure to use a character or a character sequence that is not found in your source data. Use the terminator you specified with [CREATE EXTERNAL FILE FORMAT](/sql/t-sql/statements/create-external-file-format-transact-sql).
123
+
- Format data in the text file to align with the columns and data types in the destination table. Misalignment between data types in the external text files and the SQL pool table causes rows to be rejected during the load.
124
+
- Separate fields in the text file with a terminator. Be sure to use a character or a character sequence that isn't found in your source data. Use the terminator you specified with [CREATE EXTERNAL FILE FORMAT](/sql/t-sql/statements/create-external-file-format-transact-sql).
115
125
116
126
117
127
## 4. Load the data using PolyBase or the COPY statement
118
128
119
-
It is best practice to load data into a staging table. Staging tables allow you to handle errors without interfering with the production tables. A staging table also gives you the opportunity to use the SQL pool MPP for data transformations before inserting the data into production tables. The table will need to be pre-created when loading into a staging table with COPY.
129
+
It is best practice to load data into a staging table. Staging tables allow you to handle errors without interfering with the production tables. A staging table also gives you the opportunity to use the SQL pool MPP for data transformations before inserting the data into production tables.
130
+
131
+
The table will need to be pre-created when loading into a staging table with COPY.
120
132
121
133
### Options for loading with PolyBase and COPY statement
122
134
123
135
To load data with PolyBase, you can use any of these loading options:
124
136
125
137
-[PolyBase with T-SQL](load-data-from-azure-blob-storage-using-polybase.md) works well when your data is in Azure Blob storage or Azure Data Lake Store. It gives you the most control over the loading process, but also requires you to define external data objects. The other methods define these objects behind the scenes as you map source tables to destination tables. To orchestrate T-SQL loads, you can use Azure Data Factory, SSIS, or Azure functions.
126
-
-[PolyBase with SSIS](/sql/integration-services/load-data-to-sql-data-warehouse) works well when your source data is in SQL Server, either SQL Server on-premises or in the cloud. SSIS defines the source to destination table mappings, and also orchestrates the load. If you already have SSIS packages, you can modify the packages to work with the new data warehouse destination.
138
+
-[PolyBase with SSIS](/sql/integration-services/load-data-to-sql-data-warehouse) works well when your source data is in SQL Server, either SQL Server on-premises or in the cloud. SSIS defines the source to destination table mappings, and also orchestrates the load. If you already have SSIS packages, you can modify the packages to work with the new SQL pool destination.
127
139
-[PolyBase and COPY statement with Azure Data Factory (ADF)](../../data-factory/load-azure-sql-data-warehouse.md) is another orchestration tool. It defines a pipeline and schedules jobs.
128
140
-[PolyBase with Azure Databricks](../../azure-databricks/databricks-extract-load-sql-data-warehouse.md) transfers data from a table to a Databricks dataframe and/or writes data from a Databricks dataframe to a table using PolyBase.
129
141
130
142
### Other loading options
131
143
132
-
In addition to PolyBase and the COPY statement, you can use [bcp](/sql/tools/bcp-utility?view=azure-sqldw-latest) or the [SQLBulkCopy API](https://msdn.microsoft.com/library/system.data.sqlclient.sqlbulkcopy.aspx). bcp loads directly to the database without going through Azure Blob storage, and is intended only for small loads. Note, the load performance of these options is slower than PolyBase and the COPY statement.
144
+
In addition to PolyBase and the COPY statement, you can use [bcp](https://docs.microsoft.com/sql/tools/bcp-utility?view=sql-server-ver15) or the [SqlBulkCopy API](https://msdn.microsoft.com/library/system.data.sqlclient.sqlbulkcopy.aspx). bcp loads directly to the database without going through Azure Blob storage, and is intended only for small loads.
145
+
146
+
> [!NOTE]
147
+
> Note, the load performance of these options is slower than PolyBase and the COPY statement.
0 commit comments