Problem Statement
In the case of Storage Event trigger framework within Synapse / ADF pipelines, there can be scenarios wherein the pipeline can be triggered on arrival on any file within a blob path.
So in such scenarios, is it possible to get the details of the file ( file name, file path ) that led to the pipeline execution.
Prerequisites
- Synapse / Data Factory
Solution
The storage event trigger captures the folder path and file name of the blob into the properties @triggerBody().folderPath
and @triggerBody().fileName
. To use the values of these properties in a pipeline, you must map the properties to pipeline parameters.
- Add parameters to the Pipeline, say FileName and FilePath
2. Create the Storage Event trigger, and a form will Pop up as below:
Fill all necessary details and click on Continue.
3. Click Continue after validating the details in Data Preview mode, and a new page pops up asking for details for the parameter values.
After mapping the properties to parameters, we can access the values captured by the trigger through the @pipeline().parameters.parameterName
expression throughout the pipeline.
Result
Pipeline
Input Blob
Output