{"id":18830889,"url":"https://github.com/materializeinc/materialize-dbt-utils","last_synced_at":"2026-01-24T13:30:14.972Z","repository":{"id":39290817,"uuid":"329091543","full_name":"MaterializeInc/materialize-dbt-utils","owner":"MaterializeInc","description":"Utility functions for dbt projects running on Materialize","archived":false,"fork":false,"pushed_at":"2023-11-14T11:09:36.000Z","size":56,"stargazers_count":7,"open_issues_count":2,"forks_count":3,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-02-16T11:43:13.139Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MaterializeInc.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-12T19:32:26.000Z","updated_at":"2024-05-13T18:25:59.000Z","dependencies_parsed_at":"2024-11-08T01:51:27.039Z","dependency_job_id":"81f0b6fa-3a31-4606-af04-91ff3da8d0fe","html_url":"https://github.com/MaterializeInc/materialize-dbt-utils","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaterializeInc%2Fmaterialize-dbt-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaterializeInc%2Fmaterialize-dbt-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaterializeInc%2Fmaterialize-dbt-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaterializeInc%2Fmaterialize-dbt-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MaterializeInc","download_url":"https://codeload.github.com/MaterializeInc/materialize-dbt-utils/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239768943,"owners_count":19693760,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T01:51:13.723Z","updated_at":"2026-01-24T13:30:14.921Z","avatar_url":"https://github.com/MaterializeInc.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# materialize-dbt-utils\n\nThis [dbt](https://github.com/dtb-labs/dbt) package provides shims for using the\nfollowing packages with [Materialize]:\n\n- [dbt-utils](https://github.com/dbt-labs/dbt-utils)\n- [dbt-audit-helper](https://github.com/dbt-labs/dbt-audit-helper)\n\n## Getting started with dbt + Materialize\n\n- [What is dbt?](https://docs.getdbt.com/docs/introduction)\n- [Installation](https://github.com/MaterializeInc/dbt-materialize)\n- Join [dbt's Slack](http://slack.getdbt.com/)\n- Join [Materialize's Slack](https://materialize.com/)\n\n## Installation\n\nRequirements:\n- [dbt-materialize](https://pypi.org/project/dbt-materialize/) v1.3.0+\n- [Materialize](https://materialize.com/docs/install/) v0.43.0+\n\nInstall this package by adding the following to the `packages.yml` file in your\nroot dbt project:\n\n```\npackages:\n  - package: dbt-labs/dbt_utils\n    version: 0.9.5\n  - package: MaterializeInc/materialize_dbt_utils\n    version: 0.7.0\n```\n\nThen set a `dispatch` config in your `dbt_project.yml`:\n\n```yml\ndispatch:\n  - macro_namespace: dbt_utils\n    search_order: [materialize_dbt_utils, dbt_utils]\n  - macro_namespace: audit_helper\n    search_order: [materialize_dbt_utils, audit_helper]\n```\n\nWith this project setting, dbt will first search for macro implementations in\nthe `materialize_dbt_utils` packages when resolving macros from the `dbt_utils`\nnamespace:\n\n[Read the docs](https://docs.getdbt.com/docs/package-management)\nfor more information on installing packages.\n\n## Compatibility\n\nThe following sections document the support for each shimmed package.\n\n### [`dbt-utils` schema tests]\n\nName                               | Supported?         | Notes\n-----------------------------------|--------------------|----------------------------------------------------------------------------\n[`equal_rowcount`]                 | :white_check_mark: |\n[`fewer_rows_than`]                | :white_check_mark: |\n[`equality`]                       | :white_check_mark: |\n[`expression_is_true`]             | :white_check_mark: |\n[`recency`]                        | :white_check_mark: |\n[`at_least_one`]                   | :white_check_mark: |\n[`not_constant`]                   | :white_check_mark: |\n[`cardinality_equality`]           | :white_check_mark: |\n[`unique_where`]                   | :white_check_mark: |\n[`not_null_where`]                 | :white_check_mark: |\n[`not_null_proportion`]            | :white_check_mark: |\n[`not_accepted_values`]            | :white_check_mark: |\n[`relationships_where`]            | :white_check_mark: |\n[`sequential_values`]              | :white_check_mark: |\n[`mutually_exclusive_ranges`]      | :white_check_mark: |\n[`unique_combination_of_columns`]  | :white_check_mark: |\n[`accepted_range`]                 | :white_check_mark: |\n\n### [`dbt-utils` macros]\n\n#### [Introspective macros]\n\nName                          | Supported?         | Notes\n------------------------------|--------------------|------\n[`get_column_values`]         | :white_check_mark: |\n[`get_relations_by_pattern`]  | :white_check_mark: |\n[`get_relations_by_prefix`]   | :white_check_mark: |\n[`get_query_results_as_dict`] | :white_check_mark: |\n\n#### [SQL generators]\n\nName                   | Supported?         | Notes\n-----------------------|--------------------|-------\n[`date_spine`]         | :white_check_mark: |\n[`haversine_distance`] | :white_check_mark: |\n[`group_by`]           | :white_check_mark: |\n[`star`]               | :white_check_mark: |\n[`union_relations`]    | :white_check_mark: |\n[`generate_series`]    | :white_check_mark: |\n[`surrogate_key`]      | :white_check_mark: |\n[`safe_add`]           | :white_check_mark: |\n[`pivot`]              | :white_check_mark: |\n[`unpivot`]            | :white_check_mark: |\n\n#### [Web macros]\n\nName                  | Supported?         | Notes\n----------------------|--------------------|------\n[`get_url_parameter`] | :white_check_mark: |\n[`get_url_host`]      | :white_check_mark: |\n[`get_url_path`]      | :white_check_mark: |\n\n#### [Cross-database macros]\n\nName                  | Supported?         | Notes\n----------------------|--------------------|------\n[`bool_or`]           | :white_check_mark: | Migrated to dbt Core\n[`current_timestamp`] | :white_check_mark: | Migrated to dbt Core\n[`dateadd`]           | :white_check_mark: | Migrated to dbt Core\n[`datediff`]          | :white_check_mark: | Migrated to dbt Core\n[`split_part`]        | :white_check_mark: | Migrated to dbt Core\n[`date_trunc`]        | :white_check_mark: | Migrated to dbt Core\n[`last_day`]          | :white_check_mark: | Migrated to dbt Core\n[`width_bucket`]      | :white_check_mark: |\n\n#### [Jinja helpers]\n\nName                  | Supported?         | Notes\n----------------------|--------------------|------\n[`pretty_time`]       | :white_check_mark: |\n[`pretty_log_format`] | :white_check_mark: |\n[`log_info`]          | :white_check_mark: |\n[`slugify`]           | :white_check_mark: |\n\n### [`dbt-utils` materializations]\n\nName                 | Supported?         | Notes\n---------------------|--------------------|------\n[`insert_by_period`] | :x:                | Materialize natively provides incremental view maintenance.\n\n### [`dbt-audit-helper` macros]\n\nName                          | Supported?         | Notes\n------------------------------|--------------------|------\n[`compare_relations`]         | :white_check_mark: |\n[`compare_queries`]           | :white_check_mark: |\n[`compare_column_values`]     | :white_check_mark: |\n[`compare_relation_columns`]  | :white_check_mark: |\n\n[`accepted_range`]: https://github.com/dbt-labs/dbt-utils#accepted_range-source\n[`at_least_one`]: https://github.com/dbt-labs/dbt-utils#at_least_one-source\n[`bool_or`]: https://docs.getdbt.com/reference/dbt-jinja-functions/cross-database-macros#bool_or\n[`cardinality_equality`]: https://github.com/dbt-labs/dbt-utils#cardinality_equality-source\n[`compare_column_values`]: https://github.com/dbt-labs/dbt-audit-helper#compare_column_values-source\n[`compare_queries`]: https://github.com/dbt-labs/dbt-audit-helper#compare_queries-source\n[`compare_relation_columns`]: https://github.com/dbt-labs/dbt-audit-helper#compare_relation_columns-source\n[`compare_relations`]: https://github.com/dbt-labs/dbt-audit-helper#compare_relations-source\n[`current_timestamp`]: https://github.com/dbt-labs/dbt-utils#current_timestamp-source\n[`date_spine`]: https://github.com/dbt-labs/dbt-utils#date_spine-source\n[`date_trunc`]: https://docs.getdbt.com/reference/dbt-jinja-functions/cross-database-macros#date_trunc\n[`dateadd`]: https://docs.getdbt.com/reference/dbt-jinja-functions/cross-database-macros#dateadd\n[`datediff`]: https://docs.getdbt.com/reference/dbt-jinja-functions/cross-database-macros#datediff\n[`dbt-audit-helper` macros]: https://github.com/dbt-labs/dbt-audit-helper#macros\n[`dbt-utils` macros]: https://github.com/dbt-labs/dbt-utils#macros\n[`dbt-utils` materializations]: https://github.com/dbt-labs/dbt-utils#materializations\n[`dbt-utils` schema tests]: https://github.com/dbt-labs/dbt-utils#schema-tests\n[`equal_rowcount`]: https://github.com/dbt-labs/dbt-utils#equal_rowcount-source\n[`equality`]: https://github.com/dbt-labs/dbt-utils#equality-source\n[`expression_is_true`]: https://github.com/dbt-labs/dbt-utils#expression_is_true-source\n[`fewer_rows_than`]: https://github.com/dbt-labs/dbt-utils#fewer_rows_than-source\n[`generate_series`]: https://github.com/dbt-labs/dbt-utils#generate_series-source\n[`get_column_values`]: https://github.com/dbt-labs/dbt-utils#get_column_values-source\n[`get_query_results_as_dict`]: https://github.com/dbt-labs/dbt-utils#get_query_results_as_dict-source\n[`get_relations_by_pattern`]: https://github.com/dbt-labs/dbt-utils#get_relations_by_pattern-source\n[`get_relations_by_prefix`]: https://github.com/dbt-labs/dbt-utils#get_relations_by_prefix-source\n[`get_url_host`]: https://github.com/dbt-labs/dbt-utils#get_url_host-source\n[`get_url_parameter`]: https://github.com/dbt-labs/dbt-utils#get_url_parameter-source\n[`get_url_path`]: https://github.com/dbt-labs/dbt-utils#get_url_path-source\n[`group_by`]: https://github.com/dbt-labs/dbt-utils#group_by-source\n[`haversine_distance`]: https://github.com/dbt-labs/dbt-utils#haversine_distance-source\n[`insert_by_period`]: https://github.com/dbt-labs/dbt-utils#insert_by_period-source\n[`last_day`]: https://docs.getdbt.com/reference/dbt-jinja-functions/cross-database-macros#last_day\n[`log_info`]: https://github.com/dbt-labs/dbt-utils#log_info-source\n[`mutually_exclusive_ranges`]: https://github.com/dbt-labs/dbt-utils#mutually_exclusive_ranges-source\n[`not_accepted_values`]: https://github.com/dbt-labs/dbt-utils#not_accepted_values-source\n[`not_constant`]: https://github.com/dbt-labs/dbt-utils#not_constant-source\n[`not_null_proportion`]: https://github.com/dbt-labs/dbt-utils#not_null_proportion-source\n[`not_null_where`]: https://github.com/dbt-labs/dbt-utils#not_null_where-source\n[`pivot`]: https://github.com/dbt-labs/dbt-utils#pivot-source\n[`pretty_log_format`]: https://github.com/dbt-labs/dbt-utils#pretty_log_format-source\n[`pretty_time`]: https://github.com/dbt-labs/dbt-utils#pretty_time-source\n[`recency`]: https://github.com/dbt-labs/dbt-utils#recency-source\n[`relationships_where`]: https://github.com/dbt-labs/dbt-utils#relationships_where-source\n[`safe_add`]: https://github.com/dbt-labs/dbt-utils#safe_add-source\n[`sequential_values`]: https://github.com/dbt-labs/dbt-utils#sequential_values-source\n[`slugify`]: https://github.com/dbt-labs/dbt-utils#slugify-source\n[`split_part`]: https://docs.getdbt.com/reference/dbt-jinja-functions/cross-database-macros#split_part\n[`star`]: https://github.com/dbt-labs/dbt-utils#star-source\n[`surrogate_key`]: https://github.com/dbt-labs/dbt-utils#surrogate_key-source\n[`union_relations`]: https://github.com/dbt-labs/dbt-utils#union_relations-source\n[`unique_where`]: https://github.com/dbt-labs/dbt-utils#unique_where-source\n[`unique_combination_of_columns`]: https://github.com/dbt-labs/dbt-utils#unique_combination_of_columns-source\n[`unpivot`]: https://github.com/dbt-labs/dbt-utils#unpivot-source\n[`width_bucket`]: https://github.com/dbt-labs/dbt-utils#width_bucket-source\n[Cross-database macros]: https://docs.getdbt.com/reference/dbt-jinja-functions/cross-database-macros\n[Introspective macros]: https://github.com/dbt-labs/dbt-utils#introspective-macros\n[Jinja helpers]: https://github.com/dbt-labs/dbt-utils#jinja-helpers\n[Materialize]: https://github.com/MaterializeInc/materialize\n[SQL generators]: https://github.com/dbt-labs/dbt-utils#sql-generators\n[Web macros]: https://github.com/dbt-labs/dbt-utils#web-macros\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaterializeinc%2Fmaterialize-dbt-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaterializeinc%2Fmaterialize-dbt-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaterializeinc%2Fmaterialize-dbt-utils/lists"}