I want to take a file from the azure synapse and load it in ADLs using ADf. I want to read the data of the Last 13 months and make a different file for each month. I made a CSV file where I wrote the start date and end date of each month and make a lookup activity over this file. Then using foreach activity, I load the file from the copy activity. Now I want to write a query for each month's data.
select * from edw.factbaldly where INSERT_DATE > @activity('Lookup1').output.value.startdate and INSERT_DATE < @activity('Lookup1').output.value.EndDate
select * from edw.factbaldly where INSERT_DATE > @item().startdate and INSERT_DATE < @item().EndDate'
I use these to queries but not able to read the data of lookup activity and fetch the data. Please help me with the query. Thanks in advance.