Thanks to visit codestin.com
Credit goes to github.com

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

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

@danielbellhv

Description

@danielbellhv

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingsoda-sql

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions