Copy Data Import Schemas not working for API call in ADF

L-O-L-A-Lola 26 Reputation points
2021-10-12T21:35:07.247+00:00

In the last 2 weeks, the "Import Schemas" button in the Mapping tab of the Copy Data activity has quit working when the source dataset is an API. This obviously affects new development, but to test it, I attempted to import the schema of an existing working copy activity, and it gave the same error. How can we fix this, and is there a current workaround?

139964-error.jpg

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,528 questions
{count} vote

Accepted answer
  1. ShaikMaheer-MSFT 37,896 Reputation points Microsoft Employee
    2021-10-13T14:32:48.187+00:00

    Hi @L-O-L-A-Lola ,

    Thank you for posting query in Microsoft Q&A Portal and thank you for sharing requested details.

    While, we hit import schema under mappings then ADF actually tries to hit API and get schema of it. But as per your implementation, API hit will get successful only if you run entier pipeline, because you are getting token first and then using that token dynamically inside your copy activity.

    So if you would like to avoid this error of import schema, then please try to follow below steps.

    Step1: Run web activity alone and get token
    Step2: Take that token value and hard code inside copy activity immediately and then try to perform import schema.
    This way, while you perform import schema your copy activity holds correct token in it and API call will get success.

    Please note, usually tokens may have some expiry time too. So make sure you try above steps within that time frame.

    Hope this will help. Please let us know if any further queries.

    ------------------------------

    • Please don't forget to click on 130616-image.png or upvote 130671-image.png button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is how
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification
    • If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators

0 additional answers

Sort by: Most helpful