Forum Discussion

arkiboys2's avatar
arkiboys2
Helper IV
2 years ago
Solved

reading json file

hello, using the ADF dataflow, I use the flatten activity to read the json file... How can I do this in fabric? thank you
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi arkiboys2 ,

    Thanks for using Fabric Community.
    I tried to upload JSON file into DataFlow Gen 2 and here is my result,

    Sample Json:

    [
        {
            "id": 1,
            "items": [
                {
                    "name": "Headphones",
                    "price": 79.99,
                    "quantity": 1
                },
                {
                    "name": "Notebook",
                    "price": 9.99,
                    "quantity": 2
                }
            ],
            "customer": {
                "name": "Alice Smith",
                "address": {
                    "street": "10 Main St",
                    "city": "Anytown",
                    "state": "CA",
                    "zip": "98765"
                },
                "phone": "555-123-4567"
            }
        },
        {
            "id": 2,
            "items": [
                {
                    "name": "T-Shirt",
                    "price": 14.99,
                    "quantity": 1
                },
                {
                    "name": "Mug",
                    "price": 5.99,
                    "quantity": 1
                },
                {
                    "name": "Pen Set",
                    "price": 3.49,
                    "quantity": 2
                }
            ],
            "customer": {
                "name": "Bob Jones",
                "address": {
                    "street": "25 Elm St",
                    "city": "Springfield",
                    "state": "NY",
                    "zip": "10001"
                },
                "phone": "555-567-8901"
            }
        }
    ]
    

     
    Uploading Json File into Dataflow Gen 2:



    Output in Dataflow Gen 2:


    You can find each and every operation/steps it performed at right corner.

    Can you please upload your json file into dataflow gen2? 

    Hope this is helpful. Please let me know incase of further queries.