add files to connect already existing labels to dbt#2
Open
gustavobftorres wants to merge 1 commit intomainfrom
Open
add files to connect already existing labels to dbt#2gustavobftorres wants to merge 1 commit intomainfrom
gustavobftorres wants to merge 1 commit intomainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Balancer Integration in dbt
Overview
The integration covers Balancer V1, V2, and V3 across multiple blockchains. Models follow the Dune dbt template conventions (alias, schema, materialization) and use shared macros for reusable logic.
Project Structure
Model Domains
Balances
balancer_token_balance_changes— Token balance deltas on pools (V2/V3, all chains)balancer_token_balance_changes_daily— Daily aggregated balance changesbalancer_ethereum_balances— ERC20 rolling sum balances (V1, Ethereum)Liquidity
balancer_liquidity— Liquidity by token per pool (USD/ETH), unions V1–V3 + CoW Swap AMMPools
balancer_pools_tokens_weights— Pool IDs, token addresses, normalized weights per chainBPT (Balancer Pool Tokens)
balancer_bpt_supply— BPT supply by day, pool, versionbalancer_transfers_bpt— BPT transfer eventsbalancer_bpt_prices— BPT pricing for valuationSupport
balancer_token_whitelist— Whitelisted tokens for pricingbalancer_single_recipient_gauges— Gauge-to-pool mapping (Ethereum)Blockchains
Sources
Sources are defined per chain under
sources/balancer/{chain}/:All sources use the Dune
delta_proddatabase by default.Shared Macros
balancer_bpt_prices_macro— BPT price calculationbalancer_liquidity_macro— Liquidity aggregationbalancer_transfers_bpt_macro— BPT transfer parsingbalancer_token_balance_changes_daily_agg_macro— Daily balance aggregationRunning Balancer Models
Querying on Dune
Models are exposed under the
balancerschema. Use thedunecatalog prefix:Replace
{team_name}with yourDUNE_TEAM_NAME(ordune__tmp_for dev).