Zacharias Cura← Selected work

Lazada · SQL · Snowflake

Mapping a 77-Column Lazada Order Report

I traced the 77-column Lazada Seller Center report scope back to warehouse sources and mapped those fields into one Snowflake query. The mapped scope and the validated match result are separate: the documented validation checkpoint reached 39 exact-match columns, with the remaining differences tracked for investigation.

77 columnsmapped in the report scope
39 exact matchesvalidated against Seller Center at the documented checkpoint
6 tables · 2 databasessource data unified in one query path
SnowflakeSQLCTEsPre-aggregationFilter Pushdown

The challenge was not writing 77 SELECT expressions

The difficult part was determining which warehouse sources represented each report field and how to join them without multiplying rows. A report can look correct column-by-column and still be wrong if the joins change the underlying grain.

Join strategy: reduce fan-out before the final query

I used pre-aggregation CTEs for sources that could otherwise create one-to-many joins, then pushed filters as early as practical so the warehouse did not carry unnecessary rows through the full query.

Priority: preserve the report grain first; optimize only in ways that do not change the business meaning of the rows.
Source tables→Filtered CTEs→Pre-aggregation→Controlled joins→77-column output

Validation: mapped scope did not mean 77 exact matches

I treated the Seller Center export as the reference for field-level comparison. At the documented validation checkpoint, 39 of the 77 mapped columns were exact matches. The remaining columns had differences recorded and tracked rather than being presented as fully matched.

This made the work iterative: map a field, compare it, document the difference, then refine the source definition or logic. A mapped field meant it was included in the report reconstruction scope; it did not automatically mean its values already matched Seller Center exactly.

Result: full report scope mapped, with validation status made explicit

77 mapped / 39 exact

The Snowflake query covered the 77-column report scope across six tables and two databases; 39 columns reached exact-match validation, while remaining differences were documented for follow-up.

The project required both report reconstruction and validation. Keeping those two measures separate makes the result more accurate: coverage describes what was mapped, while exact match describes what had been verified against Seller Center.