Abstractions Overview
Abstraction Tables are the easiest way to gain insights on Dune
Overview
Dune and its community are building a collection of abstraction tables that make it easier to query and analyze blockchain data. These tables are built using dbt, a tool that allows you to transform data in your warehouse using SQL and Jinja templating. We sometimes refer to these tables as spells and the collection of them as spellbook.
The abstraction tables are built on top of raw data tables and provide a high-level view of the data. For example, the dex.trades
table aggregates data from multiple sources to provide a comprehensive view of all trades on decentralized exchanges.
The abstraction tables are maintained in the Spellbook repository and are available for anyone to use. You can find the documentation and code for each table in the Spellbook Docs.
Here is a non-exhaustive list of some of the abstraction tables available in Spellbook:
Benefits of Abstraction Tables
Abstraction tables provide several benefits:
- Simplified Queries: Abstraction tables make it easier to query and analyze blockchain data by providing a high-level view of the data.
- Consistent Data Models: The abstraction tables follow a consistent data model, making it easier to combine data from different sources.
- Community Contributions: The abstraction tables are maintained by the Dune community, so anyone can contribute to them and improve the data quality.
Resources
Spellbook Repo
Go to the dbt github repo with over 400+ contributors. All models live here.
Model Docs
Find the native dbt documentation for all models in spellbook.
dbt practices in Spellbook
Docs for contributing to spellbook and dbt best practices.
Adding to Sector Models
Learn to contribute to sector models like dex.trades and nft.trades tables
Adding a token to prices
Learn to add a token to our prices.usd tracking in a PR
Was this page helpful?