"The length of execution output is over limit (around 4MB currently)" when using "Get Metadata" activity in Azure Data Factory

Mohammad Saber 591 Reputation points
2023-12-10T20:54:44.06+00:00

I want to get a list of files in a Container, Azure Blob Storage using "Get Metadata" activity in Azure Data Factory.

There are many files in the container around 10,000,000.

The activity fails getting the below error:

The length of execution output is over limit (around 4MB currently)

Is there any way that I can apply a filter in this activity to limit the output size?

Or if there is any other solution, please let me know.

Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
3,192 questions
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,624 questions
0 comments No comments
{count} votes

Accepted answer
  1. Anand Prakash Yadav 7,855 Reputation points Microsoft External Staff
    2023-12-11T12:20:36.2366667+00:00

    Hello Mohammad Saber,

    Thank you for posting your query here!

    As we understand the ask here is if there is a way to break the 4MB limit for web activity in ADF.

    Unfortunately, this is a hard limit on Web activity where the response size should be less than or equal to 4MB. This is being called out in the public documentation.

    User's image

    Looks like Azure Resource Manager has limits for API calls. You can make API calls at a rate within the Azure Resource Manager API limits. The maximum size of the API schema that can be used by a validation policy is 4 MB. If the schema exceeds this limit, validation policies will return errors on runtime. For more info please refer to this doc : API Management policies to validate requests and responses

    And as a workaround you may try using ForEach Activity. Maybe you need to use paging query for your rest api/endpoint and return a limited number of the data each time. Then query your data in loop until the number of return data is lower than threshold value. Please refer to this source: Web activity throws overlimit error when calling rest api

    Here is existing feedback on the web activity response size limitation submitted by a user, please feel free to up-vote and comment on it as it would help increase the priority of feature request suggestion. Feedback link: Azure Data Factory - Web Activity - maximize supported output response payload

    Kindly let us know if you have any further queries. I’m happy to assist you further.


    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    2 people found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Subashri Vasudevan 11,226 Reputation points
    2023-12-12T05:48:10.4633333+00:00

    Hi,

    Of course you can use filter in Get Meta Data activity. For doing, this you need to create a data set parameter for file name.

    Screenshot 2023-12-12 at 11.12.54 AM

    This will filter all files that start with A and end with .csv.

    But, if 1000s of files fall under the same filter, again getmeta data activity cant handle >4MB. So it is a must to carefully choose the filter to not exceed 4MB limit.

    thanks

    0 comments No comments

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.