-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CT-2429] dbt show
: option to use already-materialized model instead of rerunning SQL
#7391
Comments
dbt show
: option to use already-materialized model instead of rerunning SQLdbt show
: option to use already-materialized model instead of rerunning SQL
Throwing other options for the config name:
|
In theory, this would also work for Python models — build first, then preview. Another option is to have this command/config implicitly materialize the model first: |
This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please comment on the issue or else it will be closed in 7 days. |
I'd love for this to happen! This could be very useful to save costs when querying data and avoid having people to go to their Data Warehouse interface to do so. |
New config vs. different commandOf the two options, I prefer a different command (like described in #10265). e.g. I greatly prefer this: dbt head --select my_model Rather than: dbt show --select my_model --head AdvantagesCreating a new command has the advantage of being twice as easy to type out. It would also handle situations that
Trade-offsUnless we did some fancy footwork, it wouldn't work in any cases where dbt doesn't materialize a database object though:
e.g., if we just do a direct |
I think this is a very good idea to allow dbt show with these flags would be great! also these flags would be helpful:
|
It's off-topic, but how do I make dbt show (latest cloud cli) show all columns instead of omitting many while just showing |
@maxmue to see all the columns, I use the
If you're hoping for some way to keep the same tabular format but without the |
In general, this would need to be a separate feature request. But I can say ahead of time that we're not planning on exporting the results of |
As a dbt developer, especially on BigQuery, I want to preview my just-built table in the fastest & cheapest way possible.
When users run
dbt show --select my_model
, rather than recompiling and executing that model's SQL, give users the option to preview the already-materialized version ofmy_model
in the data warehouse.This goes beyond just
--inline "select * from {{ ref('that_model') }}"
, because it would also unlock adapter-specific optimizations.Options:
--from-materialized
(I hate this name)dbt head
, to matchbq head
?In the short term, it would be the responsibility of users to track logical/applied state, and do their own "cache invalidation" if they've edited the model's definition since they last built it. (In the longer term, we could get cleverer about this in stateful runtime environments.)
This would be functionally identical for views and ephemeral models.
The text was updated successfully, but these errors were encountered: