Does ADF provides the functionality to reorder the columns parametrically in Data flow activity.

Bhavya Mishra 1 Reputation point
2021-08-10T05:34:50.803+00:00

I have a very basic requirement to reorder the columns in ADF dataflow activity based on columns i provide in parameters.
For eg :
if the order of columns in source is [col5,col3,col4,col2,col1] i want to reorder it to [col1,col2,col3,col4,col5] parametrically.
([col1,col2,col3,col4,col5] -> i want to provide this order during runtime)
Does ADF supports something like this?

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,975 questions
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
10,808 questions
{count} votes

1 answer

Sort by: Most helpful
  1. HimanshuSinha-msft 19,476 Reputation points Microsoft Employee
    2021-08-11T19:49:34.783+00:00

    Hello @Bhavya Mishra ,
    Thanks for the ask and using the Microsoft Q&A platform .
    You can use a the derived column option .

    122445-image.png

    In the expression add something like

    $columnOrder1

    122380-image.png

    where columnorder is the paramter name

    122439-image.png

    Please do let me know how it goes .
    Thanks
    Himanshu
    Please do consider clicking on "Accept Answer" and "Up-vote" on the post that helps you, as it can be beneficial to other community members

    0 comments No comments

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.