How to get the value of a column in Azure Data Factory-Data Flow Activity

msv 1 Reputation point
2021-03-19T18:34:01.427+00:00

Setup: I have a table with 4 columns, table_schema, table_name, column_name and build_sql_query

Issue: In the build_sql_query column I have a sql query built. I need to pass this sql query as a parameter and execute it to get the results. How can I achieve this using data flow mapping?.

Trials: I achieved this using copy activity where I used the lookup activity and passed it parameter into another lookup activity for query option and I was able to get the results. However I want to do this in data flow mapping.

I tried to use the derived column transformation and tried to retrieve build_sql_query values using columns() but it throws me an error right away "The 'columns' function must be enclosed in another function"

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,646 questions
Community Center | Not monitored
{count} votes

1 answer

Sort by: Most helpful
  1. Kiran-MSFT 696 Reputation points Microsoft Employee
    2021-03-20T16:23:00.657+00:00

    You should read this table using a lookup activity and use a foreach to iterate and call the dataflow activity with these as parameters. In the dataflow you can use a source(keep the table/schema & query) parameterized.

    Dataflow will be adding inbuilt support for this. Keep tuned for updates.


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.