Skip to content

Tutor plugin to extend the existing transformations in aspects-dbt using a custom dbt package.

License

Notifications You must be signed in to change notification settings

edly-io/tutor-dbt

Repository files navigation

dbt plugin for Tutor

Tutor plugin to extend the existing transform in aspects-dbt using a custom dbt package.

This plugin greatly reduces the effort required to add custom transforms to the aspects-dbt transformations.

Installation

pip install git+https://github.com/edly-io/tutor-dbt

Usage

First, we need to enable the aspects plugin and then the dbt plugin.

tutor plugins enable aspects
tutor config save
tutor plugins enable dbt
tutor config save

Now, we need to add our custom transforms. This plugin contains an aspects_dbt_extension package at the tutordbt/templates/dbt/apps/aspects_dbt_extension path where we can add our custom transforms.

Follow steps 4-5 of this tutorial to add your custom transforms to the aspects_dbt_extension directory. The other steps have already been taken care of by this plugin.

Add any custom python requirements in the requirements.txt file present in the aspects_dbt_extension package.

After the transforms have been added, we can save our changes and rebuild the aspects image.

tutor config save
tutor images build aspects

These two steps need to be performed to pick up changes to the transforms. It is recommended to try out the transforms in the superset SQL lab as the image build process can take some time.

Finally, we can re-initialize our platform to apply the changes.

tutor local do init --limit=aspects

If the platform has already been initialized once and you would only like to reapply the migrations, then we only need to build and run our migrations

# Build and test your package
tutor dev do dbt -c "build"

# Deploy your customizations
tutor dev do dbt -c "run"

There is an example of how to add a custom model in the example branch. This example is inspired by the aspects-dbt-example repo.

License

This software is licensed under the terms of the AGPLv3.

About

Tutor plugin to extend the existing transformations in aspects-dbt using a custom dbt package.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published