Azure Data Factory issue with interpreting url strings with "extra charachter" before and after

Michele Tangorra 0 Reputation points
2024-12-10T16:42:43.95+00:00

Hello. I am using azure data factory, in particular a web activity. In this activity I have to pass a json containing some adf global params. The problem is when the adf global parameter is a url. In such case, Adf automatically interprets the urls as link, hence if I want to get this:
{"param": {"type": "string", "value": "https\:------"}}, I get this {"param": {"type": "string", "value": " https\:------ "}}

Those are interpreted by the call as extra spaces, however not in ADF, since I tried with the replace function to remove, there is no way (so not sure what parameters are there) Same happens in the get function, when I get parameter, if value is url is always surrounded by those chars. I want to to avoid that, how coan I do?

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,623 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Smaran Thoomu 24,110 Reputation points Microsoft External Staff Moderator
    2024-12-16T10:55:24.3466667+00:00

    Hi @Michele Tangorra

    I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others "I'll repost your solution in case you'd like to accept the answer.

    Ask: Hello. I am using azure data factory, in particular a web activity. In this activity I have to pass a json containing some adf global params. The problem is when the adf global parameter is a url. In such case, Adf automatically interprets the urls as link, hence if I want to get this: {"param": {"type": "string", "value": "https:------"}}, I get this {"param": {"type": "string", "value": " https:------ "}}

    Those are interpreted by the call as extra spaces, however not in ADF, since I tried with the replace function to remove, there is no way (so not sure what parameters are there) Same happens in the get function, when I get parameter, if value is url is always surrounded by those chars. I want to to avoid that, how coan I do?

    Solution: While working with API responses and deploying ADF global variables, the issue arises due to misleading display formatting of spaces in the JSON response. Even though spaces may appear visually in the output, they are not actually present when the response is programmatically passed to the next API call.The root cause of the issue was manual copying of the JSON response for testing purposes. Copy-pasting manually retained the displayed spaces, which led to errors. However, when the process is automated—passing the API response directly to the next call—the spaces are ignored, and ADF global variables are deployed correctly without any extra spaces.

    If I missed anything please let me know and I'd be happy to add it to my answer, or feel free to comment below with any additional information.

    If you have any other questions, please let me know. Thank you again for your time and patience throughout this issue.


    Please don’t forget to Accept Answer and Yes for "was this answer helpful" wherever the information provided helps you, this can be beneficial to other community members


Your answer

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