Search code examples
gooddatacloud-connect

CloudConnect: Dynamic URL in REST Connector


What is the best way to create a dynamic request URL for the REST Connector in CloudConnect?

e.g. I want the URL to be for example www.myservice.com/api/{todays-date}/report.json and the URL must change accordingly everytime the ETL runs.

Is there some way to make this happen by code in CloudConnect? I didn't find any straight forward way but I found that one might be able to import a remote file containing the URL.

Does anyone have experience or tips on this subject?


Solution

  • what should work the best is to generate this parameter (e.g. in Data Generator) or read some data from the source (e.g. list of IDs) and send it to the REST component as an input parameter (e.g. metadata field name is 'today_date', so use ${today_date}). As far as I know this should work.

    Another option is to use a parameter from a *.prm file (like workspace.prm). You can use ${PARAMETER_NAME} in your URL and this should also work correctly.

    Hope this helps.

    Radek