Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us at the 2025 Microsoft Fabric Community Conference. March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for $400 discount. Register now

Reply
krishn
Helper I
Helper I

Parametarized relative URL in Microsoft Fabric

Hi, We are very new to Microsoft Fabric. I am trying to create copy activity using REST API linked service. We have to connect to API URL and run daily job supplying Yesterdays date and other parameter values. Manually we were able to pull data (adding parameter values in relative URL) but we need to pass the date values dynamically so we can schedule the job.

Example base URL : https//:api.indigo.com

Relative URL : /z1/ktdata/sale/data/?expd=FALSE&pdt='yesterday date'&offset=0&lmt=10000

where we wanted to pass expd, pdt, lmt values dynamically; especially the pdt which is previous day date in yyyy-mm-dd format.

Any help appreciated.

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

Hi @krishn ,

Thanks for using Fabric Community.
Below steps will help you set previous date dynamically.

1. Add Set Variable with below expression -

@addDays(utcnow(), -1,'yyyy-MM-dd')

vgchennamsft_1-1710482371973.png



2. Use the variable in Copy Activity

vgchennamsft_0-1710482311833.png


Hope this is helpful. Please let me know incase of further queries.



View solution in original post

Anonymous
Not applicable

Hi @krishn ,

We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet .
Otherwise, will respond back with the more details and we will try to help .

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @krishn ,

Thanks for using Fabric Community.
Below steps will help you set previous date dynamically.

1. Add Set Variable with below expression -

@addDays(utcnow(), -1,'yyyy-MM-dd')

vgchennamsft_1-1710482371973.png



2. Use the variable in Copy Activity

vgchennamsft_0-1710482311833.png


Hope this is helpful. Please let me know incase of further queries.



Hi,

I have a bit different question regarind parameterized values in the Relative URL box. I need to pass a value that I'm storing in the Set Variable activity, and need to use it in my relative path address. For example, I'm trying to do the following:

/vehicles/GetModelsForMakeId/@variables('makeIdInt')?format=json

However, it comes back with the following error:  

ErrorCode=RestCallFailedWithClientError,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Rest call failed with client error, status code 404 NotFound, please check your activity settings.
Request URL: https://vpic.nhtsa.dot.gov/vehicles/GetModelsForMakeId/=@variables('makeIdInt')?format=json.
Response: The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.,Source=Microsoft.DataTransfer.ClientLibrary,'

Where you can see that the get request did not use my parameter value. Any ideas?

Anonymous
Not applicable

Hi @krishn ,

We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet .
Otherwise, will respond back with the more details and we will try to help .

Hi Not sure how I missed it, I am happy to accept the solution, I followed the steps with minor changes and successful. Appreciate for help. 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebFBC_Carousel

Fabric Monthly Update - February 2025

Check out the February 2025 Fabric update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.