1
votes

I am new to the Azure Data Factory scene, trying out the copy data tutorial where I have an InputDataset with emp.txt with the following information:

firstname, lastname
John, Doe
Jane, Doe

And I want to have an OutputDataset in json format.

{
 "firstname" : John,
 "lastname" : Doe
}

How can I set it up correctly in the Pipeline? It keeps telling me sink must be binary when source is binary dataset.

1
Can you please add more context to your scenario e.g. what you are trying to achieve and what your current setup currently looks like? Input file seem to contain csv so why the file extension is txt? where exactly you want to push the data after reading your input file? - Bhushan

1 Answers

1
votes

Your requirement is very common,it could be done in ADF copy activity exactly.Please don't use binary format, use DelimitedText as source dataset and Json as sink dataset instead.

Please see my example:

DelimitedText dataset configuration:

enter image description here

And you could import Schema to check the key-value:

enter image description here

enter image description here

Json dataset configuration:

enter image description here

Select Array of Objects in Json Sink:

enter image description here

Test Output:

enter image description here