Start your terminal to use beginner mode.
Scenario
An SQLite database contains e-commerce data that needs to be exported to Parquet format for analytics processing. The export must preserve table relationships and provide metadata about the conversion.
Task
Write a Python script at /home/interview/export_to_parquet.py that connects to /home/interview/ecommerce.db, extracts all tables, converts each to Parquet format with Snappy compression, and creates a manifest file. Save outputs to /home/interview/parquet_export/ directory.
Note: pandas, pyarrow, and sqlite3 are already installed.
Database Schema
| Table | Columns | Foreign Keys |
|---|---|---|
| customers | id, name, email, created_at | - |
| products | id, name, price, category, stock | - |
| orders | id, customer_id, product_id, order_date, total_amount, status | customer_id → customers.id product_id → products.id |
Manifest Requirements
Create manifest.json containing: export timestamp, compression type, and for each table: table name, file name, row count, file size, and foreign key relationships.
Example Manifest
{
"export_timestamp": "2026-02-13T10:30:00",
"compression": "snappy",
"tables": [
{
"table_name": "orders",
"file_name": "orders.parquet",
"row_count": 200,
"file_size_bytes": 23456,
"foreign_keys": [
{"column": "customer_id", "references_table": "customers", "references_column": "id"}
]
}
]
}
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.
GitLab
TCS
X
Accenture
Adobe
Google
LinkedIn
Samsung
Datadog
Wix
Dropbox
Meta
OpenAI
Hulu
Uber
DoorDash
Anthropic
Amazon
ActivisionBlizzard
Vercel
Crypto.Com
Zscaler
DeutscheBank
Apple
GoDaddy
BMW
PayPal
Snowflake
AMD
Twilio
Atlassian
JPMorgan
NVIDIA
IBM
Databricks
Coinbase
Cisco
Robinhood
Twitter
Microsoft
Palantir
Netflix
VMware
Cloudflare
Stripe
Capital One
Splunk
Intel
SAP
Tesla
GitHub
JaneStreet
Bloomberg
Salesforce
Elastic
CGI
UBS
Ubisoft
Slack
Nintendo
EY
Kayak
Lyft
Airbnb
Walmart
Revolut
Visa
Okta
HashiCorp
Instacart
Mastercard