yu-iskw / dbt-ops

A set of dbt macros to maintain dbt projects

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dbt-ops

This dbt package enables us to analyze dbt projects.

Installation Instructions

Check dbt Hub for the latest installation instructions.

Compatibility with dbt Versions and Adapters

This package is designed to work seamlessly with all dbt adapters, ensuring broad compatibility across different databases and SQL dialects.

We have verified that this package functions correctly with dbt Core version 1.5.0 and newer. If you're using an older version of dbt, please consider upgrading to take full advantage of this package's capabilities.

Macros

find_unreferenced_sources

This macro returns a list of unreferenced sources.

Usage:

dbt run-operation find_unreferenced_sources

find_downstream_models

This macro returns a list of downstream models.

Usage:

dbt run-operation find_downstream_nodes --args '{"unique_id": "model.integration_tests.stg_orders", "resource_types": ["model", "snapshot", "exposure"]}'

- 1: model.integration_tests.stg_orders (model:view)
  - 1.1: model.integration_tests.customers (model:view)
  - 1.5: model.integration_tests.orders (model:view)

find_upstream_models

This macro returns a list of upstream models.

Usage:

dbt run-operation find_upstream_nodes --args '{"unique_id": "model.integration_tests.orders", "resource_types": ["model", "snapshot", "source"]}'

- 1: model.integration_tests.orders (model:view)
  - 1.1: model.integration_tests.stg_orders (model:view)
    - 1.1.1: source.integration_tests.main.raw_orders (source)
  - 1.2: model.integration_tests.stg_payments (model:view)
    - 1.2.1: source.integration_tests.main.raw_payments (source)

About

A set of dbt macros to maintain dbt projects

License:Apache License 2.0


Languages

Language:Python 46.4%Language:Shell 35.8%Language:Makefile 17.8%