Compare data using SodaCL
Learn how to use the Soda Checks Language to compare data across datasets in the same, or different, data sources.
Compare data in the same data source and schema
checks for dim_employee:
- row_count same as dim_department_groupchecks for dim_customers_dev:
- values in (last_name, first_name) must exist in dim_customers_prod (last_name, first_name)- failed rows:
name: Validate that the data is the same as retail customers
fail query: |
with table_1_not_in_table_2 as (
select
*
from retail_customers
except
select
*
from retail_sfdc_customers
)
, table_2_not_in_table_1 as (
select
*
from retail_sfdc_customers
except
select
*
from retail_customers
)
select
'found in retail_sfdc_customers but missing in retail_customers' as directionality,
*
from table_1_not_in_table_2
union all
select
'found in retail_customers but missing in retail_sfdc_customers' as directionality,
*
from table_2_not_in_table_1Compare partitioned data in the same data source but different schemas
Compare data in different data sources or schemas
Compare dates in a dataset to validate event sequence
Go further
Last updated
Was this helpful?
