We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Testing checks with quotes on table names and column names.
row_count
schema
Set up:
Test 001 - row_count check with table name in quotes; works as expected checks.yml:
checks for "dim_account": - row_count > 0
configuration.yml
data_source adventureworks: type: postgres connection: host: db username: postgres password: secret database: postgres schema: public
Scan input: soda scan -d adventureworks -V -c configuration.yml checks.yml
soda scan -d adventureworks -V -c configuration.yml checks.yml
Scan output:
Soda Core 0.0.1 Reading configuration file "configuration.yml" Reading SodaCL file "checks.yml" Scan execution starts Query adventureworks."dim_account".aggregation[0]: SELECT COUNT(*) FROM "dim_account" Scan summary: 1/1 query OK adventureworks."dim_account".aggregation[0] [OK] 0:00:00.034581 1/1 check PASSED: "dim_account" in adventureworks row_count > 0 [PASSED] check_value: 99 All is good. No failures. No warnings. No errors.
Test 002 - schema check; works as expected checks.yml:
checks for dim_account: - schema: warn: when required column missing: [sombrero]
configuration.yml as above
as above
Soda Core 0.0.1 Reading configuration file "configuration.yml" Reading SodaCL file "checks.yml" Scan execution starts Query adventureworks.dim_account.schema[dim_account]: SELECT column_name, data_type, is_nullable FROM information_schema.columns WHERE lower(table_name) = 'dim_account' AND lower(table_catalog) = 'postgres' AND lower(table_schema) = 'public' ORDER BY ORDINAL_POSITION Scan summary: 1/1 query OK adventureworks.dim_account.schema[dim_account] [OK] 0:00:00.118499 1/1 check WARNED: dim_account in adventureworks schema [WARNED] missing_column_names = [sombrero] schema_measured = [account_key integer, parent_account_key integer, account_code_alternate_key integer, parent_account_code_alternate_key integer, account_description character varying, account_type character varying, operator character varying, custom_members character varying, value_type character varying, custom_member_options character varying] Only 1 warning. 0 failure. 0 errors. 0 pass.
Test 003 - schema check with table name in quotes; error checks.yml:
checks for "dim_account": - schema: warn: when required column missing: [sombrero]
Soda Core 0.0.1 Reading configuration file "configuration.yml" Reading SodaCL file "checks.yml" Scan execution starts Query adventureworks."dim_account".schema["dim_account"]: SELECT column_name, data_type, is_nullable FROM information_schema.columns WHERE lower(table_name) = '"dim_account"' AND lower(table_catalog) = 'postgres' AND lower(table_schema) = 'public' ORDER BY ORDINAL_POSITION Metrics schema were not computed for check schema Scan summary: 1/1 query OK adventureworks."dim_account".schema["dim_account"] [OK] 0:00:00.097976 1/1 check NOT EVALUATED: "dim_account" in adventureworks schema [NOT EVALUATED] 1 checks not evaluated. 1 errors. Oops! 1 error. 0 failures. 0 warnings. 0 pass. ERRORS: Metrics schema were not computed for check schema
The text was updated successfully, but these errors were encountered:
@vijaykiran Can you create skipped, failing unit tests and create a new issue for the failing ones?
Sorry, something went wrong.
No branches or pull requests
Testing checks with quotes on table names and column names.
row_count
check with quotes on table name.schema
check without quotes on table name.schema
check with quotes on table name.Set up:
Test 001 -
row_count
check with table name in quotes; works as expectedchecks.yml:
configuration.yml
Scan input:
soda scan -d adventureworks -V -c configuration.yml checks.yml
Scan output:
Test 002 -
schema
check; works as expectedchecks.yml:
configuration.yml
as above
Scan input:
soda scan -d adventureworks -V -c configuration.yml checks.yml
Scan output:
Test 003 -
schema
check with table name in quotes; errorchecks.yml:
configuration.yml
as above
Scan input:
soda scan -d adventureworks -V -c configuration.yml checks.yml
Scan output:
The text was updated successfully, but these errors were encountered: