Dataflow Flatten Activity Failing to unroll due to "no viable alternative at input"

Arundhati Sen 151 Reputation points
2022-03-21T12:50:30.45+00:00

I am trying to read a nested json file and flatten it using dataflow but getting below error. Attaching the source json file [185160-sample-nested-json.txt][1] My DataFLow : 1) Source Activity : ![185115-image.png][2] Able to preview Data Correctly : ![185189-image.png][3] 2) Flatten Activity : ![185116-image.png][4] ![185190-image.png][5] While trying to preview data getting below error : ![185241-image.png][6] Error Message : com.microsoft.dataflow.broker.InvalidOperationException: DSL compilation failed: DF-DSL-001 - DSL stream has parsing errors Line 21 Position 34: no viable alternative at input 'unroll(Technical Descriptions' - RunId: c4d64d1a-f591-47d1-ae47-3d11d039ce08 Attaching DataFlow Script : [185222-dataflow-script.txt][7] please can someone replicate the scenario and check where I am going wrong [1]: /api/attachments/185160-sample-nested-json.txt?platform=QnA [2]: /api/attachments/185115-image.png?platform=QnA [3]: /api/attachments/185189-image.png?platform=QnA [4]: /api/attachments/185116-image.png?platform=QnA [5]: /api/attachments/185190-image.png?platform=QnA [6]: /api/attachments/185241-image.png?platform=QnA [7]: /api/attachments/185222-dataflow-script.txt?platform=QnA

Azure Data Lake Storage
Azure Data Lake Storage
An Azure service that provides an enterprise-wide hyper-scale repository for big data analytic workloads and is integrated with Azure Blob Storage.
1,403 questions
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,977 questions
0 comments No comments
{count} votes

Accepted answer
  1. AnnuKumari-MSFT 31,806 Reputation points Microsoft Employee
    2022-03-22T13:23:22.203+00:00

    Hi anonymous user ,

    Thankyou for using Microsoft Q&A platform and posting your query.

    As I understand from your question, it looks like while flattening the JSON and unrolling the column called 'Technical Descriptions', it's throwing weird error. I tried to reproduce your scenario and faced same error.
    185646-image.png

    Then, I introduced Select Transformation before Flatten transformation and updated the column name from 'Technical Descriptions' to 'TechnicalDescriptions' (without any space) and used the newly introduced column name instead to unroll by inside Flatten transformation. I was able to achieve the desired result.

    Please refer the below image for more details:

    1. Used Select Transformation to update the column name and remove space.

    185654-image.png

    2. In Flatten Transformation , use the updated column to unroll by.

    185684-image.png

    3. Select the items of the array inside 'TechnicalDescriptions' column

    185537-image.png

    4. Data preview is visible.
    185701-image.png

    Hope this will help. Please let us know if any further queries.


    • Please don't forget to click on 130616-image.png or upvote 130671-image.png button whenever the information provided helps you.
      Original posters help the community find answers faster by identifying the correct answer. Here is how
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification
    • If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators
    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful