Azure Data Factory trigger is not initiated when uploading a file using Java SDK
Symptoms:
- Uploading files using Java SDK class DataLakeFileClient fails to initiate the ADF trigger.
- Uploading files using Azure Portal initiates the trigger as expected.
- ADF trigger is configured to ignore empty blobs.
Analysis:
- Whenever a file is created using ADLS Gen2 REST API, there are 3 operations called at the backend i.e. CreateFile, AppendFile and FlushFile.
- Microsoft.Storage.BlobCreated event is triggered when a blob is created or replaced. Specifically, this event is triggered when clients use the CreateFile and FlushWithClose operations that are available in the Azure Data Lake Storage Gen2 REST API.
- As CreateFile API created a 0 byte blob, the event will not be triggered.
Resolution:
- You can initiate the trigger by adding FlushWithResponse method with close parameter as true.
Example:
boolean close = true;
File file = new File("C:\\Users\\mahmoudsamy\\route.txt");
fileClient.uploadFromFile("C:\\Users\\mahmoudsamy\\route.txt");
fileClient.flushWithResponse(file.length(), retainUncomittedData, close, httpHeaders, requestConditions, timeout, contect);
Note: Please make sure to pass the correct parameters when using FlushWithResponse to avoid unexpected results.
Published on:
Learn moreRelated posts
Scalable AI with Azure Cosmos DB – Video Series
Scalable AI in Action with Azure Cosmos DB – A Monthly Partner Showcase As AI continues to reshape industries, customers are seeking scalable,...
Translating Documents with Azure AI Translator's sync API
Discover how to leverage Azure AI Translator's Sync API for real-time document translation, simplifying your workflow and enhancing user exper...
Azure SDK Release (July 2025)
Azure SDK releases every month. In this post, you'll find this month's highlights and release notes. The post Azure SDK Release (July 2025) ap...
Announcing General Availability of UNISTR function and ANSI SQL || Operator in Azure SQL
We’re excited to announce the General Availability (GA) of two long-standing capabilities that address critical needs for SQL developers and e...
Power BI Cognitive Services and Azure Machine Learning features retiring; transition to Fabric AI services
Power BI is retiring Cognitive Services and Azure Machine Learning features by September 15, 2025, transitioning AI capabilities to Microsoft ...
Dynamics 365 Contact Center – Use Azure Communication Service-based SMS Mobile Numbers
How does this affect me? With this feature, Dynamics 365 Contact Center admins can now engage with customers in Australia, Belgium, Denmark, F...
Microsoft Entra: Action Required – Update Conditional Access Policies for Azure DevOps Sign-ins
Microsoft Entra requires updating Conditional Access policies by September 4, 2025, to explicitly include Azure DevOps (App ID: 499b84ac-1321-...
Azure Developer CLI (azd) – July 2025
This post announces the July release of the Azure Developer CLI (`azd`). The post Azure Developer CLI (azd) – July 2025 appeared first o...