Configuring Your Project (sbtconf.toml)

Reference for the sbtconf.toml project config file: what's in it, how to add environments, how to switch between them, and how to keep it safe.

Every SBT project has a configuration file named sbtconf.toml in its root folder. It holds your Snowflake connection details and your Insight Cloud API credentials. (TOML is a simple text format for settings files; edit it with any text editor.)

Three facts to keep straight:

  1. It's per-project. Each project folder has its own. Installing SBT does not create one.

  2. It's created by sbt init-config, which asks you questions and writes the file. You can edit it by hand afterward.

  3. SBT reads it from the folder you're standing in. Run sbt commands from the project root, or they won't find your config.

What init-config asks, prompt by prompt

Prompt

What to enter

use_sso

true if you're a person (you'll log in through a browser window via Okta when you run commands). false only for service accounts using a password or key.

seek_sf_account

Your team's Snowflake account identifier. Ask your lead for the standard value.

seek_sf_user

Your own email address.

seek_sf_wh

The warehouse your team uses for dev work.

seek_sf_db

Your personal sandbox database (often SANDBOX_<YOURNAME>). Ask your lead if you don't have one.

seek_sf_private_key

Leave empty. This is the machine-login alternative to SSO, used by automated production runs, not people.

seek_sf_role

Your team's standard dev role.

seek_sf_schema

Your team's standard schema.

seek_api_host

The Insight Cloud API address for your environment (dev: https://cloud-api-dev.seekinsights.com).

seek_api_token

Your own API key; create one per API Keys. Never reuse someone else's.

About block names: init-config names your first configuration default. That name is just a label; some people rename theirs dev and add a second one called stg. The only rule is that the default = "..." line at the top must match the name of a block that exists.

When SSO logs you in: with use_sso = true, running a command like sbt check-conn opens a browser window for Okta login. That's expected.

File structure

The file has two kinds of blocks: dbcon blocks hold Snowflake connection parameters, and seek blocks hold a Seek API host and token. You can define several of each (dev, staging) and switch between them. A filled-in example with two environments:

default = "dev" # Which configuration to use when you don't specify one
py_modules_path = "modules" # Where your Python modules live (init-config sets this for you)

[dbcon.dev] # SF connection called dev
use_sso = true
seek_sf_account = ""
seek_sf_user = ""
seek_sf_wh = ""
seek_sf_db = ""
seek_sf_private_key = "" # leave empty when using SSO
seek_sf_role = ""
seek_sf_schema = ""

[dbcon.stg] # SF connection called stg
use_sso = true
seek_sf_account = ""
seek_sf_user = ""
seek_sf_wh = ""
seek_sf_db = ""
seek_sf_private_key = ""
seek_sf_role = ""
seek_sf_schema = ""

[seek.dev] # Seek API connection called dev
seek_api_host = "https://cloud-api-dev.seekinsights.com"
seek_api_token = ""
default_org = "" # org GUID

[seek.stg] # Seek API connection called stg
seek_api_host = "https://cloud-api-stg.seekinsights.com"
seek_api_token = ""
default_org = "" # org GUID

Switching between configurations

SBT uses the default property unless you say otherwise. For database commands, pass --dbcon <name> (like --dbcon stg). For Seek API commands, pass --environment <name>.

The Seek API token

Commands that talk to the Seek API need an API key in the seek block. To create one, see API Keys.

Validating your config

Run sbt check-conn any time to confirm your Snowflake connection works. Do this after creating or editing the file, and before deploying anything.

Keep it private

sbtconf.toml holds credentials. It is excluded from version control by design. Never commit it, and never paste its contents into Slack, screenshots, or tickets.

The creds/ folder

After you run commands that talk to Insight Cloud, SBT may create a creds/ folder. It's a local credentials cache that SBT manages automatically. Leave it alone, and never commit or share it either.

Related articles