Skip to content
This repository has been archived by the owner on Sep 26, 2022. It is now read-only.

jgensler8/dbt-citus

Repository files navigation

dbt logo

dbt enables data analysts and engineers to transform their data using the same practices that software engineers use to build applications.

dbt is the T in ELT. Organize, cleanse, denormalize, filter, rename, and pre-aggregate the raw data in your warehouse so that it's ready for analysis.

Citus

Postgres-inherited dbt adapter for Citus database. Many parts copied from dbt-greenplum

Materializing a Distributed Table

via create_distributed_table

{{
  config(materialized='table', distribution_column='name')
}}
arg name required default value
distribution_column no None

Testing

Citus provides an easy way to spin up a local cluster via docker:

git clone https://github.com/citusdata/docker
cd docker
docker compose up --scale worker=1

Now, you can run the integration tests in this repo:

pytest .\tests\functional\adapter\test_distributed.py

Notes

To understand the inner workings, check out the citus__create_table_as macros definite in adapters.sql

{% macro citus__create_table_as(temporary, relation, sql) %}
...
{% endmacro %}

Join the dbt Community

Reporting bugs and contributing code

Code of Conduct

Everyone interacting in the dbt project's codebases, issue trackers, chat rooms, and mailing lists is expected to follow the dbt Code of Conduct.

About

Adaptation postgres adapter for Citus

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages