Skip to content
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

Add last modified info to catalog for snowflake #2728

Closed
Mr-Nobody99 opened this issue Aug 27, 2020 · 2 comments
Closed

Add last modified info to catalog for snowflake #2728

Mr-Nobody99 opened this issue Aug 27, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@Mr-Nobody99
Copy link
Contributor

Describe the feature

Currently when connecting to Snowflake db's the catalog.sql is querying for Row count, Approximate size, and clustering key. It would be nice if last modified info was included as well, then it could show up in the docs site as well.

Describe alternatives you've considered

I originally thought this could be done by modifying the dbt-docs source, however I realized the info needed to exist in the docs artifacts somewhere for it to be accessible.

Additional context

This feature would be database specific for Snowflake, at least it would be as I would implement it currently. With Snowflake specifically having the information schema, which has the last_altered column readily available it would be a rather simple change. I'm am sure there are other ways to make the same idea work with other databases however.

Who will this benefit?

This would primarily benefit anyone who would like another useful bit of documentation, in an easily accessible and intuitive way.

Are you interested in contributing this feature?

I am interested in contributing this feature, I have already made the changes locally and tested with them and it works as intended.

@Mr-Nobody99 Mr-Nobody99 added enhancement New feature or request triage labels Aug 27, 2020
@jtcohen6
Copy link
Contributor

Sure! I'm on board with this. After quickly checking the Redshift and Bigquery docs, I think last_altered is indeed unique to Snowflake.

The trickiness I can anticipate is around timezones. It looks from Snowflake's docs like last_altered is in timestamp_ltz. Should we assume that the Snowflake account-level local timezone is the timezone we want to display for all dbt-docs viewers? I think we'll want to either include the timezone in dbt-docs, somehow, or standardize to UTC.

@jtcohen6 jtcohen6 removed the triage label Aug 31, 2020
@Mr-Nobody99
Copy link
Contributor Author

Mr-Nobody99 commented Aug 31, 2020

@jtcohen6 Glad to hear it, and that is a good point about the time-zone. I think there may be 2 ways to handle that one being in the sql changes the other being some "post-processing" in the dbt-docs code for loading the docs artifacts(should be in the project service for loading catalog i'd think.) I will go ahead and create a pull request with the implementation as I have it now, and maybe you can look at it and tell me what you think would be best.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants