Via Soda Core
Go to the data source reference for Soda Core for more in-depth details about supported data sources and connection parameters.
A data source can be partially onboarded programmatically via Soda Core. Once a data source is fully onboarded via Soda Cloud, the engineering team can onboard datasets programmatically.
In a nutshell, a dataset is pushed onto Soda Cloud by:
Creating a contract YAML that points to that dataset
Pushing the results of the contract onto Soda Cloud
Partially onboard a data source via CLI
This flow shows how to partially onboard a data source programmatically in order to finish setting it up in Soda Cloud.
Create a contract
Run the following:
soda contract create --dataset datasource/db/schema/table --file contract.yaml --data-source ds_config.yml --soda-cloud sc_config.ymlWhen should I use the --use-runner flag?
In some organizations, the data source Admin can create the data source connection in Soda Cloud without onboarding any datasets. Then, engineers can create and publish new contracts to onboard datasets via CLI. Since the data source exists already in Soda Cloud, the --use-runner flag should be used so that the datasets are pushed from Soda Core onto the existing data source through the Runner.
After successfully publishing the contract, you will see a success output:
__| _ \| \ \\
\__ \ ( | | _ \\
____/\___/___/_/ _\\ CLI v4.0.4b24
Fetching datasets configurations from Soda Cloud for datasets '[DatasetIdentifier(data_source='CLI_testing', prefixes=['postgres', 'aldi_local'], dataset='retail_orders')]'
Verifying contract 📜 contract.yaml 🤞
### Contract results for CLI_testing/postgres/aldi_local/retail_orders
+-----------------+-----------------------------------+-------------------------------+-----------+---------------+
| Column | Check | Threshold | Outcome | Diagnostics |
+=================+===================================+===============================+===========+===============+
| [dataset-level] | Schema matches expected structure | level: fail | ✅ PASSED | |
| | | must be less than or equal: 0 | | |
+-----------------+-----------------------------------+-------------------------------+-----------+---------------+
# Summary:
|----------------|---|----|
| Checks | 1 | |
| Passed | 1 | ✅ |
| Failed | 0 | ✅ |
| Warned | 0 | ✅ |
| Not Evaluated | 0 | ✅ |
| Excluded | 0 | ✅ |
| Runtime Errors | 0 | ✅ |
👌 Results sent to Soda Cloud
To view the dataset on Soda Cloud, see https://cloud.us.soda.io/o/<datasetID>/datasets/ab1bc55d-c49a-441e-a0dc-c01857c71b21
Updating post processing stage 'diagnosticWarehouse' to state 'completed' for scan <scanID>
Updated post processing stage 'diagnosticWarehouse' to state 'completed' for scan <scanID>
Complete onboarding via Soda Cloud
If you attempt to use contract verification, you will find the following warning:

If you attempt to access Metric Monitoring capabilities in Soda Cloud, you will find the following warning:

Last updated
Was this helpful?
