HomePhabricator

Initial dagster-dbt prototype

Authored by schrockn on Aug 10 2019, 9:34 PM.

Description

Initial dagster-dbt prototype

Summary:
Finally was able to make some time for this! This is a
prototype-quality dbt integration, but it demonstrates what the shape of
this would look like.

I copied the example from https://github.com/fishtown-analytics/jaffle_shop/

This shells out to dbt itself and runs against the database in the
examples docker container. (I had to manually create the database). It
just parses stdout with regex's, which is quite fragile.

It would be better if dbt emitted some sort of structured log so that
this could be parsed more reliably. Taylor is excited enough about this
possibility that he might tackle it. See https://github.com/fishtown-analytics/dbt/issues/1237

This emits materializations for each view or table created in the
example. This has not been thoroughly tested.

Next Steps:

  • Parse materializations out of the dbt project and render them as outputs
  • Also create a type-per-model and render metadata within dagit.
  • Consume dbt tests during a run and emit Expectations.
  • Model "seeds" as inputs into the dbt node.

Test Plan: Run jaffle example in dagit. Buildkite

Reviewers: #ft, natekupp

Reviewed By: #ft, natekupp

Subscribers: natekupp

Differential Revision: https://dagster.phacility.com/D795

Details

Committed
schrocknAug 13 2019, 2:04 AM
Reviewer
Restricted Project
Differential Revision
D795: Initial dagster-dbt prototype
Parents
R1:6c78175afd31: markdown support in event metadata
Branches
Unknown
Tags
Unknown