Snowflake to Databricks migration and validation
A marketplace wants to move a Snowflake revenue mart to Databricks so analytics and machine-learning teams can work from the same accepted datasets. Existing finance reports must still explain orders, commissions, refunds and recognition periods. The new platform has value only if those business results remain trustworthy while the operating workload improves.
This illustrative migration scenario starts with a revenue dataset and its consumers. It does not treat a copied fact table as the whole project. Dimensions, nested order attributes, refresh logic, access rules and the reporting calendar all contribute to the final result.
Map a business dependency, not just a table
Inventory the revenue fact, merchant and currency dimensions, adjustment tables, views, refresh jobs and downstream reports. Map a source object such as ANALYTICS.FINANCE.REVENUE to its intended Databricks catalog.schema.table. Mark each target as a source-faithful copy, a materialized business result or a redesigned model.
Preserve stable business identifiers in the landing representation. If target surrogate keys change, maintain an approved crosswalk and prove that it has the intended cardinality before comparing through it. A join that multiplies revenue rows is a transformation defect even when every source identifier appears somewhere on the target.
Record a coherent source boundary and the completed target load for the fact and dependent dimensions. Choose a pilot with refunds, reversals, merchant reclassification and late recognition adjustments. A dimension extracted after a fact can change the report without any missing fact rows. Validate that relationship deliberately instead of treating recent table timestamps as evidence of consistency.
Resolve five contracts before the first result
| Contract | What can go wrong | Acceptance evidence |
|---|---|---|
| Fact identity and dimension joins | Changed surrogate keys multiply or orphan records | Key uniqueness, approved crosswalk and unmatched-dimension checks |
| Timestamp semantics and precision | Revenue moves across periods or distinct events collapse | Explicit instant/wall-clock meaning, timezone and retained precision |
| Nested values and null states | A discount or tax attribute changes meaning | Typed field projections, missing/null cases and array-order rules |
| Exact amounts and transformations | Offsetting errors hide in a grand total | Native exact totals by currency, merchant, period and status |
| Consumer access and report behavior | Privileged validation passes while users see different results | Representative consumer-role checks and accepted report outputs |
Databricks supports VARIANT for semi-structured data. Do not use older migration guidance that says every Snowflake VARIANT must become a string. Choose VARIANT, typed structures or another representation according to the supported target environment and consumer requirements. For validation, still project the fields whose meaning matters; generic JSON string equality is not a semantic comparison contract.
Likewise, do not assume a universal microsecond ceiling. Databricks TIMESTAMP defaults to precision 6 and documents precision 7–9 in Beta. Record what your chosen runtime, table and ingestion path actually preserve. If a source event requires finer precision, test it end to end or retain an approved additional representation; do not silently round until differences disappear.
Build two purposeful comparisons
Follow the Snowflake connection guide and Databricks destination setup. The target comparison principal needs SQL Warehouse access plus access to the selected catalog, schema and objects. These source types are enabled for SmartDiff; the guide is not evidence of a completed live benchmark for your migration.
First compare source-faithful records. Select the Databricks key manually and verify nulls and uniqueness independently; DataDios does not discover Databricks primary-key constraints. Map business columns explicitly, keeping load timestamps separate unless they are part of the acceptance requirement. Compare bounded snapshot tables with aligned cutoffs, or use paired Query Diff projections with equivalent predicates. Metadata filters do not select a row boundary.
Review the Databricks comparison limitations before scanning production-sized objects. Non-batchable keys can cause whole-table reads, and the configured batch size is not a hard memory ceiling. Divide the acceptance work into meaningful scopes and retain a coverage manifest. A passing partition says nothing about an omitted merchant or period.
Second compare the accepted business result. For the revenue mart, use merchant, currency, recognition period and status as the agreed grain. Include adjustments and canceled orders. Keep exact financial reconciliation independent of DataDios double-precision decimal comparison. Use native exact calculations for the amount totals and record the scale and rounding policy with the evidence.
Work through an example discrepancy
The following is a synthetic investigation example, not customer data or measured DataDios performance. A pilot expects 80,000 revenue-line keys after its cutoff:
| Observed cohort | Plausible explanation to test | Investigation step |
|---|---|---|
| 12 source-only keys | A merchant partition was omitted | Check extraction scope and target partition coverage |
| 5 target-only keys | A later adjustment entered the target load | Compare business effective time and source boundary |
| 33 matched lines with net-amount differences | Nested discount fields were parsed differently | Inspect raw nested values and typed discount projections |
| 24 matched lines with recognition-date differences | Session timezone or timestamp conversion changed | Compare the original timestamp meaning and reporting-calendar expression |
The amount and recognition-date cohorts may include the same revenue lines. Do not sum them as distinct changed rows or add missing/new rows to an overall Diffs count that already includes them. These illustrative counts are not a full result summary.
In Results, select the revenue table and use Diff by column on the projected discount or recognition date. Only diffs with inline or side-by-side highlighting makes a missing discount easier to distinguish from changed text formatting. Use deterministic cluster patterns as hypotheses and Summary value frequencies to identify recurring values worth tracing back to nested source fields. Export available table evidence for finance review. Standard clusters retain up to 1,000 examples; an export of retained detail is not a complete exception ledger.
Do not combine all four cohorts into one “migration error rate” and stop. A later adjustment may be valid data outside the agreed boundary, whereas an omitted partition means the wave is incomplete. Inspect several representative keys, establish the full affected scope and assign a correction owner.
For nested discounts, distinguish an absent field, an explicit null, a numeric zero and text that cannot be parsed as an amount. Agree how each state should affect revenue before changing the projection. Preserve array order when position carries business meaning; only normalize order when the business contract explicitly treats the elements as an unordered collection.
After repairing a projection or ingestion segment, repeat both the record-level comparison and grouped revenue checks. A grand total can match while revenue moves between merchants or currencies. Keep the accepted mapping, investigation notes and rerun references together. The shared investigation and performance method provides a reusable evidence structure.
Compare the operating workload on equal terms
Select the nightly revenue refresh plus representative finance queries. Use the same accepted data population, result expectations and concurrency on both platforms. Record warehouse size, cache conditions, refresh frequency, materialization choices and background work. Repeat runs and retain their identifiers; a single fast result is not a reliable operating comparison.
Snowflake Performance Analyzer offers query execution and wait evidence, warehouse compute cost and storage measures. Collection needs access to the relevant account-usage history. Check that the source-history window is complete before interpreting a recent period. Query-level cost is allocated from warehouse compute using execution-time shares and a rate; it is not a separate invoice for each query. Confirm the rate basis, including whether an effective rate or fallback is used.
Databricks query-history metrics separate execution duration, total duration and capacity/compute queue waits. System-table access is required. DBU consumption is not itself currency cost, and the cost workload derives amounts from usage and list-price data rather than a negotiated net invoice. Compare those definitions explicitly before presenting a cost difference as a saving.
Place fixed-window source and target charts on a shared dashboard with clear labels and retain the experiment log alongside them. Native pinning helps reviewers see the evidence together; it does not automatically align query identities, normalize accounting conventions or run a cross-engine benchmark. Measure the business unit that matters, such as an accepted nightly refresh plus its reporting workload, including migration validation reads and parallel operation.
Experiment hypothesis: the target refresh scans unnecessary nested data. Test an explicit typed projection on the same accepted scope, then rerun the refresh and reports. Compare execution and queue time separately, preserve result equality, and assess the measured full-workload cost before adopting the projection.
Approve the mart and its consumers
The acceptance report should state completed scope, source/target boundaries, identity rules, nested-field contract, timestamp policy, exact grouped totals and remaining exceptions. Include corrected-run references, dimension-join checks, report-owner approval and tests under representative consumer access. A privileged comparison account cannot establish that finance users see the intended results.
Record performance conditions and measured outcomes separately from correctness approval. Assign recovery ownership and define how late adjustments would be reconciled if reporting returns to Snowflake. Enterprises can approve one reporting domain at a time; smaller teams can start with the essential close report and expand after a full cycle. Track investigation effort, accepted refresh cost and the work eliminated when duplicate pipelines can safely retire.
Review your Snowflake to Databricks plan