How to specify the schema in the Checks.yml in the Soda Core

115 Views Asked by At

How to specify the schema in the Checks.yml in the Soda Core

configuration.yml

data_source  my_dataset:

 type: snowflake

 connection:

   username: USERNAME

   password: PWD

   account: ACCOUNT

   database: DBNAME

   warehouse: WAREHOUSE

   connection_timeout: 300

   role: ROLE

   client_session_keep_alive: false

   session_parameters:

schema: schema_1

And in checks.yml

checks for table_1:
  - values in "Year" must exist in schema_2.table_2 YEAR 

Basically my table_1 exist in schema_1 and table_2 exist in schema_2

using schema_2.table_2 will not working because by default the schema_1 will be appended schema_1.schema_2.table_2

How to specify the schema for the table_2 in checks.yml

1

There are 1 best solutions below

0
RakeshV On

So, In this scenario if even schemas of two dataset are different you should create a new data source for that and use cross checks to compare schemas of datasets.

link = https://docs.soda.io/soda-cl/compare.html#compare-data-in-different-data-sources-or-schemas