Connect to Soda Cloud
To use all the features and functionality that Soda Cloud and Soda SQL have to offer, you can install and configure the Soda SQL command-line tool, then connect it to your Soda Cloud account.
Soda SQL uses an API to connect to Soda Cloud. To use the API, you must generate API keys in your Soda Cloud account, then add them to the warehouse YAML file that Soda SQL created. Note that the API keys you create do not expire.
- If you have not already done so, create a Soda Cloud account at cloud.soda.io.
- Use the instructions in Install Soda SQL to install Soda SQL.
- Follow steps in the Quick start tutorial to create your warehouse YAML file, connect to your data source, analyze your datasets, and run a scan on the data.
- Open the
warehouse.yml
file in a text editor, then add the following to the file:soda_account: host: cloud.soda.io api_key_id: env_var(API_PUBLIC) api_key_secret: env_var(API_PRIVATE)
- Save the
warehouse.yml
file. - Open your
~/.soda/env_vars.yml
file in a text editor, then addAPI_PUBLIC:
andAPI_PRIVATE
as per the following:soda_sql_tutorial: POSTGRES_USERNAME: sodasql POSTGRES_PASSWORD: Eg abc123 API_PUBLIC: API_PRIVATE:
- In Soda Cloud, navigate to your avatar > Profile > API Keys, then click the plus icon to generate new API keys.
- Copy the API Key ID, then paste it into the
env_vars.yml
file as the value forAPI_PUBLIC
. - Copy the API Key Secret, then paste it into the
env_vars.yml
file as the value forAPI_PRIVATE
.
- Copy the API Key ID, then paste it into the
- Save the changes to the
env_vars.yml
file. Close the Create API Key dialog box in your Soda Cloud account. - From the command-line, use Soda SQL to scan the datasets in your data source again.
$ soda scan warehouse.yml tables/[datasetname].yml
- Navigate to your Soda Cloud account in your browser and refresh the page. Review the results of your scan in Monitor Results.
Go further
- Learn more about the anatomy of a scan.
- Access historic measurements from the Cloud Metric Store in tests you define in your scan YAML file.
- Learn more about viewing failed rows in Soda Cloud.
- Learn more about Soda Cloud architecture.
Last modified on 10-Aug-22