soda-sql
soda-sql copied to clipboard
Soda Core | checks.yml for all Tables in Database
Goal: run checks.yml
on all Tables in Database, implicitly / dynamically (not naming 100s of Tables).
Following Soda's quick start, I've completed sections:
- Install Soda Core
- Connect Soda Core to a data source -
configuration.yml
Now I'm following Write a check and run a scan - checks.yml
.
Problem
However, the documentation only gives examples for checking one Table each.
4 Checks
- Sum of Tables (in Database)
- Sum of Columns (across all Tables, in Database)
- Sum of Tables' descriptions exist
- Sum of Columns' descriptions exist
Queries return a COUNT()
.
So far, checks.yml
:
# checks for MY_DATABASE:
sql_metrics:
name: num_tables, num_columns
sum_tables query: |
SELECT COUNT(*)
FROM information_schema.tables
WHERE table_schema = '*';
sum_columns query: |
SELECT COUNT(*)
FROM information_schema.columns
WHERE table_name = '*';
sum_tables_descriptions query: |
-- SQL
sum_columns_descriptions query: |
-- SQL
I have both a MySQL and PostgreSQL data sources, with many databases in them
Hi @danielbellhv, Soda SQL will soon be deprecated in favor of Soda Core. It seems to me your issue is actually related to Soda Core rather than to Soda SQL. May I ask you to move it to https://github.com/sodadata/soda-core/issues? Thanks!