Skip to content

MaterializeInc/materialize-dbt-utils

Repository files navigation

materialize-dbt-utils

This dbt package provides shims for using the following packages with Materialize:

Getting started with dbt + Materialize

Installation

Requirements:

Install this package by adding the following to the packages.yml file in your root dbt project:

packages:
  - package: dbt-labs/dbt_utils
    version: 0.9.5
  - package: MaterializeInc/materialize_dbt_utils
    version: 0.7.0

Then set a dispatch config in your dbt_project.yml:

dispatch:
  - macro_namespace: dbt_utils
    search_order: [materialize_dbt_utils, dbt_utils]
  - macro_namespace: audit_helper
    search_order: [materialize_dbt_utils, audit_helper]

With this project setting, dbt will first search for macro implementations in the materialize_dbt_utils packages when resolving macros from the dbt_utils namespace:

Read the docs for more information on installing packages.

Compatibility

The following sections document the support for each shimmed package.

Name Supported? Notes
equal_rowcount
fewer_rows_than
equality
expression_is_true
recency
at_least_one
not_constant
cardinality_equality
unique_where
not_null_where
not_null_proportion
not_accepted_values
relationships_where
sequential_values
mutually_exclusive_ranges
unique_combination_of_columns
accepted_range
Name Supported? Notes
get_column_values
get_relations_by_pattern
get_relations_by_prefix
get_query_results_as_dict
Name Supported? Notes
date_spine
haversine_distance
group_by
star
union_relations
generate_series
surrogate_key
safe_add
pivot
unpivot
Name Supported? Notes
get_url_parameter
get_url_host
get_url_path
Name Supported? Notes
bool_or Migrated to dbt Core
current_timestamp Migrated to dbt Core
dateadd Migrated to dbt Core
datediff Migrated to dbt Core
split_part Migrated to dbt Core
date_trunc Migrated to dbt Core
last_day Migrated to dbt Core
width_bucket
Name Supported? Notes
pretty_time
pretty_log_format
log_info
slugify
Name Supported? Notes
insert_by_period Materialize natively provides incremental view maintenance.
Name Supported? Notes
compare_relations
compare_queries
compare_column_values
compare_relation_columns