complex json schema not pulling data in dataflow datasource

arkiboys 9,706 Reputation points
2022-03-18T12:33:46.99+00:00

Hello,
I have several complex files... (I closed previous question as I have summarized it all here for simlicity) thank you
Please see attached screenshots. I am unable to pull through the quantities fields from the json file.
Note that the json file is document per line.

In-case it helps, I placed one of the json files (documents per line) into an online json reader and it shows it here, where you can see the quantities are being pulled nicely.

Any suggestions please?
Thank you

184584-1-jsonsample-perlinestructure.png

184585-2-datasetschema.png

184525-3-dspreview.png

184560-4-dataflow-source-setting-documentperline.png

184569-5-dataflow-source-preview.png

184487-6-dataset-schemacode.png

from an online json reader site

184589-image.png

SAMPLE json

------------------

------------------

--File Example 1

-----------------

{"deliveryVenture":"dgdgdg","book":"kjkhjkh","movements":[{"name":"etete","state":"completed","buildDraw":"jhj","planningNumber":"5656fgf","company":"dfgdfgf","movementDate":"2020-02-06","brand":"dfsdf","grade":"jhgj","incoterms":"jhg","quantities":[{"planned":"567","uom":"hj","actual":"456","net":"980","gross":"343"},{"planned":"5675","uom":"tyt","actual":"45","net":"33","gross":"23"}],"locations":[{"name":"source","code":"hjkhjkh","type":"ewrwrw","documentationName":"klkl"},{"name":"destination","code":"jhghjg","type":"ert","documentationName":"kjhk"}],
...
...

--File Example 2

----------------

{"deliveryVenture":"fghfghfh","book":"kjhjk","movements":[{"name":"ljkllhj","state":"completed","buildDraw":"lklk","planningNumber":"98789","company":"jhgjgh","movementDate":"2020-02-06","brand":"jhhhhh","grade":"wewe","incoterms":"FCA","quantities":[{"planned":"76.95","uom":"jj"},{"actual":"23.78","uom":"fff"},{"net":"35.08","uom":"qq"},{"gross":"876.00","uom":"we"}],"locations":[{"name":"source","code":"yutyutu","type":"qwq","documentationName":"ggg"},{"name":"destination","code":"wewewe","type":"Refinery","documentationName":"lll"}],"o
...
...

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

Accepted answer
  1. Nasreen Akter 10,811 Reputation points Volunteer Moderator
    2022-03-18T14:41:39.94+00:00

    Hi @arkiboys ,

    • please create a json file with the following: {
      "deliveryVenture": "dgdgdg",
      "book": "kjkhjkh",
      "movements": [{
      "name": "etete",
      "state": "completed",
      "buildDraw": "jhj",
      "planningNumber": "5656fgf",
      "company": "dfgdfgf",
      "movementDate": "2020-02-06",
      "brand": "dfsdf",
      "grade": "jhgj",
      "incoterms": "jhg",
      "quantities": [{
      "planned": "567",
      "uom": "hj",
      "actual": "456",
      "net": "980",
      "gross": "343"
      }, {
      "planned": "5675",
      "uom": "tyt",
      "actual": "45",
      "net": "33",
      "gross": "23"
      }],
      "locations": [{
      "name": "source",
      "code": "hjkhjkh",
      "type": "ewrwrw",
      "documentationName": "klkl"
      }, {
      "name": "destination",
      "code": "jhghjg",
      "type": "ert",
      "documentationName": "kjhk"
      }]
      }]
      }
    • from the Dataset, locate the JSON file and then import the schema from the connection/store
    • as the sample document only contains one json string, so in the dataflow, change setting to Single Document 184631-image.png
    • now if you go to the data DataFlow--> source--> data preview, you should able to see the array list for quantities

    184539-image.png

    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.