-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
The current logic to get row_count for models uses select * ... and has two potential issues:
- There can be hundreds or thousands of models, many of which you may not want to observe. You may only want to observe tables and not views. You may only want to observe the
/models/martsfolder. You may only want to observe models that were compiled, meaning they were part of the dbt build. - Select * can be slow. For tables, many data warehouses have faster ways to get table row count, for example:
a) Snowflake: https://www.metaplane.dev/blog/three-ways-to-retrieve-row-counts-for-snowflake-tables-and-views
b) Redshift: https://www.metaplane.dev/blog/three-ways-to-retrieve-row-counts-in-redshift-tables-and-views
Ideas:
- Configure rowcount logic as a variable with the following options:
a) DISABLED - do not get rowcount
b) SELECT - use select count(*)
c) META - use the metadata methodology, depending on database adapter (snowflake, redshift, etc.) - Configure rowcount selector, e.g. only observe "/models/marts" folder
Metadata
Metadata
Assignees
Labels
No labels