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
In this tutorial, you use the Azure portal to create a data factory. Then you use the Copy Data tool to create a pipeline that copies data from Azure Blob storage to a SQL database.
23
+
In this tutorial, you use the Azure portal to create a data factory. Then you use the Copy Data tool to create a pipeline that copies data from Azure Blob storage to a SQL Database.
24
24
25
25
> [!NOTE]
26
26
> If you're new to Azure Data Factory, see [Introduction to Azure Data Factory](introduction.md).
@@ -34,27 +34,27 @@ In this tutorial, you perform the following steps:
34
34
## Prerequisites
35
35
36
36
***Azure subscription**: If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/) before you begin.
37
-
***Azure storage account**: Use Blob storage as the _source_ data store. If you don't have an Azure storage account, see the instructions in [Create a storage account](../storage/common/storage-account-create.md).
38
-
***Azure SQL Database**: Use a SQL database as the _sink_ data store. If you don't have a SQL database, see the instructions in [Create a SQL database](../sql-database/sql-database-get-started-portal.md).
37
+
***Azure Storage account**: Use Blob storage as the _source_ data store. If you don't have an Azure Storage account, see the instructions in [Create a storage account](../storage/common/storage-account-create.md).
38
+
***Azure SQL Database**: Use a SQL Database as the _sink_ data store. If you don't have a SQL Database, see the instructions in [Create a SQL Database](../sql-database/sql-database-get-started-portal.md).
39
39
40
40
### Create a blob and a SQL table
41
41
42
-
Prepare your Blob storage and your SQL database for the tutorial by performing these steps.
42
+
Prepare your Blob storage and your SQL Database for the tutorial by performing these steps.
43
43
44
44
#### Create a source blob
45
45
46
46
1. Launch **Notepad**. Copy the following text and save it in a file named **inputEmp.txt** on your disk:
47
47
48
-
```
49
-
John|Doe
50
-
Jane|Doe
51
-
```
48
+
```
49
+
1|John|Doe
50
+
2|Jane|Doe
51
+
```
52
52
53
53
1. Create a container named **adfv2tutorial** and upload the inputEmp.txt file to the container. You can use the Azure portal or various tools like [Azure Storage Explorer](https://storageexplorer.com/) to perform these tasks.
54
54
55
55
#### Create a sink SQL table
56
56
57
-
1. Use the following SQL script to create a table named **dbo.emp** in your SQL database:
57
+
1. Use the following SQL script to create a table named **dbo.emp** in your SQL Database:
58
58
59
59
```sql
60
60
CREATE TABLE dbo.emp
@@ -68,7 +68,7 @@ Prepare your Blob storage and your SQL database for the tutorial by performing t
68
68
CREATE CLUSTERED INDEX IX_emp_ID ON dbo.emp (ID);
69
69
```
70
70
71
-
2. Allow Azure services to access SQL Server. Verify that the setting **Allow access to Azure services** is enabled for your server that's running SQL Database. This setting lets Data Factory write data to your database instance. To verify and turn on this setting, go to Azure SQL server > Overview > Set server firewall> set the **Allow access to Azure services** option to **ON**.
71
+
2. Allow Azure services to access SQL Server. Verify that the setting **Allow Azure services and resources to access this server** is enabled for your server that's running SQL Database. This setting lets Data Factory write data to your database instance. To verify and turn on this setting, go to Azure SQL server > Security > Firewalls and virtual networks > set the **Allow Azure services and resources to access this server** option to **ON**.
72
72
73
73
## Create a data factory
74
74
@@ -106,14 +106,15 @@ Prepare your Blob storage and your SQL database for the tutorial by performing t
106
106
107
107

108
108
1. On the **Properties** page, under **Task name**, enter **CopyFromBlobToSqlPipeline**. Then select **Next**. The Data Factory UI creates a pipeline with the specified task name.
109
+

109
110
110
111
1. On the **Source data store** page, complete the following steps:
111
112
112
113
a. Click **+ Create new connection** to add a connection
113
114
114
115
b. Select **Azure Blob Storage** from the gallery, and then select **Continue**.
115
116
116
-
c. On the **New Linked Service** page, select your storage account from the **Storage account name** list, and then select**Finish**.
117
+
c. On the **New Linked Service** page, select your Azure subscription, and select your storage account from the **Storage account name** list. Test connection and then select **Create**.
117
118
118
119
d. Select the newly created linked service as source, then click **Next**.
119
120
@@ -134,36 +135,41 @@ Prepare your Blob storage and your SQL database for the tutorial by performing t
134
135
135
136
b. Select **Azure SQL Database** from the gallery, and then select **Continue**.
136
137
137
-
c. On the **New Linked Service** page, select your server name and DB name from the dropdown list, and specify the username and password, then select**Finish**.
138
+
c. On the **New Linked Service** page, select your server name and DB name from the dropdown list, and specify the username and password, then select **Create**.
1. On the **Table mapping** page, select the **[dbo].[emp]** table, and then select **Next**.
146
145
147
-
1. On the **Schema mapping** page, notice that the firstandsecond columns in the input file are mapped to the **FirstName**and**LastName** columns of the **emp** table. Select**Next**.
146
+
1. On the **Schema mapping** page, notice that the second and the third columns in the input file are mapped to the **FirstName** and **LastName** columns of the **emp** table. Select **Next**.
1. On the **Summary** page, review the settings, and then select **Next**.
152
152
1. On the **Deployment page**, select **Monitor** to monitor the pipeline (task).
153
-
1. Notice that the **Monitor** tab on the left is automatically selected. The **Actions** column includes links to view activity run details and to rerun the pipeline. Select**Refresh** to refresh the list.
1. On the Pipeline runs page, select **Refresh** to refresh the list. Click the link under **PIPELINE NAME** to view activity run details or rerun the pipeline.
1. To view the activity runs that are associated with the pipeline run, select the **View Activity Runs** link inthe **Actions** column. For details about the copy operation, select the **Details** link (eyeglasses icon) in the **Actions** column. To go back to the Pipeline Runs view, select the **Pipeline Runs** link at the top. To refresh the view, select**Refresh**.
159
+
1. On the Activity runs page, select the **Details** link (eyeglasses icon) under the **ACTIVITY NAME** column for more details about copy operation. To go back to the Pipeline Runs view, select the **ALL pipeline runs** link in the breadcrumb menu. To refresh the view, select **Refresh**.
1. Verify that the data is inserted into the **emp** table in your SQL database.
164
+
1. Verify that the data is inserted into the **dbo.emp** table in your SQL Database.
161
165
162
166
163
167
1. Select the **Author** tab on the left to switch to the editor mode. You can update the linked services, datasets, and pipelines that were created via the tool by using the editor. For details on editing these entities in the Data Factory UI, see [the Azure portal version of this tutorial](tutorial-copy-data-portal.md).
0 commit comments