Posted on:
March 20th, 2025
Tips and Tricks #86: Use CQRS for Complex Domain Logic
Separate read and write operations for better scalability and simpler code.
Separate read and write operations for better scalability and simpler code.
Abstract data access logic behind a clean interface for testability and flexibility.
Build modular, tested, documented data transformations with dbt.
Use table partitioning to dramatically speed up queries on large datasets.
Use MERGE (upsert) for safe, rerunnable data pipelines that handle duplicates gracefully.
Calculate running totals, rankings, and moving averages efficiently with SQL window functions.