TESTSTEPCOMPONENTDESCRIPTION
Check source connectionSource extraction
Verify that if you have wrong credentials your job stops (try changing the username to a fake one)
Verify data is loaded into the STGBucket to Staging
Query the "log_files" table and check how many rows have been loaded and rejects into the STG
Verify data is loaded into the ODSStaging to ODS
Query the "log_tabes" table and check how many rows have been loaded and rejects into the ODS
Verify the all STG rows are inserted in the ODSStaging to ODS
Verify that for a same meta_run_id the number of rows inserted in the STG is equal to the one of ODS.
You can verify that in the log_tables .
Verify surrogate key is uniqueBuild Data MartDIM SCD Type1, DIM SCD Type2Verify that the surrogate is unique
Check the soft deletesBuild Data MartDIM SCD Type1, DIM SCD Type2Verify that soft deletes work as expected (deleted_flag='Yes'). You can remove a line from the ODS and rerun the SCD job. You should then generate a delete_flag
Verify updates on a business keyBuild Data MartDIM SCD Type2To perform this test you may need to manually modify data in ODS to simulate changes.
You can modify an ODS record to show that the end date and current_flag is set to false for the existing dimension record. A new line is created with a new dim_key, end_date = '9999-12-31' and current_flag = YES
Dimension does not change if no change in ODSBuild Data MartDIM SCD Type1, DIM SCD Type2Run twice the SCD job (i.e. reprocessing the same file), no change should occur in the dimension table.
Compare dimensions and ODS rowsBuild Data MartDimensions and factsIf ODS is a full extraction then the dimension table should have the same number of rows than a snapshot of ODS.
If you apply filters to build dimension the number will not be equal, you can justify the diffrence
Verify joinsBuild Data Mart
If building your dims or fact involves LEFT JOIN you should have that the number of output rows is equal to the one of input.
Verify surrogate keys in fact tablesBuild Data MartFACTIf your fact tables contains surrogate keys of some dimension tables you must verify that all surrogate keys exists in the dimension table (if they are missing deep dive , it could be that you do not add them in the dimension yet)
Verify log tablesLogs
Verify that the log tables are correctly filled. For instance given a meta_run_id you should be able
Verify columns are correctly mapped


Check on GCS that files is moved to the right bucket/folder...


  • No labels