config.yml file.
The default way to define these is by filling out forms in the GrowthBook UI, which persists them to MongoDB.
The other option is to create a config.yml file, which allows for version control and easier management of your configuration. In the Docker container, this file must be placed at /usr/local/src/app/config/config.yml. Below is an example file:
Data Source Connection Params
The contents of theparams field for a data source depends on the type.
As seen in the example above, you can use environment variable interpolation for secrets (e.g. ${POSTGRES_PW}).
Redshift, ClickHouse, Postgres, and Mysql (or MariaDB)
Snowflake
BigQuery
You must first create a Service Account in Google with the following roles:- Data Viewer
- Metadata Viewer
- Job User
Presto and TrinoDB
Databricks
AWS Athena
If you want GrowthBook to auto-discover credentials from environment variables or instance metadata, use the following format:Data Source Settings
The settings tell GrowthBook how to query your data. There are a couple queries you need to define plus an optional Python script to run queries from inside a Jupyter notebook:Organization Settings
Some organization settings can also be controlled fromconfig.yml.
Below are all of the currently supported settings:
updateSchedule setting has 3 types of values:
- Never update automatically
- Update if data is X hours stale
- Update on a fixed Cron schedule
Unit Dimensions
Unit Dimensions let you join additional tables in order to drill down into your experiment results. Dimensions only have 4 properties: name, datasource, userIdType, and SQL. The SQL query must return two columns: the identifier type andvalue.
Example:
config.yml, it’s not possible to create dimensions via the GrowthBook UI. Everything must be done directly in the config.yml file.
There is an optional environment variable you can specify to change this behavior:
config.yml will be marked as “Official” and not editable, while ones defined via the UI will be editable.
Metrics (Deprecated)
Legacy metrics can be defined in theconfig.yml file as well, although this behavior is deprecated.
If you want to version control metrics, the recommended approach is to integrate your version control system with our API instead. See a guide here for doing this with GitHub.
Below is an example of all the possible settings with comments for legacy metrics defined in config.yml:
timestamp- always requiredvalue- required unless type is set to “binomial”
aggregation setting:
Allow Creating Metrics in the UI
By default, when usingconfig.yml, it’s not possible to create legacy metrics via the GrowthBook UI. Everything must be done directly in the config.yml file.
There is an optional environment variable you can specify to change this behavior:
config.yml will be marked as “Official” and not editable, while ones defined via the UI will be editable.
