Reputation: 2823
I am trying to adding the following to the directory in Azure Data Factory
sales/@{activity('Lookup Old Watermark').output.firstRow.table_name}/@{formatDateTime(utcnow(),'yyyy')}/@{formatDateTime(utcnow(),'MM')}/@{formatDateTime(utcnow(),'dd')}/@{formatDateTime(utcnow(),'HH')}
But I'm getting the error:
'activity' is not a recognized function
See this screenshot:
Any thoughts?
I should mention, I'm following the steps listed in the image below:
Upvotes: 0
Views: 486
Reputation: 2762
I tried to reproduce the same in my environment and got same error:
The reason for the error is: @activity
is recognized only inside the pipeline, but not dataset
To resolve this error, we need to pass the dynamic content to dataset parameter. Try using the following approach
Step 1: Open dataset and go to parameter section, create parameter.
Step 2: Go to connection section and add dynamic content sales/@{dataset().directort}
.
Step 3: After that, Go to Sink add dynamic content.
In my scenario this my dynamic content: sales/@{activity('Lookup1').output.firstRow.Prop_0}/@{formatDateTime(utcnow(),'yyyy')}/@{formatDateTime(utcnow(),'MM')}/@{formatDateTime(utcnow(),'dd')}/@{formatDateTime(utcnow(),'HH')}
Output:
Upvotes: 1