Hi @Duyen Su
To document Azure Data Factory (ADF) pipeline runs and triggers in Excel or Power BI for reporting purposes, including details like data usage, source, target, and trigger times, you can leverage ADF's monitoring capabilities, REST API, or Power Query to extract the required metadata.
Extract Pipeline Run info:
ADF Monitoring UI: Navigate to the "Monitor" tab in ADF Studio to view pipeline runs. You can filter by time range, status, or pipeline name and export the results manually to CSV for Excel. However, this is limited for automation.
ADF REST API: Use the Pipeline Runs - Query By Factory endpoint to programmatically fetch pipeline run details. This API returns run ID, pipeline name, start/end time, status, and parameters.
Power BI Integration: Use Power BI's Power Query to call the ADF REST API and transform the data into a report. This is ideal for automated, refreshable reports.
Extract Trigger Information
ADF Monitoring UI: Go to the "Monitor" tab, select "Trigger Runs," and view trigger details like trigger name, type, and execution times. Manual export to CSV is possible but not scalable.
ADF REST API: Use the Trigger Runs - Query By Factory endpoint to retrieve trigger run history, including trigger name, type, and start time.
Trigger Metadata: To get trigger schedules (e.g., frequency, interval), query the Triggers - Get endpoint or export the trigger JSON definitions from ADF's "Author" tab. The JSON includes recurrence details (e.g., hourly, daily) and associated pipelines.
Capture Source, Target, and Data Usage
Datasets and Activities: In ADF, pipelines reference datasets (source and sink) in activities (e.g., Copy Activity). Extract dataset details from the pipeline JSON or use the Datasets - List By Factory endpoint to get source (e.g., Azure Blob Storage) and target (e.g., Azure SQL Database) information.
Data Usage Documentation: Manually annotate the purpose of each pipeline (e.g., "ETL for sales reporting") in a separate metadata table or column. Alternatively, use pipeline annotations or parameters to store this information in ADF and extract it via the REST API.
Power BI: Combine dataset details with pipeline run data in Power BI to create a comprehensive report showing source, target, and usage.
Automate Data Extraction for Excel or Power BI
- For Excel:
- Use Azure Logic Apps or a Python script to call the ADF REST API and write results to an Excel file stored in Azure Blob Storage.
- Use Power Query in Excel to connect to the REST API directly and refresh data manually.
- For Power BI:
- Create a Power BI dataflow or dataset using Power Query to call the ADF REST API.
- Transform the JSON response to extract relevant fields (e.g., run ID, pipeline name, trigger time, source, target).
- Build visualizations (e.g., tables, Gantt charts) to show trigger schedules, run history, and data flow.
Ensure you have a Service Principal with Contributor access to ADF for API calls. Authenticate using the App ID and Secret Key.
I hope this information helps. Please do let us know if you have any further queries.
Kindly consider upvoting the comment if the information provided is helpful. This can assist other community members in resolving similar issues.
Thank you.