@Alex Nieto Castro - Thanks for the question and using MS Q&A forum.
To automate your Azure Synapse Analytics pipeline to gather information from the previous day every day, you can use pipeline parameters and expressions to dynamically set the date filter values. Here's a step-by-step guide to achieve this:
Create Pipeline Parameters: Go to your pipeline and click on the 'Parameters' tab. Create two parameters: StartDate and EndDate.
Set Default Values for Parameters: Set the default values for the parameters to dynamic expressions that calculate the previous day's date.
- For StartDate, use the expression: @formatDateTime(addDays(utcnow(), -1), 'yyyy-MM-ddT00:00:00Z')
- For EndDate, use the expression: @formatDateTime(utcnow(), 'yyyy-MM-ddT00:00:00Z')
Modify the Copy Data Activity: Click on the 'Copy data' activity in your pipeline. Go to the 'Source' tab. For the 'Start time (UTC)' and 'End time (UTC)' fields, use the pipeline parameters you created.
- For Start time, use: @pipeline().parameters.StartDate
- For End time, use: @pipeline().parameters.EndDate
Add a Trigger to Run the Pipeline Daily:
- Go back to the pipeline and click on 'Add trigger' > 'New/Edit'.
- Create a new trigger and set it to run every day at your desired time.
- Link this trigger to your pipeline.
Publish Your Changes:
- After making these changes, publish your pipeline.
Hope this helps. Do let us know if you have any further queries.
-------------
If this answers your query, do click `Accept Answer`
and `Yes`
for was this answer helpful. And, if you have any further query do let us know.