Dual warehouse testing

 
Here is an example I used for product. You will need to change the existing_table config and add any columns you don’t want to check in the exceptions section (because they are new or we don’t expect it to match the old warehouse). The join_keys parameter allows us to specify what we use to join the tables on, it uses an array so we can specify multiple keys in case we can’t rely on a single key. The store failures config tells DBT to store the results of the query and use that to test, this allows us to see why the test failed.
 
Obs: Join keys in the yml must be upper case otherwise the warehouse testing script won’t work correctly.
 
models:
  - name: WC_FACT
    description: "Fact. Contains information for clients"
      tests:
      - dual_warehouse_test:
          existing_table: PROD.ORACLEOACS_SIEBEL.WC_FACT
          exceptions: 
            - ROW_WID
            - ETL_PROC_WID
            - PROD_LN_WID
          join_keys:
            - INTEGRATION_ID
          config:
                store_failures: true 
       - referential_testing:
          new_schema: WH_DW
          new_db: AFG
          old_table: WC_FACT
          old_schema: ORACLEOACS_SIEBEL
          old_db: PROD
          join_keys:
            - INTEGRATION_ID
          exceptions:
          config:
                store_failures: true   
    
 
Join keys in the yml must be upper case otherwise the warehouse testing script won’t work correctly.Here is an example I used for product. You will need to change the existing_table config and add any columns you don’t want to check in the exceptions section (because they are new or we don’t expect it to match the old warehouse). The join_keys parameter allows us to specify what we use to join the tables on, it uses an array so we can specify multiple keys in case we can’t rely on a single key. The store failures config tells DBT to store the results of the query and use that to test, this allows us to see why the test failed.
 
 
Join keys in the yml must be upper case otherwise the warehouse testing script won’t work correctly.Here is an example I used for product. You will need to change the existing_table config and add any columns you don’t want to check in the exceptions section (because they are new or we don’t expect it to match the old warehouse). The join_keys parameter allows us to specify what we use to join the tables on, it uses an array so we can specify multiple keys in case we can’t rely on a single key. The store failures config tells DBT to store the results of the query and use that to test, this allows us to see why the test failed.
 
 
Join keys in the yml must be upper case otherwise the warehouse testing script won’t work correctly.