Reputation: 1282
I am trying to map a JSON output (in Blob storage) into Azure SQL table (inside Azure Data Factory).
Currently, my JSON file looks like this:
I validated the JSON format of the output file at https://jsonlint.com/, and it looks fine ("Valid Json").
This is setting that I did for JSON file.
This is screenshot when I preview source data (JSON):
I am not sure why it shows as this (having row with "Prop_0".):
This is result when I try to map to Azure SQL table:
What could be the reason that JSON file does not show up with each columns (like "VENDORID", "VENDORNAME", "TOTALPAID" etc.) when I try to connect "Copy data" and map Json file (in Blob storage) to Azure SQL table?
This is additional image after I changed the output file from txt file with .JSON extension to purely JSON file:
This is an error message due to mapping issue (txt --> JSON):
Thanks.
Upvotes: 0
Views: 442
Reputation: 1282
I was able to find the solution by having the data type of JSON on next "Copy data" pointing to the text file (csv) that I used. Even though the file was originally created with DelimitedText (csv) file, when I pointed that same file, but using JSON format, it took it. Then, rest process (mapping to SQL table) worked as expected :)
Upvotes: 0
Reputation: 5034
I see you have, CSV as dataset type created for source, wheras it is a JSON file --> APBILL_output.json
While Creating Source data set for CopyActivity, you would have to choose dataset type as JSON
Example:
Upvotes: 1