dbt-labs / dbt-labs-experimental-features

dbt support for database features which are not yet supported natively in dbt-core
Apache License 2.0
147 stars 43 forks source link

Adding partition/cluster functionality to bigquery mv config #27

Open makermary opened 2 years ago

makermary commented 2 years ago

Using logic similar to the partition/cluster code for a regular table, this commit adds this functionality to the bigquery materialized_view feature.

Tested by replacing the code in my local install of dbt-labs-experimental-features. If a materialized view already exists without partitions, users must do a --full-refresh for the partition to exist.

Solves #28.

waitsfornone commented 2 years ago

This would be an extremely helpful feature to have for us. Thank you.

minhnhat992 commented 2 years ago

Definitely appreciate if this becomes a feature!

jtcohen6 commented 2 years ago

@makermary Very cool, thanks for opening! I'll take a look in the next couple days. The MV code needs a bit of a refresh as is.

judahrand commented 2 years ago

@makermary Very cool, thanks for opening! I'll take a look in the next couple days. The MV code needs a bit of a refresh as is.

Have you had any more thoughts on this @jtcohen6? This would be really useful for us.

riordan commented 2 years ago

Having recently become enamored of BQ's clustering, this could be a huge help for us.

Also I noticed @lihan's new PR:

From the dbt labs side, what would it take to get either of these contributions to included status?