Hi @Purushottam Uppu ,
Welcome to Microsoft Q&A Platform. Thank you for posting your query here.
Please check below detailed explanation of implementing same.
Here, I am having my SQL query in "Query.sql" file on blob storage. Reading data from that "Query.sql" file using lookup activity. Using lookup activity output in copy activity query field dynamically.
Step1: Query.sql file in my blob storage
Step2: Lookup activity in pipeline to get our SQL query from file on blob
Step3: Lookup activity output json shows our SQL query from file.
Step4: Copy Activity. In Source using query option and dynamically running our query from lookup activity output.
Hope this will help. Thank you
--------------------------------------
- Please
accept an answer
if correct. 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.
Hi, @ShaikMaheer-MSFT ,
Am trying to test the same but getting error.
My SQL query is lengthy and has 1500+ lines of code. Hence, am getting "Invalid sql statement" error.
Any suggestion, highly appreciated.
thanks
Purushottam
Hi @Purushottam Uppu ,
Detailed answer shared below for follow up ask. Kindly check and
Accept Answer
. Accepting answer will help community. Thank you.I am also facing the issue and have implemented the workaround by tweaking the datasets. But the lookup activity is having a \r\n at the end of every new line.
For example if the query in sql file is
select
* from
sample
Then the lookup activity output is select \r\n*from\r\nsample even with the row and column delimiter in the dataset as '$'
Please provide your valuable suggestions to resolve the issue.
Sign in to comment