Wildcard Handling:
This usually happens when the file path or dataset isn’t set up to handle the wildcard correctly. You need to make sure the file path in the dataset is configured properly to allow ADF to expand the wildcard and match all the .json files.
To treat *.json as a wildcard filter rather than a literal file name, Azure Data Factory requires that the dataset and Copy Data activity are configured to use dynamic expressions for both the folder path and the file pattern. Here's the approach.
To pass the file name dynamically in Azure Data Factory:
1.Modify the Dataset: Add a parameter called fileName to your lod2_json dataset and set the file path to @{dataset().fileName}.
2.Configure Copy Data Activity: In the Copy Data activity, pass *.json as the value for the fileName parameter.
3.Set File Path: Ensure the file path in the dataset uses the @{dataset().fileName} setup, which will allow the activity to match all .json files in the specified path.
Maintaining Current Pipeline Logic:
You can preserve the current pipeline structure by keeping the dynamic folder path and wildcard selection in place, while ensuring that metadata retrieval correctly identifies the files, and the Copy Data activity can still process all files matching the wildcard without looping over each file individually.
I hope this information helps. Please do let us know if you have any further queries.