Unifying Product, Marketing and Operational Data for a Fast-Growing Consumer Platform on a Governed Lakehouse

Discover how Aays helped a services platform move from a Redshift-centred reporting stack to a Databricks Lakehouse, with near-real-time ingestion, privacy controls enforced by Unity Catalog, and a platform its own teams now run in production.
Operational database plus three product and marketing analytics tools, all in one governed platform
Operational data now lands in the lakehouse every 15 minutes
Pipelines, deployment and governance transferred to the client's teams
About the Client
The client is a fast-growing on-demand services platform in India. It connects customers with skilled service partners through a network of city hubs and zones. Every booking, partner shift and job assignment generates operational data, and that data decides how the business schedules, staffs and grows.
The Problem
Could a Legacy Reporting Stack Keep Up With a Business That Moves This Fast?
The client's analytics ran on a familiar stack: PostgreSQL for operational data, Amazon Redshift as the warehouse, Dagster for orchestration, and Superset dashboards and Excel extracts on top. It had served the business well. But as data volumes and reporting needs grew, it started to slow the business down.
Transformation logic lived inside Redshift SQL queries, so every new analytical question meant reworking legacy logic. The same processing was repeated across pipelines. Behavioural data from app-attribution, engagement and product-analytics tools had to be brought alongside operational data before anyone could see the full picture. And with partner and customer information in the mix, governance could not be an afterthought.
The client wanted a platform that could ingest continuously, scale without extra operational effort, protect sensitive data by default, and eventually let business users ask questions in plain English.
The same logic ran in several places, driving up effort and the risk of inconsistent numbers
Analytical rules were buried in Redshift queries that were hard to change or reuse
New analytical use cases took too long to deliver, with Excel filling the gaps
No single, enforced way to protect sensitive fields such as contact details and addresses
The Solution
A Medallion Lakehouse, Built One Source at a Time
Rather than attempt a single big-bang migration, the team built the platform incrementally, one source at a time, on a medallion layout in Databricks. Each source got its own catalog. Raw data lands in Bronze, typed and deduplicated data sits in Silver, and business-ready tables are served from Gold. Shared operational assets, such as configuration and logging, live in a separate platform catalog.
Data lands in Amazon S3 and is picked up by Databricks Auto Loader, which tracks every file it has processed. Each run processes only what is new since the last checkpoint, then stops. That keeps compute cost proportional to data volume and makes every run safe to repeat.
- Operational database, via change data capture: Changes from the PostgreSQL source are captured and streamed to S3. Bronze keeps the full before-and-after record. Silver rebuilds its schema from the incoming data at run time, so new columns and safe type changes are handled automatically, with no code change. Up to 30 Bronze and 20 Silver streams run in parallel, and a change-detection gate skips any Silver table whose Bronze source has nothing new.
- App attribution data: Android and iOS events are ingested separately and cleaned on the way in, with stray quotes removed and placeholder values converted to proper nulls.
- Customer engagement data: Event and campaign data are ingested separately and refined into Silver tables with timestamps standardised to local time. Events are deduplicated using a hash of the raw record, because the source provides no event ID.
- Product analytics data: Events are deduplicated once per micro-batch and merged into two Silver tables. Case variants of the same property are coalesced into one column, and 362 properties are promoted to typed columns. Anything new stays available in the raw payload until it is promoted.
On top of the operational Silver data, the team delivered a Gold table for partner utilisation. It combines data from nine Silver tables to give login, busy and utilised time per partner, hub and day. The tables behind it include partner shifts, job instances, assignments and audit logs, joined with partner, hub, zone and city details. Overlapping shifts are merged into continuous intervals, busy time is clipped to login time, and timestamps are converted to local time. The output is shaped so that a plain sum, grouped by partner and date, always gives the right answer.
Bronze, Silver and Gold layers per source, with raw history preserved
Checkpointed ingestion and key-based merges make every run repeatable
New columns and safe type changes flow through automatically
Locking It Down With Databricks Unity Catalog
Fast data is only useful if it is also protected. Operational data about partners and customers includes emails, phone numbers and addresses, so governance had to be built into the platform from day one. That is where Databricks Unity Catalog came in.
Unity Catalog is Databricks' built-in governance layer for data and AI, sitting underneath every query and every pipeline. The team used it to turn "our sensitive data is protected" from a manual promise into something enforced automatically:
- A catalog per source, a shared platform catalog for operations: Every source follows the same structure and naming, instead of a patchwork of schemas each with its own rules. Configuration, logging and governance assets live together in one shared place.
- Tag-based PII masking, enforced at query time: Columns holding emails, addresses and phone numbers are discovered by name and tagged as PII. An attribute-based access policy then masks every tagged column for regular users, while members of an approved group still see the real values. Masking is defined once and applied everywhere.
- Controlled access to raw data: Bronze catalogs hold unmasked raw payloads, so they are earmarked for engineering groups only. Business users work from the masked Silver and Gold layers.
- External storage, secured and governed: Auto Loader reads from S3 through Unity Catalog external locations, so the same access rules apply no matter where the files physically live.
- Built-in lineage and audit trail: Every table, job and query is traceable end to end, turning a manual compliance exercise into something that is always on.
This is what allows the business to open up data to more people. Self-serve analytics only works when "self" is automatically limited to what each person is cleared to see.
Operations the Client's Team Can Own
Behind the scenes, the team built the operational layer that keeps all of this running without hand-holding:
- Declarative, repeatable deployment: Every job, schedule and parameter is defined as code in a Databricks Asset Bundle and deployed through a GitHub-based CI/CD pipeline, so production changes are reviewed, versioned and reproducible. A smoke test confirms that production runs under the intended service identity.
- Orchestration that matches how the data moves: Operational data refreshes every 15 minutes, product analytics every 20, app attribution every 30 and customer engagement every 6 hours. Each cadence is tuned to its source.
- Logging and monitoring built in: Every table and every run writes status, duration and record counts to a central log, so a daily health check is a single query away.
- Config-driven onboarding: A new operational table is added by uploading a short CSV and triggering a job. Pausing a table or fully reloading one is a configuration change, not a code change.
- A complete runbook: Daily checks, common tasks and troubleshooting steps were documented, and knowledge transfer was delivered, including PII tagging, so the client's team can operate the platform independently.
When the team hit real engineering edge cases, they solved them at the root. Decimal values arriving from the change-data stream in encoded form were decoded to a standard numeric type, and existing tables were converted with a one-time migration. Large backlogs that previously risked timing out can now be re-run with no timeout.
The Impact
From Scattered Pipelines to a Platform the Business Owns
By handover, all four sources were ingested into Bronze, and Silver pipelines were running in production for the operational, customer engagement and product analytics sources. Every item on the handover checklist was signed off: pipelines, code repository, deployment and CI/CD, and PII tagging knowledge transfer. And because Unity Catalog sat underneath every table, speed never came at the cost of safety.
Operational, attribution, engagement and product data in one governed lakehouse
PII masking and lineage enforced centrally, not granted by hand
The client's teams now own deployment, operations and the next phase
Just as important, the team was deliberate about scope. They shipped what the business needed, documented the design limits openly, and handed over a clear list of next steps instead of over-building. These included extending masking to the remaining catalogs, adding a dev target for safer releases, scheduling table optimisation, adding failure alerts and expanding the Gold layer.
Why It Matters
A Foundation for Faster Analytics and AI-Assisted Insights
For a platform whose business runs on timely data about partners, bookings and customers, the value of this engagement is not any single pipeline. It is that the data is now in one place, in a consistent structure, protected by default, and run by the people who depend on it.
That foundation opens the door to the rest of the roadmap, whether that is migrating the remaining Redshift queries and Superset dashboards, giving business users governed natural-language access through Databricks AI/BI Genie, and, in time, machine learning on a single trusted source of truth.
