Passing parameters to REST Linked Service in ADF

Srinivas Mehenderker Nath 86 Reputation points
2023-09-14T10:55:07.2133333+00:00

Hi,

I have a REST api as below :

https://data.fixer.io/api/latest?access_key=4c00166f&base=GBP&symbols=USD

I am trying to parameterize the values for base and symbols, :

rest-api-image3

the tobaseparameter and tocurparameter are of type string.

When I test the connection, it is is showing this message. It seems to be inserting a quote in the parameters due to which it is giving error.

rest-api-image4

I am using the actual working access_key.

I will be calling this REST linked service using Copy Data in the pipeline by passing parameters.

Plesae advice how to fix this.

Regards,

Srinivas

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
0 comments No comments
{count} votes

Answer accepted by question author
  1. Amira Bedhiafi 41,121 Reputation points Volunteer Moderator
    2023-09-14T11:41:05.72+00:00

    From the message you are getting I think that the URL string is not properly constructed since there are unmatched or misplaced characters. Also, the linked service parameters may not be correctly referenced.

    You should follow this syntax :

    @concat('https://data.fixer.io/api/latest?access_key=', 'your_actual_access_key', '&base=', linkedService().tobaseparameter, '&symbols=', linkedService().tocurrparameter)
    

    Test and tell me ! :)

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.