Project Configuration
Your SBT project requires configuration values in order to connect to your data source and to connect to the Seek Insight Cloud.
SBT commands look for a configuration file named sbtconf.toml
in the root of your project.
Use the sbt init-config
command to create a new sbtconf.toml
file in your project. This command will walk you through setting up one block of configs, then you can customize the file as needed to support multiple configurations.
TOML File Structure
The config file contains two root properties, and two types of blocks: dbcon
and seek
. dbcon
blocks tell SBT connection parameters for a Snowflake connection, and seek
blocks tell SBT a Seek API Host and Token.
Switching Between Configurations
SBT will use the default
property in the config file to determine which configuration to use by default.
When executing commands that run against a database, you can specify which connection to use by passing the --dbcon
option with the name of the connection you want to use. For example, --dbcon dev
.
When executing commands that run against the Seek API, you can specify which Seek environment to use by passing the --environment
flag with the name of the environment you want to use. For example, --environment dev
.
Seek API Token
To run any command that requires a connection to the Seek API, you must provide an API key. You can provide the API key in the sbtconf.toml
file. To see how to create an API key, see Insight Cloud User Settings documentation.
Runtime SeekContext Overrides via TOML
To override default source or param values at runtime, you can add [overrides.myname.sources]
and [overrides.myname.params]
to your sbtconf.toml
file. Then whenever using sbt run
commands, you can pass the --overrides myname
option and we will pull the source and param value mappings from the TOML.
Warning
Because overrides have a period in the name of the TOML key, you must use quotes around the key in the TOML file. See the example below.
Sample TOML Structure
See below for a sample TOML structure.
default="dev" # The default configuration to use
[dbcon.dev] # SF connection called dev
use_sso=true
seek_sf_account=
seek_sf_user=
seek_sf_wh=
seek_sf_db=
seek_sf_schema=
seek_sf_role=
[dbcon.stg] # SF connection called stg
use_sso=false
seek_sf_account=
seek_sf_user=
seef_sf_pass=
seek_sf_wh=
seek_sf_db=
seek_sf_schema=
seek_sf_role=
[dbcon.customer1] # SF connection called customer1
use_sso=true
seek_sf_account=
seek_sf_user=
seek_sf_wh=
seek_sf_db=
seek_sf_schema=
seek_sf_role=
[seek.dev] # Seek API connection called dev
seek_api_host=https://cloud-api-dev.seekinsights.com
seek_api_token=
default_org=
[seek.stg] # Seek API connection called stg
seek_api_host=https://cloud-api-stg.seekinsights.com
seek_api_token=
default_org=
[overrides.myname.sources]
'source.table' = 'mydatabase.myschema.mytable