Parameterize mapping data flow parse transform

Jeff Bader 1 Reputation point
2021-06-14T18:31:50.22+00:00

I have an azure mapping data flow in Synapse. As part of the data flow I need to use the parse transform on an embedded string. The parse transform requires me to define the complex type generated by the parse transform. I can do that for a particular source file. However I would like to be able to parameterize the mapping flow so I can use it to process different files which have different complex types. So what I would like to do is to be able to pass in the complex type definition (or maybe part of the complex type definition) as a parameter to the mapping data flow, rather than having a hardcoded column type in the parse transform. Then in the mapping flow parse transformation be able to dynamically build the output column type from the parameter. Is there a way to do something like this?

Other options I've considered are creating a custom mapping flow for every different source file, or possibly trying to use a conditional split but both of those require dev work for every different source file. It would be nice to have a reusable data flow that I can just parameterize for different source files.

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
4,365 questions
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,533 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Kiran-MSFT 691 Reputation points Microsoft Employee
    2021-06-17T04:27:21.593+00:00

    If this is a parameter you would not be able to do any downstream transformations after parse. What is the purpose of parsing if you don't intent to access any information in it?

    0 comments No comments

  2. Jeff Bader 1 Reputation point
    2021-06-17T15:22:41.217+00:00

    After the parse I do a flatten transaction (using a rule based mapping to flatten an array in the complex type hierarchy) which allows me to save a CSV file. Every different report type needs a different complex type, which after I flatten gives me a different set of columns. I was hoping to create one mapping flow that was dynamic, rather than having to create a mapping flow per different source file.

    0 comments No comments