move-coop / parsons

A python library of connectors for the progressive community.
https://www.parsonsproject.org/
Other
259 stars 131 forks source link

Create new feature for running and logging dbt commands #841

Closed austinweisgrau closed 7 months ago

austinweisgrau commented 1 year ago

dbt is an increasingly popular tool in the data analytics community, for very good reason!

dbt's primary interface is through shell commands, which makes interacting with dbt commands programmatically somewhat difficult.

This new feature enables executing dbt commands from python, logs results to the python logger and optionally can also send formatted results to slack. The slack formatted message follows the formatting convention that dbt cloud uses for its slack messages.

austinweisgrau commented 1 year ago

Recent updates to dbt enable direct execution of dbt commands in python without needing to open a shell process. Using that dbt feature would be an improvement to this method. Docs on the new dbt feature here.

shaunagm commented 1 year ago

This looks great @austinweisgrau! Although I'm unfamiliar with dbt myself and hoping someone else will be able to also review this.

Some more general questions/thoughts:

Thank you again!

austinweisgrau commented 1 year ago

Good questions!

austinweisgrau commented 1 year ago

Ok I finally looped back and made some updates:

shaunagm commented 11 months ago

I'm planning on re-reviewing this in a few weeks, after we've done the DBT Fundamentals cohort and I have a better mental sense of what DBT is and how it fits with Parsons. Just wanted to update this PR so no one reads it and wonders why it's been sitting un-merged for over a month.

shaunagm commented 7 months ago

Hi @austinweisgrau - sorry I'm just now getting back to this. This still looks good to me, and after taking the dbt course I better understand the value of this utility. I'm going to update the branch and merge it.