Describe how you would build a data pipeline in Azure, including how you would use triggers and write 5 to 6 SQL queries using UNION and window functions.
Use Azure Data Factory terminology and the supplied PostgreSQL tables. Provide six queries that demonstrate ingestion monitoring, event consolidation, ranking, and operational reporting.
event_type, event_id, customer_id, event_time, metric, event_rank.event_type, customer_id, event_time descending, then event_id.| Column | Type | Description |
|---|---|---|
| run_idPK | INT | Pipeline execution identifier |
| pipeline_name | VARCHAR(100) | Azure Data Factory pipeline name |
| trigger_type | VARCHAR(40) | Trigger that started the pipeline |
| started_at | TIMESTAMP | Pipeline start timestamp |
| status | VARCHAR(30) | Execution status |
| region | VARCHAR(30) | Processing region |
| Column | Type | Description |
|---|---|---|
| order_idPK | INT | Order identifier |
| customer_id | VARCHAR(20) | Customer identifier |
| order_ts | TIMESTAMP | Order timestamp |
| amount | DECIMAL(12,2) | Order amount |
| status | VARCHAR(30) | Order status |
| region | VARCHAR(30) | Order region |
| Column | Type | Description |
|---|---|---|
| case_idPK | INT | Case identifier |
| customer_id | VARCHAR(20) | Customer identifier |
| opened_at | TIMESTAMP | Case opening timestamp |
| priority | INT | Case priority |
| status | VARCHAR(30) | Case status |
| region | VARCHAR(30) | Case region |