@FerreiraN - Thanks for the question and using MS Q&A platform.
It seems like you are trying to trigger an Azure Synapse pipeline using a storage event trigger, but the trigger is not working when you upload a file using a blob client.
When you upload a file using a blob client, the storage event trigger may not be triggered automatically. This is because the event grid system that triggers the event is not notified when a file is uploaded using a blob client.
To trigger the storage event trigger when you upload a file using a blob client, you can use the Azure Blob Storage SDK to send a message to the event grid system. You can use the BlobClient.beginCopyFromURL()
method to copy the file to the same Blob Storage and trigger the event. Here is an example code snippet:
const { BlobServiceClient } = require("@azure/storage-blob");
const blobServiceClient = BlobServiceClient.fromConnectionString(connectionString);
const containerClient = blobServiceClient.getContainerClient(containerName);
const blobClient = containerClient.getBlobClient(blobName);
const copyResponse = await blobClient.beginCopyFromURL(sourceURL);
In this code snippet, connectionString
is the connection string for your Blob Storage account, containerName
is the name of the container where you want to upload the file, blobName
is the name of the file you want to upload, and sourceURL
is the URL of the file you want to copy.
This code will copy the file to the same Blob Storage and trigger the storage event trigger.
For more details, refer to Azure Data Factory trigger is not initiated when uploading a file using Java SDK.
Hope this helps. Do let us know if you any further queries.
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful. And, if you have any further query do let us know.