Start your terminal to use beginner mode.
Scenario
Order data is distributed across three different sources: an API provides order information, a CSV file contains customer details, and a SQLite database stores product information. You need to combine all three sources into a unified report.
Task
Write a Python script at /home/interview/generate_report.py that:
- Fetches order data from the API at
http://api.orders.local/orders - Reads customer data from
/home/interview/customers.csv - Queries product data from the SQLite database at
/home/interview/orders.db(table:products) - Combines all three sources and writes a unified report to
/home/interview/order_report.csv
The report should include: order_id, customer_name, email, country, order_date, status, product_name, quantity, price, total_amount
Calculate total_amount as quantity × price and round to 2 decimal places.
Note: pandas, requests, and sqlite3 are already installed.
Terminal requires a larger screen
Open this page on a desktop or tablet (≥ 768px) to launch the terminal and practice hands-on.
Linux Terminal Environment
Write and execute your solution in the terminal below.
Vercel
Revolut
Accenture
Adobe
Google
LinkedIn
Samsung
Datadog
Wix
Dropbox
Meta
OpenAI
Hulu
Uber
X
DoorDash
Anthropic
Amazon
ActivisionBlizzard
Crypto.Com
Zscaler
DeutscheBank
Apple
GoDaddy
GitLab
BMW
PayPal
Snowflake
AMD
Twilio
Atlassian
JPMorgan
NVIDIA
IBM
Databricks
Coinbase
Cisco
Robinhood
Twitter
Microsoft
Palantir
Netflix
VMware
Cloudflare
Stripe
Lyft
Salesforce
GitHub
Bloomberg
Airbnb
Walmart
SAP
HashiCorp
Instacart
Mastercard
Intel
Visa
Tesla