当前位置:网站首页>[azure data platform] ETL tool (5) -- use azure data factory data stream to convert data

[azure data platform] ETL tool (5) -- use azure data factory data stream to convert data

2022-06-13 03:23:00 Hair dung coating wall

This paper belongs to 【Azure Data Platform】 series .
Continued above :【Azure Data Platform】ETL Tools (4)——Azure Data Factory Debug The Conduit
This article describes how to ADF Data stream transformation data .

The previous articles mainly focused on “ Copy the data ” Use of tools .

Data conversion

This demonstration Azure SQL DB After calculating the value of a table in , Write to a new table . So , First create a... In the pipe data flow:
 Insert picture description here

 Insert picture description here

Create a new data stream :
 Insert picture description here

Add source :
 Insert picture description here

Here, create a new source to distinguish it from the previous one :

 Insert picture description here
Create a new link service to ADF Be able to access Azure SQL DB:

 Insert picture description here
Open source , Configure specific source options :

 Insert picture description here

Select the table to be processed , It can be downloaded from “ Preview data ” Check whether it is connected :
 Insert picture description here

In the source options , You can define full table operations , Or use specific SQL/ Stored procedures to process data , You can also define the batch size and isolation level .
 Insert picture description here

stay 【 Optimize 】 In the options , You can also perform additional processing on partitioned tables .
 Insert picture description here

And then click 【 Check 】 Options , View the table definition of the source table :
 Insert picture description here

Then click... In the lower right corner of the graphical interface 【+】, As shown in the figure , Configure a data processing operation , Select aggregation here .
 Insert picture description here
Select the columns to be processed in the following order , In the last step 【 Open the expression builder 】 In, we select the columns and operations to be processed :

 Insert picture description here
choice ListPrice Column , And then use countAll Function to calculate :
 Insert picture description here

Next, add another process 【 Receiver 】, Means the target source , For the convenience of the period , Choose the same one here Azure SQL DB The library of , Just use different tables :

 Insert picture description here
For the convenience of , First, create the target table :

 Insert picture description here

Enter this table in the destination and view the data , It can be seen that the current table is empty .

 Insert picture description here

When everything is configured , Publish this pipeline :
 Insert picture description here

 Insert picture description here

After publishing , Use the debugging function , The execution of the pipeline can be triggered manually . You can see from the figure below that the calculation results have been obtained :
 Insert picture description here
But the previous ones are still in debug mode , To actually run , Need to jump back Data Flow The pipe in which it is located :
 Insert picture description here
Then click debug , As mentioned above , The debug button actually executes the pipeline , So the data is actually calculated and written to the target :
 Insert picture description here
In the data table, you can see that it has actually run :

 Insert picture description here

summary

So far, , We have realized data conversion with data stream . During this presentation , I learned one “ New skills ”, Is simply in Data flow Debugging , The data will not be written to the target , It needs to be executed on the same pipeline .

原网站

版权声明
本文为[Hair dung coating wall]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202280531217422.html