Azure Data Factory Flatten when IDs are in another Collection - Only one unrollby function allowed with a single expression

Debbie Edwards 521 Reputation points
2022-07-05T17:20:01.47+00:00

I have the following set up

217836-dataflowdfprojection.png

I want to bring in the materials data into SQL but all the IDs that join materials to everything else is in meta. Materials on its own is pretty useless.

But If I use material to unroll by I cant access any of the meta data

I tried unrolling [] but get the error Only one unrollby function allowed with a single expression

So the question is. How do I bring in Meta along with materials using flatten?

If dataflows can't cope with this then where do I go next? basically I cant bring in one of the arrays without that data in Meta or else I have no joins

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

Accepted answer
  1. AnnuKumari-MSFT 34,011 Reputation points Microsoft Employee
    2022-07-06T05:22:42.373+00:00

    Hi @Debbie Edwards ,

    Thanks for using Microsoft Q&A platform and thankyou for posting your question here.

    As I understand your query, you are trying to flatten two properties here, 'material' and 'meta' . However, it's not working and throwing this error 'Only one unrollby function allowed with a single expression'. Please let me know if my understanding is incorrect.

    First of all, you can only unroll a property which is of array type. Here , I can't see 'meta' is an array. To convert 'meta' to an array value, you can use split function in derived column transformation. Post that you can use another flatten transformation to unroll 'meta'. Also, I assume 'material' is one of the hidden properties in the image which should get flattened as it's an array.

    It would be better if you could share the whole JSON content for us to reproduce the scenario and provide better help.

    For more details on Flatten transformation, kindly watch this video: Flatten Transformation in Mapping Data Flow in Azure Data Factory

    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

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.