Combine columns from two sources

Obaid UrRehman 171 Reputation points
2022-03-24T14:21:49.707+00:00

Hi,

I have two sources resulting from some transformation in data flow:

186419-stream1.png

I have tried using join, it replicates the data no matter join I select it outputs similar stuff:
186408-join.png
I have tried union as well but union either creates null in columns (if done by name) or rows (if done by position)

SHouldnt the jojn just concat the columns together beacuse the IDs are same in both table.

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,624 questions
{count} votes

Accepted answer
  1. Nasreen Akter 10,811 Reputation points Volunteer Moderator
    2022-03-24T17:17:16.777+00:00

    Hi @Obaid UrRehman ,

    Thank you for the ask. As you are joining by ID, that was the expected/correct output you were getting. Main problem here is, the Dataset2 with version does not have any indication which value should be considered for which ID+file. What you can do here:

    Note: I have edited the comments: final output would be something like the foloowing:
    186558-image.png

    • for Dataset1, add a WINDOW 186543-image.png 186497-image.png

    186498-image.png

    186499-image.png

    186466-image.png

    186438-image.png

    -for Dataset2, add SurrogateKey --> WINDOW

    186561-image.png

    186519-image.png
    186556-image.png
    186557-image.png
    186530-image.png
    186467-image.png

    • then do a JOIN with ID = ID and _ID1 = _ID2 186571-image.png

    186509-image.png

    Hope this helps, thanks! :)


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.