Skip to content

Commit 7053d10

Browse files
20240820 SFI image sweep
1 parent 76e9c26 commit 7053d10

File tree

9 files changed

+11
-25
lines changed

9 files changed

+11
-25
lines changed

articles/synapse-analytics/sql-data-warehouse/load-data-from-azure-blob-storage-using-copy.md

Lines changed: 11 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,12 @@ description: Tutorial uses Azure portal and SQL Server Management Studio to load
44
author: joannapea
55
ms.author: joanpo
66
ms.reviewer: wiassaf
7-
ms.date: 11/23/2020
7+
ms.date: 08/20/2024
88
ms.service: azure-synapse-analytics
99
ms.subservice: sql-dw
1010
ms.topic: conceptual
1111
ms.custom: azure-synapse
1212
---
13-
1413
# Tutorial: Load the New York Taxicab dataset
1514

1615
This tutorial uses the [COPY statement](/sql/t-sql/statements/copy-into-transact-sql?view=azure-sqldw-latest&preserve-view=true) to load New York Taxicab dataset from an Azure Blob Storage account. The tutorial uses the [Azure portal](https://portal.azure.com) and [SQL Server Management Studio (SSMS)](/sql/ssms/download-sql-server-management-studio-ssms?toc=/azure/synapse-analytics/sql-data-warehouse/toc.json&bc=/azure/synapse-analytics/sql-data-warehouse/breadcrumb/toc.json&view=azure-sqldw-latest&preserve-view=true) to:
@@ -28,34 +27,30 @@ If you don't have an Azure subscription, [create a free Azure account](https://a
2827

2928
Before you begin this tutorial, download and install the newest version of [SQL Server Management Studio (SSMS)](/sql/ssms/download-sql-server-management-studio-ssms?toc=/azure/synapse-analytics/sql-data-warehouse/toc.json&bc=/azure/synapse-analytics/sql-data-warehouse/breadcrumb/toc.json&view=azure-sqldw-latest&preserve-view=true).
3029

31-
This tutorial assumes you have already created a SQL dedicated pool from the following [tutorial](./create-data-warehouse-portal.md#connect-to-the-server-as-server-admin).
30+
This tutorial assumes you have already [created a SQL dedicated pool](./create-data-warehouse-portal.md#connect-to-the-server-as-server-admin).
3231

3332
## Create a user for loading data
3433

3534
The server admin account is meant to perform management operations, and is not suited for running queries on user data. Loading data is a memory-intensive operation. Memory maximums are defined according to the [data warehouse units](what-is-a-data-warehouse-unit-dwu-cdwu.md) and [resource class](resource-classes-for-workload-management.md) configured.
3635

3736
It's best to create a login and user that is dedicated for loading data. Then add the loading user to a [resource class](resource-classes-for-workload-management.md) that enables an appropriate maximum memory allocation.
3837

39-
Connect as the server admin so you can create logins and users. Use these steps to create a login and user called **LoaderRC20**. Then assign the user to the **staticrc20** resource class.
38+
Connect as the server admin so you can create logins and users. Use these steps to create a login and user called `LoaderRC20`. Then assign the user to the `staticrc20` resource class.
4039

4140
1. In SSMS, right-select **master** to show a drop-down menu, and choose **New Query**. A new query window opens.
4241

43-
![New query in master](./media/load-data-from-azure-blob-storage-using-polybase/create-loader-login.png)
44-
45-
2. In the query window, enter these T-SQL commands to create a login and user named LoaderRC20, substituting your own password for 'a123STRONGpassword!'.
42+
2. In the query window, enter these T-SQL commands to create a login and user named `LoaderRC20`, substituting your own strong password.
4643

4744
```sql
48-
CREATE LOGIN LoaderRC20 WITH PASSWORD = 'a123STRONGpassword!';
45+
CREATE LOGIN LoaderRC20 WITH PASSWORD = '<strong password here>';
4946
CREATE USER LoaderRC20 FOR LOGIN LoaderRC20;
5047
```
5148

5249
3. Select **Execute**.
5350

5451
4. Right-click **mySampleDataWarehouse**, and choose **New Query**. A new query Window opens.
5552

56-
![New query on sample data warehouse](./media/load-data-from-azure-blob-storage-using-polybase/create-loading-user.png)
57-
58-
5. Enter the following T-SQL commands to create a database user named LoaderRC20 for the LoaderRC20 login. The second line grants the new user CONTROL permissions on the new data warehouse. These permissions are similar to making the user the owner of the database. The third line adds the new user as a member of the staticrc20 [resource class](resource-classes-for-workload-management.md).
53+
5. Enter the following T-SQL commands to create a database user named `LoaderRC20` for the `LoaderRC20` login. The second line grants the new user CONTROL permissions on the new data warehouse. These permissions are similar to making the user the owner of the database. The third line adds the new user as a member of the `staticrc20` [resource class](resource-classes-for-workload-management.md).
5954

6055
```sql
6156
CREATE USER LoaderRC20 FOR LOGIN LoaderRC20;
@@ -67,31 +62,25 @@ Connect as the server admin so you can create logins and users. Use these steps
6762

6863
## Connect to the server as the loading user
6964

70-
The first step toward loading data is to login as LoaderRC20.
65+
The first step toward loading data is to login as `LoaderRC20`.
7166

7267
1. In Object Explorer, select the **Connect** drop down menu and select **Database Engine**. The **Connect to Server** dialog box appears.
7368

74-
![Connect with new login](./media/load-data-from-azure-blob-storage-using-polybase/connect-as-loading-user.png)
75-
76-
2. Enter the fully qualified server name, and enter **LoaderRC20** as the Login. Enter your password for LoaderRC20.
69+
2. Enter the fully qualified server name, and enter `LoaderRC20` as the Login. Enter your password for LoaderRC20.
7770

7871
3. Select **Connect**.
7972

8073
4. When your connection is ready, you will see two server connections in Object Explorer. One connection as ServerAdmin and one connection as LoaderRC20.
8174

82-
![Connection is successful](./media/load-data-from-azure-blob-storage-using-polybase/connected-as-new-login.png)
83-
8475
## Create tables for the sample data
8576

8677
You are ready to begin the process of loading data into your new data warehouse. This part of the tutorial shows you how to use the COPY statement to load the New York City taxi cab dataset from an Azure Storage blob. For future reference, to learn how to get your data to Azure Blob Storage or to load it directly from your source, see the [loading overview](design-elt-data-loading.md).
8778

8879
Run the following SQL scripts and specify information about the data you wish to load. This information includes where the data is located, the format of the contents of the data, and the table definition for the data.
8980

90-
1. In the previous section, you logged into your data warehouse as LoaderRC20. In SSMS, right-click your LoaderRC20 connection and select **New Query**. A new query window appears.
91-
92-
![New loading query window](./media/load-data-from-azure-blob-storage-using-polybase/new-loading-query.png)
81+
1. In the previous section, you logged into your data warehouse as `LoaderRC20`. In SSMS, right-click your LoaderRC20 connection and select **New Query**. A new query window appears.
9382

94-
2. Compare your query window to the previous image. Verify your new query window is running as LoaderRC20 and performing queries on your MySampleDataWarehouse database. Use this query window to perform all of the loading steps.
83+
2. Compare your query window to the previous image. Verify your new query window is running as `LoaderRC20` and performing queries on your `MySampleDataWarehouse` database. Use this query window to perform all of the loading steps.
9584

9685
7. Run the following T-SQL statements to create the tables:
9786

@@ -359,9 +348,8 @@ This section uses the [COPY statement to load](/sql/t-sql/statements/copy-into-t
359348
SELECT * FROM sys.dm_pdw_exec_requests;
360349
```
361350
362-
4. Enjoy seeing your data nicely loaded into your data warehouse.
351+
4. Enjoy your data nicely loaded into your data warehouse.
363352
364-
![View loaded tables](./media/load-data-from-azure-blob-storage-using-polybase/view-loaded-tables.png)
365353
366354
## Clean up resources
367355
@@ -374,8 +362,6 @@ Follow these steps to clean up resources as you desire.
374362

375363
1. Log in to the [Azure portal](https://portal.azure.com), select your data warehouse.
376364

377-
![Clean up resources](./media/load-data-from-azure-blob-storage-using-polybase/clean-up-resources.png)
378-
379365
2. To pause compute, select the **Pause** button. When the data warehouse is paused, you will see a **Start** button. To resume compute, select **Start**.
380366

381367
3. To remove the data warehouse so you won't be charged for compute or storage, select **Delete**.
Loading

0 commit comments

Comments
 (0)