dbt
Honeydew dbt integration allows to materialize Honeydew-managed datasets via dbt.
Usage
Given a dynamic dataset named my_dataset_name
create a dbt model called my_dataset_name.sql
.
Put the following in the model code:
This model is now based on semantics defined in Honeydew.
Honeydew dbt Package
Honeydew provides a dbt package to integrate Honeydew with dbt.
High-Level Flow
dbt connects to Honeydew via a Snowflake connection and uses the Honeydew Snowflake Native Application to communicate with Honeydew.
In each run of a dbt model based on Honeydew:
-
dbt connects to Snowflake with the current profile.
-
Within a dbt model, the Honeydew dbt macro initiates a Snowflake call to Honeydew API.
The macro uses the workspace and branch based on the Honeydew variable values set up in the dbt project
-
The Honeydew API client in Snowflake communicates with Honeydew to receive the correct compiled SQL for that branch.
The Snowflake user and role set up in the dbt profile will be used to access Honeydew.
Make sure that the role you use for dbt has access to the Honeydew native application.
A role can be added withSee installation guide for more details.
-
The compiled result of the macro call is the SQL for a Honeydew-based dbt model.
The compiled SQL for a model based on Honeydew is generated for each dbt run, keeping it up to date with the semantic model definitions.
Installation
Honeydew runs in dbt projects connected to Snowflake. To interact with Honeydew, dbt can call the Honeydew Native Application.
Install the Honeydew dbt package by adding to packages.yml
of your dbt project:
Run dbt deps
to apply.
Set the following variables in the dbt project configuration (dbt_project.yml
):
Name | Meaning |
---|---|
honeydew:workspace | Workspace in which to operate. |
honeydew:branch | Branch in which to operate. Default=prod |
honeydew:snowflake_native_app_name | Snowflake native app installed name. Default=SEMANTIC_LAYER_ENTERPRISE_EDITION |
An example dbt_project.yml
configuration:
Testing the integration
Communication details between dbt and Honeydew can be tested with the following call:
That call will provide the details of the operation done by Honeydew. Replace the snowflake
profile with your dbt profile and my_dataset_name
with the dataset name to test.
Extending the integration
Any Honeydew API operation can be added in the following way:
Metadata Sync
dbt Metadata Sync is coming soon.
Honeydew dbt metadata sync will support syncing with dbt the following metadata:
- Source dbt model references (when source dbt model is set for entities)
- Column descriptions
- Labels (as tags)
- General purpose metadata (if set)
Honeydew and different dbt offerings
dbt Core
Honeydew provides a dbt package that integrates with dbt. Using that package, Honeydew can manage dbt models in dbt Core.
Running dbt is based on an external orchestrator such as Airflow.
dbt Cloud
Works with Honeydew in the same way as dbt Core.
There is no need for an external orchestrator. Additional integration is available to link dbt documentation built on a dbt Cloud job and the Honeydew UI .
dbt Semantic Layer
There is no necessity to use the dbt Semantic Layer when using Honeydew. Honeydew metrics can connect to any BI tool directly.
Both can be used in parallel.
There are a number of core differences, such as:
- Composable complex metrics: Honeydew enables a high degree of metric composition, including applying filters, partial aggregations, fan-out joins, multi-hop joins, multiple aggregation steps, time-based logic, and more.
- Context-aware metrics: Honeydew metrics can adjust the user grouping, for example for dynamic ratios or dynamic nested aggregation.
- Reuse metrics in data marts: Honeydew metrics can be directly used to build columns in other tables.
- BI connectivity and Metadata Sync: Honeydew has standard SQL and metadata integrations that support a live connection with most major BI tools.
- Security Model: Honeydew is designed around a user-based security model supporting row-level security and SSO.
- Performance: Honeydew has a number of semantic-aware performance optimization such as aggregate awareness.
FAQ
Was this page helpful?