Environments is currently in Beta. Contact support@honeydew.ai to activate it for your account.
dev1
or use patterns such as dev* to match any branch starting with dev,
or dev[12] to match dev1 or dev2.
A wildcard pattern * can be used as a default option to catch all unmatched branches.
Branch name matching rules are evaluated sequentially, ensuring precise control
over the settings applied to each branch.
Configuration
You can configure environments in the Honeydew UI using the “Workspace actions” menu in the Workspace. For each environment, you can specify the following settings:- Name - the name of the environment.
- Branch pattern - the pattern to match the branch name.
*- matches all branchesprod- matchesprodbranchdev*- matches all branches starting withdevdev_[12]- matchesdev_1anddev_2dev_[!12]- matchesdev_3, but notdev_1anddev_2
- Connector - the data warehouse connector to use (optional). Lets you use different credentials per environment. All connectors must be of the same data warehouse type. See Separate Credentials per Environment.
- Connection settings - the data warehouse connection overrides (optional). The available settings depend on your data warehouse type. For Snowflake these are the Database, Schema, Warehouse, and Role. For Databricks, these are the Catalog, Schema, and Warehouse.
Order of Evaluation
There are a few places in Honeydew where you can configure and override data warehouse connection settings:- Global connection settings (lowest precedence)
- Environment level settings overrides
- Domain level settings overrides (highest precedence)
- You have global connection settings, defining a ROLE and a WAREHOUSE
- You have an environment configuration for the
prodbranch, defining a different ROLE - You have a domain configuration for domain named
sales, defining a different WAREHOUSE
sales domain from the prod branch, Honeydew will use the ROLE from the prod environment configuration and the WAREHOUSE from the sales domain configuration.
The following table shows the different options for defining connection settings and their
order of evaluation. The settings shown are for Snowflake; other data warehouse types have
equivalent settings.
| Setting | Global | Environment | Domain |
|---|---|---|---|
| Database | - | ✅ | - |
| Schema | - | ✅ | - |
| Warehouse | ✅ | ✅ | ✅ |
| Role | ✅ | ✅ | ✅ |
Use-cases
Development and Production Databases / Schemas
When working with multiple environments, it can be important to separate production data from development and testing workflows. For example, in your data warehouse, you may have separate databases for production (PROD) and development (DEV), both sharing the same schema structure. The DEV database is used for testing and development, while PROD is reserved for live, production data. In Honeydew, you can configure two environments to manage these databases effectively: One environment for the prod branch, linked to the PROD database. Another environment for all other branches, linked to the DEV database. This setup ensures that production workflows operate on the correct database while development branches have a safe space to test changes in data. When you switch branches in Honeydew, the connection settings will be automatically adjusted based on the predefined branch name matching rules. When mapping tables to entities, Honeydew will use the connection settings from the active environment. When Honeydew determines the source data of an entity, it will use the Database and Schema settings of the environment to resolve relative table paths in the source data.Warehouse Settings
Environments can help optimize resource allocation by adjusting warehouse settings based on usage needs. For example, you can configure an environment for theprod branch with a larger warehouse to handle higher workloads,
while the dev branch can use a smaller, cost-efficient warehouse.
When switching branches in Honeydew, the warehouse settings will automatically adjust based on predefined branch name rules, ensuring the right resources are used for each environment.
Separate Credentials per Environment
You can configure each environment to use a different data warehouse connector. This is useful when development, QA, and production rely on separate credentials — for example, when each connects to a distinct account or service user. Define a connector per environment so that switching branches automatically uses the matching credentials. For example, theprod branch can use a production connector,
while dev* and qa* branches use development and QA connectors.
All connectors used across a workspace’s environments must be of the same data
warehouse type (for example, all Snowflake or all Databricks). The connector is set
with the dwh_connector_name environment field (see YAML Schema).
Role-based Access Control
Environments can be used to manage role-based access control in Snowflake. For example, you can create a DEV role with access to the DEV database and a PROD role with access to the PROD database, ensuring that users only have access to the data they need for their specific tasks. By configuring environments in Honeydew, you can automatically switch roles based on the active branch, simplifying access management and ensuring data security.YAML Schema
Environments are defined per-workspace, in each workspace’s YAML on theprod branch.
For more details on workspaces YAML format, see workspaces.
The connection settings are defined under a block named for the data warehouse type:
snowflake or databricks. All environments in a workspace use the same block type.
For Snowflake: