How do you connect to different data sources in Power BI, which connection type do you select, and what things must you check before importing via an SQL script?
Asked in the Technical Round stage. Initial technical questions focused on data ingestion and SQL preparation.
Write a PostgreSQL query that audits source transactions before they are imported into Power BI. Identify missing customer relationships, null required fields, non-positive amounts, and duplicate source references.
transaction_id, customer_id, transaction_date, amount, import_status, and validation_issue.Ready only when all checks pass; otherwise mark them Review.transaction_id ascending.source_reference as required, and report issues in this order: Missing customer, Missing transaction date, Missing amount or Non-positive amount, Missing source reference, Duplicate source reference.NULL for validation_issue when no issues exist; otherwise separate multiple issue messages with ; exactly.Duplicate source reference only when a non-NULL source_reference occurs more than once, while retaining every source transaction.NULL transaction_date, amount greater than 0, non-NULL source_reference, and no duplicate reference for Ready.| Column | Type | Description |
|---|---|---|
| transaction_idPK | INT | Unique source transaction identifier |
| customer_id | INT | Customer associated with the transaction |
| transaction_date | DATE | Date the transaction occurred |
| amount | NUMERIC(12,2) | Transaction amount |
| source_reference | VARCHAR(30) | Reference supplied by the source system |
| Column | Type | Description |
|---|---|---|
| customer_idPK | INT | Unique customer identifier |
| customer_name | VARCHAR(100) | Customer display name |
| customer_status | VARCHAR(20) | Current customer status |