Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

Soda Core | checks.yml for all Tables in Database #356

Open
danielbellhv opened this issue Sep 2, 2022 · 2 comments
Open

Soda Core | checks.yml for all Tables in Database #356

danielbellhv opened this issue Sep 2, 2022 · 2 comments
Labels
bug Something isn't working soda-sql

Comments

@danielbellhv
Copy link

danielbellhv commented Sep 2, 2022

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

  1. Sum of Tables (in Database)
  2. Sum of Columns (across all Tables, in Database)
  3. Sum of Tables' descriptions exist
  4. 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
@danielbellhv danielbellhv added bug Something isn't working soda-sql labels Sep 2, 2022
@danielbellhv
Copy link
Author

I have both a MySQL and PostgreSQL data sources, with many databases in them

@danielbellhv danielbellhv changed the title SodaSQL Core | checks.yml for all Tables in Database Soda Core | checks.yml for all Tables in Database Sep 6, 2022
@Antoninj
Copy link
Contributor

Antoninj commented Sep 7, 2022

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!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working soda-sql
Projects
None yet
Development

No branches or pull requests

2 participants