Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started
Connecting Data Sources in Power BI
00:00
5 left

Connecting Data Sources in Power BI

MediumSQL · PostgreSQL

Problem

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.

Output

  1. One row per source transaction, with transaction_id, customer_id, transaction_date, amount, import_status, and validation_issue.
  2. Mark rows as Ready only when all checks pass; otherwise mark them Review.
  3. Order by transaction_id ascending.

Schema

source_transactions
ColumnTypeDescription
transaction_idPKINTUnique source transaction identifier
customer_idINTCustomer associated with the transaction
transaction_dateDATEDate the transaction occurred
amountNUMERIC(12,2)Transaction amount
source_referenceVARCHAR(30)Reference supplied by the source system
source_customers
ColumnTypeDescription
customer_idPKINTUnique customer identifier
customer_nameVARCHAR(100)Customer display name
customer_statusVARCHAR(20)Current customer status
Tablessource_transactionssource_customers
Interviewer

Your question is Connecting Data Sources in Power BI. Start with the requirements and the two tables in the Question tab.

Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.

You need to log in / sign up to run or submit.
CodePostgreSQL
You need to log in / sign up to run or submit.Ln 1
Run your query to see results here.