Forum Discussion
Azure synapse analytics: understand how to find cost per pipeline
Azure Synapse pipelines are billed based on integration runtime usage, Spark pool execution, and Data Flow activity, depending on what your pipeline does, in view of cost esmtation on per pipeline:
1. Track Pipeline Execution Metadata
Use Azure Monitor or Log Analytics to capture:
• Pipeline name
• Start and end time
• Activities used (e.g., Data Flow, Copy, Spark Notebook)
• Integration runtime type (Self-hosted vs Azure IR)
2. Estimate vCore-Hour Consumption
For Spark or Data Flow activities:
• Use Spark pool metrics or Data Flow debug logs to get execution duration.
• Multiply execution time by the number of vCores used.
• Use the regional pricing (e.g., ~$0.138 per vCore-hour).
Data Flow used 8 vCores for 7 minutes
Cost = (8 vCores × 7/60 hours) × $0.138 ≈ $0.13
3. Tag Pipelines by Customer
Use pipeline naming conventions or custom metadata to associate each pipeline with a customer or project.
• You can add tags or use parameters to log customer ID.
• This helps in aggregating costs per customer.
4. Use Azure Cost Management + Custom Tagging
While Synapse doesn’t break down cost per pipeline, you can:
• Tag Synapse resources (e.g., Spark pools, IR) by customer/project.
• Use Azure Cost Management to filter by tags and estimate usage.