Linc Global, Inc.
Analytics and Reporting Pipeline
Linc's analytics pipeline turned 30M+ shopper events a day into client metrics, scheduled reports, and usage billing. I maintained and extended it, carried its largest change through every layer, then designed and prototyped its replacement, from scheduling to the dashboard.
The pipeline I maintained
- Shopper events land in Elasticsearch, over 30M a day.
- An hourly cron job copies them into event tables.
- Another cron job turns events into metrics rows.
- Dashboards, reports, and billing each run on their own cron.
- No job checks that the one before it finished.
- Older events sit in S3. A backfill restores them by hand.
- Independent cron jobs feed every report. Each new slice adds rows and a new key to each query.
I maintained and extended these Python and SQL jobs, with freshness checks that raised an alert when a stage fell behind. I also added a report rerun worker that claimed each report with a conditional update, so two workers could not both claim the same report.
What one new dimension cost
- The new requirement: group several merchants under one business.
- Events in Elasticsearch now carry a business attribute.
- Event tables store it, normalized so letter case does not matter.
- Metrics rows now key on business and user type.
- Unique shoppers do not add up. Some bought from two merchants.
- So the all-business row is counted from events, never summed.
- Rollups above it skip the business rows, so nothing counts twice.
- Azure SQL and Power BI show each merchant beside the total.
- One new dimension touched every layer, and past months were backfilled by hand.
Metrics were stored one row per slice, so one new dimension meant new event attributes, new keys in nearly every metric query, new Azure sync and Power BI views, and a backfill written by hand. The next slice would cost the same again, and the redesign below is built to remove that cost.
The redesign I proposed and prototyped
- Cron jobs become Airflow DAGs, one per cadence.
- A task starts only after the task before it succeeds.
- The daily DAG waits for the hourly loads it needs.
- A backfill reruns past days through the same tasks.
- Metrics move to columnar tables in BigQuery.
- A new slice is a new column. Queries read only what they need.
- Native BigQuery access needs a Google login for every client.
- Instead, the dashboard passes the Client Portal token.
- The connector checks that token with Linc's server first.
- Airflow coordinates loads and backfills. BigQuery serves each client only its rows.
This was a prototype that ran one metric end to end, from Airflow DAGs through BigQuery to a tenant-scoped Looker Studio dashboard.
At BigObject I later built this tenant-aware reporting path for a new cloud product, with tenant scope enforced in our own API.
More on the prototype
Analytics modernization proof of concept
Prototyped managed Airflow orchestration and designed a tenant-aware Looker Studio path around the Client Portal identity boundary before changing production.
- Problem
- The production pipeline relied on many independently scheduled cron jobs, while native BigQuery access required another Google login and made URL-based tenant isolation unsafe.
- Implementation
- Connected an Amazon MWAA environment to the existing data services, separated migration and metric workloads into DAGs with different cadences, evaluated cross-DAG coordination mechanisms, demonstrated connector-based row isolation over BigQuery, and defined how Client Portal tokens would replace direct client authentication.
- Reasoning
- The primary modernization need was orchestration and access control, not replacing SQL computation with a distributed engine. A bounded proof of concept tested those assumptions without destabilizing the operating pipeline.
- Outcome
- The proof of concept ran one metric end to end on Airflow and BigQuery, with columnar metric definitions as the next step.
The system and its stack
Python, PostgreSQL, MySQL, Elasticsearch, Django, Auth0, SQL, Azure SQL, Power BI, AWS S3, Apache Airflow / Amazon MWAA (POC), BigQuery (POC), Looker Studio (POC)
System map
Product systems
Analytics pipeline
Data products
Prototype
Simplified reconstruction of the system while I was at Linc. Highlighted parts are where I made my largest changes, and the dashed lane is the prototype, which ran one metric end to end on Airflow and BigQuery.
Linc Global was acquired by Capacity.