question

ArundhatiSen-2743 avatar image
0 Votes"
ArundhatiSen-2743 asked AnnuKumari-MSFT commented

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

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

My DataFLow :

1) Source Activity :
185115-image.png

Able to preview Data Correctly :
185189-image.png

2) Flatten Activity :
185116-image.png

185190-image.png

While trying to preview data getting below error :
185241-image.png

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


please can someone replicate the scenario and check where I am going wrong


azure-data-factoryazure-data-lake-storage
image.png (65.7 KiB)
image.png (70.2 KiB)
image.png (98.6 KiB)
image.png (55.6 KiB)
image.png (42.6 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

AnnuKumari-MSFT avatar image
0 Votes"
AnnuKumari-MSFT answered AnnuKumari-MSFT commented

Hi @ArundhatiSen-2743 ,

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




image.png (92.7 KiB)
image.png (63.6 KiB)
image.png (71.3 KiB)
image.png (71.3 KiB)
image.png (86.0 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @ArundhatiSen-2743 ,
Just checking in to see if the above answer helped. Please do consider clicking Accept Answer and Up-Vote for the same as accepted answers help community as well. If you have any further query do let us know.

0 Votes 0 ·