Hi @Kayode Ogidan
Welcome to Microsoft Q&A platform and thanks for posting your question here.
To send invoices to the correct temp tables in Business Central, you need to create a mapping of address values to relative URLs in a CSV file stored in blob storage. This mapping will help you determine the correct URL for each invoice based on its address value.
In your Azure Data Factory pipeline, you can use a Lookup activity to retrieve this mapping from the CSV file. The Lookup activity will read the CSV file and return the mapping as a dataset that you can use in your pipeline.
Next, you can use a Derived Column in your data flow to determine the correct relative URL for each invoice based on its address value. The Derived Column will use the mapping dataset returned by the Lookup activity to look up the correct relative URL for each invoice.
To dynamically construct the URL, you can create a new parameter in your REST sink dataset called RelativeUrl
.. This parameter will be used to construct the URL dynamically based on the correct relative URL for each invoice. You can use this parameter in the dataset's connection properties to dynamically construct the URL.
Finally, in the Sink settings of your data flow, you can use dynamic content to reference the RelativeUrl
.parameter and pass the correct URL to the REST sink dynamically. This will ensure that each invoice is sent to the correct temp table in Business Central.
Regarding the encoding of spaces as %20, the ADF automatically encodes spaces as %20 in URLs, so there's no need to manually encode them. it's still a good practice to double-check that spaces are correctly encoded in your CSV file or during URL construction in ADF to avoid any potential issues.
Reference
https://learn.microsoft.com/en-us/answers/questions/1083901/how-can-i-parameterize-rest-api-dataset-or-linked
https://stackoverflow.com/questions/63861942/where-to-specify-rest-api-parameter-for-get-method-in-adf-web-activity
I hope this information helps you. Let me know if you have any further questions or concerns.