Closed viniabussafi closed 3 weeks ago
it would be great to have a better structure there. did you find any team doing something similar? i'm just wondering if that doesn't break dbt
and/or the structure already in place. also what does spell category mean? liquidity, volume, etc?
I'm using this as reference: https://github.com/duneanalytics/spellbook/tree/main/models/_sector
My initial division would be something like: balances bpt flashloans liquidity pools protocol_fee support trades vebal
You can find it here: https://github.com/balancer/dune-spellbook/tree/organize-folders/models/balancer
got it but that's for sectors not projects. I meant if there's a model/project
structured this way or another - that's the folder that dbt compile
will look for. I assume dbt compile
will just loop through the nested folders and it should work but worth double-checking it.
Also another trade-off to keep in mind is you don't have reference for the columns in some of the new schema yaml files and that will lead to errors - for instance:
I'm mostly wondering if this doesn't break anything and/or whether Dune team will approve it.
Got it. I asked them about it on a PR I have open and let's see what they say. Also, I plan on doing a bit of improving on schema files, fixing some wrong/missing descriptions and a few typos along the way
Seems to work as expected: view it on GitHub Since I haven't gotten a reply from the dune team, I'll go ahead and open up a PR
PR open
PR should pass tests now. This PR does not introduce any change regarding the spells per se, other than their location. Except for legacy trades spells, which I took the liberty of removing All schema files have been renamed as _schema and improved regarding syntax, formatting and column descriptions. I have validated outputs and they stay the same, as expected.
PR merged
Our spells are getting quite numerous and will increase in v3, so I propose we break them down into folders, in order to keep them more organized. Structure would be the following, using the same structure already on spellbook for the _sectors folder:
balancer --> spell category --> chain