Skip to content

Commit 30f26cc

Browse files
authored
Merge pull request #114181 from kevinvngo/patch-158
Bulk Load Quickstart
2 parents 5b4b453 + a03fe8e commit 30f26cc

9 files changed

+61
-0
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
title: Bulk load data with Synapse SQL
3+
description: Use the Synapse Studio to bulk load data in Synapse SQL
4+
services: synapse-analytics
5+
author: kevinvngo
6+
ms.service: synapse-analytics
7+
ms.topic: overview
8+
ms.subservice:
9+
ms.date: 05/06/2020
10+
ms.author: kevin
11+
ms.reviewer: jrasnick
12+
---
13+
14+
# Bulk loading with Synapse SQL
15+
16+
Loading data has never been easier when using the Bulk Load wizard in the Synapse Studio. This wizard will guide you through creating a T-SQL script with the [COPY statement](https://docs.microsoft.com/sql/t-sql/statements/copy-into-transact-sql?view=azure-sqldw-latest) to bulk load data.
17+
18+
## Entry points to the Bulk Load wizard
19+
20+
You can now easily bulk load data using SQL pools with a simple right-click on the following areas within the Synapse Studio:
21+
22+
- A file or folder from an Azure storage account attached to your workspace
23+
![Right-clicking on a file or folder from a storage account](./sql/media/bulk-load/bulk-load-entry-point-0.png)
24+
25+
## Prerequisites
26+
27+
- You must have access to the workspace with at least the Storage Blob Data Contributor RBAC role to the ADLS Gen2 Account.
28+
29+
- You must have the required [permissions to use the COPY statement](https://docs.microsoft.com/sql/t-sql/statements/copy-into-transact-sql?view=azure-sqldw-latest#permissions) and Create table permissions if you are creating a new table to load to.
30+
31+
- The linked service associated with the ADLS Gen2 Account **must have access to the file**/**folder** to load. For example, if the linked service authentication mechanism is Managed Identity, the workspace managed identity must have at least Storage blob reader permission on the storage account.
32+
33+
- If VNet is enabled on your workspace, make sure the integrated runtime associated to the ADLS Gen2 Account linked services for the source data and error file location has interactive authoring enabled. Interactive authoring is required for auto-schema detection, previewing the source file contents, and browsing ADLS Gen2 storage accounts within the wizard.
34+
35+
### Steps
36+
37+
1. Select the storage account and the file or folder you're loading from on the Source storage location panel:
38+
![Selecting source location](./sql/media/bulk-load/bulk-load-source-location.png)
39+
40+
2. Select the file format settings including the storage account where you want to write rejected rows (error file). Currently only CSV and Parquet files are supported.
41+
42+
![Selecting file format settings](./sql/media/bulk-load/bulk-load-file-format-settings.png)
43+
44+
3. You can click on "Preview data" to see how the COPY statement will parse the file to help you configure the file format settings. Click on "Preview data" every time you change a file format setting to see how the COPY statement will parse the file with the updated setting:
45+
![Previewing data](./sql/media/bulk-load/bulk-load-file-format-settings-preview-data.png)
46+
47+
4. Select the SQL pool you are using to load including whether the load will be for an existing table or new table:
48+
![Selecting target location](./sql/media/bulk-load/bulk-load-target-location.png)
49+
50+
5. Click on "Configure column mapping" to make sure you have the appropriate column mapping. For new tables, configuring the column mapping is critical for updating the target column data types:
51+
![Configuring column mapping](./sql/media/bulk-load/bulk-load-target-location-column-mapping.png)
52+
53+
6. Click on "Open script" and a T-SQL script will be generated with the COPY statement to load from your data lake:
54+
![Opening the SQL script](./sql/media/bulk-load/bulk-load-target-final-script.png)
55+
56+
## Next steps
57+
58+
- Check the [COPY statement](https://docs.microsoft.com/sql/t-sql/statements/copy-into-transact-sql?view=azure-sqldw-latest#syntax) article for more information on COPY capabilities
59+
- Check the [data loading overview](https://docs.microsoft.com/azure/synapse-analytics/sql-data-warehouse/design-elt-data-loading#what-is-elt) article
30.6 KB
Loading
57.5 KB
Loading
35.3 KB
Loading
17.6 KB
Loading
46.3 KB
Loading
18.9 KB
Loading
15.6 KB
Loading

articles/synapse-analytics/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
items:
3131
- name: COPY statement
3232
href: ./sql-data-warehouse/quickstart-bulk-load-copy-tsql.md?toc=/azure/synapse-analytics/toc.json&bc=/azure/synapse-analytics/breadcrumb/toc.json
33+
- name: Synapse Studio
34+
href: quickstart-load-studio-sql-pool.md
3335
- name: Use SQL on-demand
3436
href: quickstart-sql-on-demand.md
3537
- name: Tutorials

0 commit comments

Comments
 (0)