@Steve Dunker Here are a few approaches to address this challenge and ensure your ADF pipeline waits for the download completion before proceeding:
1. Azure Function Monitoring with Application Insights:
- Integration: Enable Application Insights in your Azure Function. This built-in monitoring tool provides detailed logs about function executions.
- Function Completion Logs: Azure Functions logs information about function start and completion at the "Information" level. You can configure ADF to wait until it sees the "Function completed" log in Application Insights.
- Implementation: Utilize the Azure Monitor data factory activity within your ADF pipeline. Configure it to query Application Insights for the specific "Function completed" log message related to your download function. Once the query finds the log, the ADF pipeline will proceed.
2. Azure Blob Storage Monitoring with Event Grid:
- Concept: Leverage Azure Event Grid, a serverless event routing service. Configure your Azure Blob Storage account to publish an event to Event Grid whenever a new blob (downloaded file) is uploaded.
- ADF Trigger: Set up an ADF pipeline trigger based on the Event Grid event. This ensures the pipeline starts only when a new blob (downloaded file) arrives in storage.
- Drawback: This approach doesn't confirm successful download by the function, only successful upload to storage. Consider additional logging within the function for better tracking.
3. Polling with Logic Apps (For Power Automate alternative):
- Concept: If you're considering switching away from Power Automate due to its asynchronous nature, explore Azure Logic Apps. They offer built-in waiting capabilities.
- Implementation: Create a Logic App workflow that triggers the download function. Within the Logic App, use a "Until" loop configured to poll a specific Azure Function endpoint (returning completion status) until it receives a success response. Once successful, the Logic App can then trigger your ADF pipeline.