Link Search Menu Expand Document

Display profile information in Soda Cloud

Last modified on 06-Dec-22

Use the discover datasets and/or profile columns configurations to send information about datasets and columns to Soda Cloud. Examine the profile information to gain insight into the type checks you can prepare to test for data quality.

Requires Soda Cloud

discover datasets:
  datasets:
    - prod_%
    - include prod_%
    - exclude dev_%

profile columns:
  columns:
    - dataset_a.column_a
    - dataset_a.%
    - dataset_%.column_a
    - dataset_%.%
    - %.%
    - include dataset_a.%
    - exclude datset_a.prod_%
    - exclude dim_geography

Prerequisites
Limitations and known issues
Define dataset discovery
Define column profiling
Compute consumption and cost considerations
Optional check configurations
Inclusion and exclusion rules
Go further

Prerequisites

To define discover and profile datasets, follow the guided steps to create a new data source and add the sample configuration in step 4 Discover datasets. Reference the section below for how to configure profiling using SodaCL.

Reference the section below for how to configure profiling in a checks YAML file using SodaCL.

Limitations and known issues

  • Known issue: Currently, SodaCL does not support column exclusion for the column profiling and dataset discovery configurations when connecting to a Spark DataFrame data source (soda-core-spark-df).
  • Data type: Soda can only profile columns that contain NUMBERS or TEXT type data; it cannot profile columns that contain TIME or DATE data.
  • Performance: Both column profiling and dataset discovery can lead to increased computation costs on your datasources. Consider adding these configurations to a selected few datasets to keep costs low. See Compute consumption and cost considerations for more detail.

Define dataset discovery

Dataset discovery captures basic information about each dataset, including a dataset’s schema and the columns it contains. Dataset discovery can be resource-heavy, so carefully consider the datasets about which you truly need information. Refer to Compute consumption and cost considerations for more detail.

This configuration is limited in its syntax variation, with only a couple of mutable parts to specify the datasets from which to gather and send sample rows to Soda Cloud.

The example configuration below uses a wildcard character (%) to specify that, during a scan, Soda Core discovers all the datasets the data source contains except those with names that begin with test_.

discover datasets:
  datasets:
    - include %
    - exclude test_%


You can also specify individual datasets to include or exclude, as in the following example.

discover datasets:
  datasets:
    - include retail_orders


Disable dataset discovery

If your data source is very large, you may wish to disable dataset discovery completely. To do so, you can use the following configuration.

discover datasets:
  datasets:
    - exclude %.%


Scan results in Soda Cloud

  1. To review the discovered datasets in Soda Cloud, first run a scan of your data source so that Soda Core can gather and send dataset information to Soda Cloud.
  2. In Soda Cloud, navigate to the Datasets dashboard, then click a dataset name to open the dataset’s info page.
  3. Access the Columns tab to review the datasets that Soda Core discovered, including the type of data each column contains.

discover datasets

Define column profiling

Column profile information includes details such as the calculated mean value of data in a column, the maximum and minimum values in a column, and the number of rows with missing data. Column profiling can be resource-heavy, so carefully consider the datasets for which you truly need column profile information. Refer to Compute consumption and cost considerations for more detail.

This configuration is limited in its syntax variation, with only a couple of mutable parts to specify the datasets from which to gather and send sample rows to Soda Cloud.

The example configuration below uses a wildcard character (%) to specify that, during a scan, Soda Core captures the column profile information for all the columns in the dataset named retail_orders. The .in the syntax separates the dataset name from the column name.

profile columns:
  columns:
    - retail_orders.%


You can also specify individual columns to profile, as in the following example.

profile columns:
  columns:
    - retail_orders.billing_address

Refer to the top of the page for more example configurations for column profiling.


Disable column profiling

If you wish to disable column profiling completely, so that Soda Cloud profiles no columns at all, you can use the following configuration.

profile columns:
  columns:
    - exclude %.%


Scan results in Soda Cloud

  1. To review the profiled columns in Soda Cloud, first run a scan of your data source so that Soda Core can gather and send column profile information to Soda Cloud.
  2. In Soda Cloud, navigate to the Datasets dashboard, then click a dataset name to open the dataset’s info page.
  3. Access the Columns tab to review the columns that Soda Core profiled.

profile columns

Compute consumption and cost considerations

Both column profiling and dataset discovery can lead to increased computation costs on your datasources. Consider adding these configurations to a selected few datasets to keep costs low.

Discover Datasets

Dataset discovery gathers metadata to discover the datasets in a data source and their columns.

Profile Columns

Column profiling aims to issue the most optimized queries for your data source, however, given the nature of the derived metrics, those queries can result in full dataset scans and can be slow and costly on large datasets. Column profiling derives the following metrics:

Numeric Columns

  • minimum value
  • maximum value
  • five smallest values
  • five largest values
  • five most frequent values
  • average
  • sum
  • standard deviation
  • variance
  • count of distinct values
  • count of missing values
  • histogram

Text Columns

  • five most frequent values
  • count of distinct values
  • count of missing values
  • average length
  • minimum length
  • maximum length

Optional check configurations

Supported Configuration Documentation
  Define a name for sample data configuration. -
  Add an identity to a check. -
  Define alert configurations to specify warn and fail thresholds. -
  Apply an in-check filter to return results for a specific portion of the data in your dataset. -
Use quotes when identifying dataset names; see example.
Note that the type of quotes you use must match that which your data source uses. For example, BigQuery uses a backtick (`) as a quotation mark.
Use quotes in a check
Use wildcard characters ( % with dataset names in the check; see example. -
  Use for each to apply anomaly score checks to multiple datasets in one scan. -
  Apply a dataset filter to partition data during a scan. -

Example with quotes

profile columns:
  columns:
    - include "prod_customer"

Example with wildcards

profile columns:
  columns:
    - retail_orders.%

Inclusion and exclusion rules

  • If you configure discover datasets or profile columns to include specific datasets or columns, Soda implicitly excludes all other datasets or columns from discovery or profiling.
  • If you combine an include config and an exclude config and a dataset or column fits both patterns, Soda excludes the dataset or column from discovery or profiling.

Go further



Was this documentation helpful?

What could we do to improve this page?


Last modified on 06-Dec-22