Cristian Ispan
Cristian Ispan

Reputation: 764

Current date parameter in Azure DataFactory

I have a pipeline in an Azure DataFactory context. This pipeline has a dataset which is a metadata table and this metadata table needs to be updated regularly. I can update the table using a query in a lookup activity.

The column I need to update contains the date of the last trigger. So, I would like to ask if is there any way of getting the current date as a parameter in the pipeline. If so, I could insert the parameter in my query and update the table.

Upvotes: 2

Views: 37583

Answers (1)

Hury Shen
Hury Shen

Reputation: 15734

You can do it with variable in your azure data factory pipeline.

First click the blank space and define a variable with any value as its default value.

enter image description here

Then add a "Set variable" activity to set the value of the variable. Set its value with @utcnow()

enter image description here

enter image description here

Then you can use the variable in your pipeline.

By the way, if you want to specify the format of utc now, you can use utcNow('<format>'). Please refer to this document.

Upvotes: 5

Related Questions