This dbt package contains macros that:
- can be (re)used across dbt projects using Presto/Trini
- define implementations of dispatched macros from other packages that can be used on Presto/Trini
This package provides "shims" for:
- dbt-utils (partial)
- dbt-date (partial)
- dbt-expectations (PLANNED!)
Wherever a custom presto macro exists, dbt_utils adapter dispatch will pass to presto_utils
. This means you can just do {{ dbt_utils.dateadd(...) }}
without having to reference presto_utils
.
To make use of these Presto adaptations in your dbt project, you must do two things:
-
Install both and
presto-utils
and any of the compatible packages listed above by them to yourpackages.yml
packages: - package: fishtown-analytics/dbt_utils version: {SEE DBT HUB FOR NEWEST VERSION} # presto_utils is not yet on dbt package hub - git: "https://github.com/calogica/presto-utils.git" revision: main
-
Tell the supported package to also look for the
presto_utils
macros by adding the relevant variables to yourdbt_project.yml
vars: dbt_utils_dispatch_list: ['presto_utils'] dbt_date_dispatch_list: ['presto_utils'] dbt_expectations_dispatch_list: ['presto_utils']