This repo contains a small application that fetches all tables used as a source in Spellbook, and uploads it to Dune using the Dune API so the data can be queried directly on Dune.
- You should have a Dune API key. See how to get one here
- You should have Poetry installed
- Spellbook repo cloned locally
- Initial dbt setup in local Spellbook repo according to instructions in README
Example of usage, from the root of this repo:
~/Dune/spellbook-ingredients
➜ cd spellbook_ingredients
Dune/spellbook-ingredients/spellbook_ingredients
➜ poetry install
Installing dependencies from lock file
Package operations: 5 installs, 0 updates, 0 removals
• Installing certifi (2023.5.7)
• Installing charset-normalizer (3.1.0)
• Installing idna (3.4)
• Installing urllib3 (2.0.2)
• Installing requests (2.30.0)
Installing the current project: spellbook-ingredients (0.1.0)
Dune/spellbook-ingredients/spellbook_ingredients via spellbook-ingredients-a4ovDk4L-py3.11
➜ poetry run python3 main.py $MY_DUNE_API_KEY ~/Dune/spellbook/
Success writing CSV to Dune.com!
- Dune write API guide by 0xBoxer
- Data generated by this repo on Dune -> https://dune.com/queries/2461525