Hello, I’m Basant Bhattarai.
Data & AI Architect · Senior Data Engineer
Data and AI platforms, end to end: designed, measured, built.
9+ years in industry. I architect and build platforms from ingestion to governance, with AI built in: safe, secure, measured.
What I'm hired for
Four problems worth calling me about.
-
Migrations that don't stop the product
Databases and pipelines that have outgrown their design: measure first, stop the damage now, then scale out or migrate in stages with a way back.
- Case study Two Postgres servers that ran out of room: an application database and a vector store, moved to Citus
- Write-up The read replica was meant to take the reports. 3 of 35 finished.
- Code distributed-db-lab A Citus migration planned from the catalog, rebalanced under load
-
Platforms chosen on evidence and run at scale
A platform picked by a proof of concept with criteria fixed in advance, then ingestion, lakehouse and serving that stay correct, recoverable and affordable as volume grows.
- Case study Rebuilding a production data platform for scale and recovery
- Write-up RDS, Citus, TimescaleDB, ClickHouse, Trino, Iceberg or pgvector: choosing where the data lives
- Code spark-sql-kinesis Kinesis source and sink for Spark 4, on Maven Central
-
Governance an auditor can check
Classification, masking, contracts and access review designed into the data model; SOC 2 controls with the evidence each produces; erasure measured, not assumed.
- Case study Leaving Postgres for a managed platform: a reference architecture, measured
- Write-up Erasing one person rewrote 31.8 million rows. With their e-mail in one table, 60,000.
- Code dataset-registry Data contracts that wait for the consumers they break
-
AI built into the platform, measured before launch
Assistants and agents over customer data: isolation enforced outside the model, the business's definitions in a semantic layer, a release gate that tells regression from noise.
- Case study Turning model output into product state you can audit
- Write-up Told to stay in one customer's data, the models leaked 23 times in 120
- Code ai-platform-architecture A reference AI architecture: isolation, accuracy and cost measured
Findings
Measured, with the method in each write-up.
- 40 → 525 ms the product's p95 latency once two analysts' reports ran on its Postgres primary; moved to a read replica, 3 of 35 long reports finished Reference architecture The read replica was meant to take the reports. 3 of 35 finished.
- 11 min billed for a day's build and reports that took 38 seconds on Databricks' smallest SQL warehouse; 95% of it was waiting to stop Reference architecture The day's work took 38 seconds. The warehouse was billed for 11 minutes.
- 31,849,449 rows rewritten to erase one person whose e-mail was copied into every event row; with it kept in one user table, 59,999 Reference architecture Erasing one person rewrote 31.8 million rows. With their e-mail in one table, 60,000.
- 15.1% of a year's revenue landed on the wrong plan when invoices were joined to today's account attributes Lab A Type 1 dimension put 15% of a year's revenue on the wrong plan
- 23 of 120 requests for another customer's data leaked when isolation was left to the prompt; run as the customer's database role, none did Reference architecture Told to stay in one customer's data, the models leaked 23 times in 120
- p = 0.39 A 4.8-point eval drop that 12 changed answers out of 83 could not separate from noise Open source The eval score fell 4.8 points. Twelve answers decided whether it meant anything.