0
votes

Forgive me if this is a relatively simple question (I have just picked up Azure Data Factory today) however I have a linked service which points to a hosted .CSV file which I import into a SQL server. The URL I currently use is as follows.

http://download.test.com/exampledownload-2021-07-01.csv

This download gets updated on the first day of the month so what I am trying to do is automate it by creating a dynamic URL which will use the "http://download.test.com/exampledownload-" part of the string, and then add the first day of the current month for the last part of the string, followed by ".csv". So if my pipeline ran in August 2021, it would automatically update the URL to http://download.test.com/exampledownload-2021-08-01.csv.

Is this achievable, and if so can anyone advise the best way of going about this? I have tried the example below however I don't understand the json code part as I can't see this in my ADF?

https://social.msdn.microsoft.com/Forums/azure/en-US/9541b52e-c79e-4e02-b473-acbdfd88f365/dynamic-variable-in-url-in-azure-data-factory-v2?forum=AzureDataFactory

Thanks for any help

1

1 Answers

1
votes

Look for the "Add dynamic content" button as shown.ADF Dynamic content. From there, under functions you will find "date functions" which can help you. Under system variables you will find "Pipeline Trigger time" which you may also find useful. The link you pasted has JSON which is part of the ARM template used when deploying the data factory but you can do it from the portal itself as well. You can also check this link to see how to use dynamic content. Dynamic content