-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 query nft trades labels #1513
Conversation
{{ config( | ||
alias = 'all', | ||
materialized = 'table', | ||
file_format = 'delta') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to also add an alter table statement for this. Could you try adding it to post_hook
here, would be interesting to see if it works. Because then we can keep those things in the files and not forget.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I initially didn't want to expose the labels yet, until we have added a couple more queries/static labels. I also don't really want to add alter table statements as post hook as I've done this before and it ended up being extremely long and messy in the dbt_project.yml file. I think the most promising avenue is to alter table properties in the models directly (databricks/dbt-databricks#33), but we have to wait until the databricks adapter is supported by dbt cloud.
In any case, maybe we could open another PR/discussion around this ?
'nft' AS category, | ||
'soispoke' AS contributor, | ||
'query' AS source, | ||
timestamp('2022-09-24') as created_at, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not that important but these are all in the future
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh right thanks haha, this is fixed now 👍
models/labels/labels_all_schema.yml
Outdated
- name: created_at | ||
description: "When were labels created" | ||
- name: updated_at | ||
description: "When were labels updated for the last time ?" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
drop ?
, here and below
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good, done @aalan3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this builds fine, but a bit slow to query the end result in 'all' table, at least when trying to do select * on it. not a huge surprise as it's on large volume of nft trades data.
also curious how you proceed with the few PRs all for labels? merge one PR, then merge main into other branch(s) and increment from there, considering they all need to union into the 'all' table?
@jeff-dude thanks, yes exactly the goal was to give examples for static labels and query labels for it to be easier to review, but now I'll merge this, and then merge main into the bigger Labels WIP PR #1474. If you guys can review/approve that one when you have time it would be awesome |
Brief comments on the purpose of your changes:
This PR aims to give an example of adding query labels to the spellbook repo
For Dune Engine V2
I've checked that:
General checks:
lowercase_snake_cased
Join logic:
Incremental logic: