Marc de Mas
  • Home
  • Lessons Learned
  • Data Engineering
  • Tools & Automation
  • Analytics
  • BigQuery
  • dbt
  • Python
Lessons LearnedTools & Automation

Auto-Deploying Knowledge Changes Across Repos with GitHub Actions

by Marc 12 March 2026
written by Marc

We have an AI-powered Slack bot that answers business data questions. It uses a knowledge base — schema descriptions, business rules, SQL query patterns — to generate accurate queries. The problem: this knowledge base must stay in sync with two upstream repos. When a BI model changes, the bot needs to know about new dimensions and measures. When dbt models change, the bot needs an updated schema index. Keeping this in sync manually was a recipe for stale knowledge and wrong answers.

Continue Reading
12 March 2026 0 comments
0 FacebookTwitterPinterestEmail
Data EngineeringPython

Incremental Sync: From 35 Minutes to 5 Seconds

by Marc 10 March 2026
written by Marc

Our helpdesk ticket sync to BigQuery was broken. The Cloud Function responsible for it was hitting a 504 gateway timeout after 900 seconds — and the root cause was simple: it was listing every single ticket via the API on every run. With 52,000+ tickets and a page size of 50, that’s over 1,040 API calls before any data lands in BigQuery. Around 35 minutes of sequential HTTP requests, every single time.

Continue Reading
10 March 2026 0 comments
0 FacebookTwitterPinterestEmail
Data EngineeringTools & Automation

Cold Starts Kill Webhooks: Scheduling Cloud Run Min-Instances

by Marc 8 March 2026
written by Marc

We lost ~25 webhook events in 7 minutes because our Cloud Run service was scaling to zero. Here is how I used Cloud Scheduler to toggle min-instances during business hours — and the workaround for Cloud Scheduler not supporting PATCH requests.

Continue Reading
8 March 2026 0 comments
0 FacebookTwitterPinterestEmail
Data EngineeringPython

Migrating a SaaS Helpdesk Connector to a Custom Cloud Run Sync

by Marc 6 March 2026
written by Marc

We had a managed connector (think Fivetran, Airbyte, or similar) syncing our helpdesk data — tickets, contacts, threads, comments — from a SaaS helpdesk platform into BigQuery. It worked fine until it did not: the connector would miss webhook events, lag behind on incremental syncs, and occasionally produce phantom duplicates that our dbt models would faithfully propagate into dashboards. The cost was also non-trivial for what amounted to six tables.

Continue Reading
6 March 2026 0 comments
0 FacebookTwitterPinterestEmail
Data EngineeringLessons Learned

Consolidating GCP Service Accounts: Fewer Keys, Less Chaos

by Marc 5 March 2026
written by Marc

We had four service accounts for BigQuery, one per GCP project. Each had its own JSON key file, its own set of IAM roles, and its own set of problems. When a local CLI tool needed to query production data, it used one key. When it needed to write to the raw data project, it used a different key. Our Slack bot had two keys mounted as secrets. The monitoring scripts had yet another. Every new tool or integration meant figuring out which key to use, and getting it wrong meant cryptic PERMISSION_DENIED errors that could take 20 minutes to debug.

Continue Reading
5 March 2026 0 comments
0 FacebookTwitterPinterestEmail
PythonTools & Automation

Building a Headless BI Usage Scraper with Playwright

by Marc 1 March 2026
written by Marc

Our BI tool does not expose a usage API. So I built a headless Playwright scraper on Cloud Run that logs into the BI platform, scrapes dashboard usage metrics, loads them into BigQuery, and sends weekly Slack summaries. Here is how I handled the hardest part: session management.

Continue Reading
1 March 2026 0 comments
0 FacebookTwitterPinterestEmail
Data EngineeringdbtLessons Learned

DRY Revenue Logic: Extracting a Shared dbt Macro for Partner-Specific Calculations

by Marc 25 February 2026
written by Marc

Revenue numbers that don’t add up are the kind of bug that erodes trust fast. Last month I tracked down a case where a quote adjustment of over two thousand euros was producing zero revenue in our reporting layer. The root cause? Duplicated business logic across two dbt models — logic that had drifted apart over time.

Continue Reading
25 February 2026 0 comments
0 FacebookTwitterPinterestEmail
Data EngineeringdbtLessons Learned

When Your Application Mutates created_at: Fixing Timestamps with CDC History

by Marc 20 February 2026
written by Marc

The application was silently rewriting created_at after record creation, making child records appear older than their parents. Here is how I caught it and fixed it using raw CDC history in the dbt staging layer.

Continue Reading
20 February 2026 0 comments
0 FacebookTwitterPinterestEmail
PythonTools & Automation

Building a Paper Trading Bot on a Raspberry Pi

by Marc 15 February 2026
written by Marc

I built a paper trading bot that runs on a Raspberry Pi 5, executes 8 strategies across stocks and crypto, and has been trading a simulated 10,000 euro portfolio since early 2026. This post covers the technical details: the strategy code, the backtester that validated the strategies against 195,000 candles, the yfinance pitfalls that cost me days of debugging, and the web dashboard that lets me monitor everything from my phone.

Continue Reading
15 February 2026 0 comments
0 FacebookTwitterPinterestEmail
AnalyticsdbtLessons Learned

Double-Counting in Star Schemas: A Subtle Revenue Bug

by Marc 10 February 2026
written by Marc

I spent two days hunting a revenue bug that produced numbers exactly 100 euros off on specific records. The SQL was correct. The data model was correct. The individual fields were correct. The bug was in how I was combining them — a subtle interaction between revision-aware bid fields and delta-based quote adjustment fields in a Unified Star Schema metrics bridge.

Continue Reading
10 February 2026 0 comments
0 FacebookTwitterPinterestEmail
Newer Posts
Older Posts

Recent Posts

  • The Token Diet: Every Call Got Cheaper, the Bill Did Not
  • Too Much Information: How an AI Turned a €300 Dent into a Two-Week Worry
  • We Find Them Faster Than We Fix Them
  • The Human Context Limit
  • Claude Code on Android, Set Up Properly

Recent Comments

  1. A. Esperius on Death by a Thousand €3s: the EU import tax that’s pushing me off AliExpress
  • Linkedin
  • Telegram

© 2026 - NoeMarc. All rights reserved.


Back To Top
Marc de Mas
  • Home
  • Lessons Learned
  • Data Engineering
  • Tools & Automation
  • Analytics
  • BigQuery
  • dbt
  • Python