Cutting VAT reporting compute costs by over 80% on Snowflake
We rebuilt a costly, hard-to-maintain reporting pipeline into a lean, modular Snowflake setup that is cheaper and faster to run, with identical outputs.
About the client
Global pharmaceutical company running centralized VAT compliance reporting across multiple tax regions.
The challenge
VAT compliance reporting ran on a legacy Snowflake architecture of stored procedures and temporary tables that were costly to run and hard to maintain.
- Monolithic stored procedure running the main reporting flow, hard to maintain and scale
- Wide SAP S/4HANA source tables pushing large volumes of unused data through every run
- Heavy use of temporary tables inflating runtime and obscuring the transformation logic
- Oversized Gen1 warehouse driving high compute cost, with limited visibility into processing
The solution
UD4D refactored the pipeline in two phases, reducing cost and runtime without changing reporting outputs.
- Code and query review of the stored procedure, simplifying the most expensive transformation steps
- Removal of 11 unused source tables and 3,869 unused CRT stage columns, roughly an 88% reduction of columns at that layer
- Replacement of stored procedure logic with modular, parallel Snowflake Dynamic Tables, and removal of all temporary tables
- Filtering moved upstream, plus removal of around 60 of 150 reporting columns
- Documentation of 100+ objects and their columns (~2,500 columns) and right-sizing to an XS (Gen2) warehouse
Business impact
-
83%
lower Snowflake compute
Weekly usage fell from around 61 credits to about 10, an estimated 2,600 credits and roughly $9K saved per year.
-
7x
faster reporting runs
Execution dropped from 40 to 50 minutes to 6 to 7 minutes through parallel processing and simplified logic.
-
88%
smaller processing footprint
Removing 3,869 unused CRT stage columns and redundant reporting columns cut the data handled on every run.
-
100+
objects fully documented
Table and column-level comments across roughly 2,500 columns replaced an opaque monolith with a modular, traceable pipeline.
Frequently asked questions
What was the problem?
VAT compliance reporting ran on a legacy Snowflake architecture of stored procedures and temporary tables that was costly to run and hard to maintain.
How did UD4D refactor it?
In two phases: reviewing and simplifying the stored-procedure logic, removing unused source tables and columns, replacing the stored procedure with modular, parallel Snowflake Dynamic Tables, and right-sizing the warehouse, without changing reporting outputs.
Which technologies were used?
Snowflake with Dynamic Tables, SAP S/4HANA sources and Informatica IICS.
What were the results?
About 83% lower Snowflake compute, roughly 7x faster reporting runs, an 88% smaller processing footprint, and 100+ objects fully documented.