question

msv-0386 avatar image
0 Votes"
msv-0386 asked msv-0386 commented

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

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-factorypower-query-not-supported
· 3
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.

Hello @msv-0386,

Just checking in to see if the below answer provided by @Kiran-MSFT helped. If this answers your query, do click Accept Answer and Up-Vote for the same. And, if you have any further query do let us know.

0 Votes 0 ·

Hello @msv-0386,

Following up to see if the below suggestion was helpful. And, if you have any further query do let us know.
Take care & stay safe!

0 Votes 0 ·
msv-0386 avatar image msv-0386 PRADEEPCHEEKATLA-MSFT ·

I did not try this yet. I will keep you informed if it works.

0 Votes 0 ·

1 Answer

Kiran-MSFT avatar image
0 Votes"
Kiran-MSFT answered msv-0386 commented

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.

· 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.

Thanks Kiran. What are the parameters that I need to use to call the data flow activity?. I only have the sql query output of the lookup activity as the parameter

0 Votes 0 ·