-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat: ⚡️ add job for dune upload #42
Conversation
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.
Great job! Easier that what I was expecting. 😊
I was thinking about this yesterday and came up with an alternative way of doing it that I think might fit better the Dagster approach.
Basically, we don't use Ops and Jobs and instead rely entirely on Dagster assets.
Similar to the approach Dagster and others take in their repos, the idea is to remove the IOManager
and handle the materialization with a resource. In this case, we would have a DuneAPI
resource and we could do simple dune.upload(asset)
from:
- New
dune_x
assets that we assign a different group so we don't materialize them locally. - Current assets like
raw_round_applications
, under anif
statement checking if the environment is production.
What I'd love to have and I don't know how easy it would be is for us to generate these Dune assets dynamically basically on previous assets tags. Similar to how the new dbt integration treats dbt assets.
Does all of this makes sense? As always, if this is working. Let's merge it and leave improvements for the next iteration. Just wanted to share what I had in mind.
I think it is ready to merge. I really do apperciate the notes tough! Seem very in-line with dagster way, for future refactor:
This is something I can test for Flipside where we can actually afford to load multiple tables without hitting upload limit. |
One thing before merging. Do you mind checking if re-uploading to Dune the same or new data is possible? I think it might give an error and we might need to do an upsert or something like that. |
Last time I tried, was working as-is. The
Note that currently, there is no way to actually remove dataset, except for using interface. |
Alright! Will try to clear some time tomorrow morning (generate API keys and stuff) and get this deployed! 🚀 |
This PR builds an
op
and threejobs
to see if we can play nicely with new dagster primitives and address #38.It does not modify existing workflow in any way (or at least I hope it doesn't), but allows us to use new CLI commands:
For dagster UI navigate to
Overview
=>Jobs
to see new additions:build all
materializes everythingbuild_indexer_assets
builds assets provided by indexer, except votes for fast testingrefresh dune
materializes an asset and then uses op to upload said asset onto Dune.To succeed job needs envar DUNE_API_KEY to be set first.
Once uploaded, dataset becomes accessible like so.