Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I am new to Azure and am trying to see if the below result is achievable with data factory / mapping data flow without Databricks.

I have my csv file with this sample data :

enter image description here

I have following data in my table :

enter image description here

My expected data/ result:

enter image description here

Which transformations would be helpful to achieve this?

Thanks.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
155 views
Welcome To Ask or Share your Answers For Others

1 Answer

Now, you have the RowNumber column, you can use pivot activity to do row-column pivoting.
I used your sample data to made a test as follows:

  1. My Projection tab is like this: enter image description here
  2. My DataPreview is like this: enter image description here
  3. In the Pivot1 activity, we select Table_Name and Row_Number columns to group by. If you don't want Table_Name column, you can delete it here. enter image description here
  4. At Pivote key tab, we select Col_Name column. enter image description here
  5. At Pivoted columns, we must select a agrregate function to aggregate the Value column, here I use max(). enter image description here
  6. The result shows: enter image description here

Please correct me if I understand you wrong in the answer.


update:

  1. The data source like this: enter image description here
  2. The result shows as you saied, ADF sorts the column alphabetically.It seems no way to customize sorting: enter image description here
  3. But when we done the sink activity, it will auto mapping into your sql result table. enter image description here

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...