📰 2023-11-15: Weekly Prophet! #4800
andrewhong5297
announced in
Prophet (Weekly Updates)
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This is your weekly summary of 38 PRs merged from 21 wizards. Great job everyone! 🎉
We had 52 added models 🟢 and 91 modified models 🟠 for 23 Sectors.
SECTOR: dex
toggle to see all model updates
MODEL: dex_info.sql
🟠 Modified by:
🔧 PR: #4739, Celo Mento Protocol trades
🧙 Author: @tomfutago on 2023-11-14
📝 Summary: In this diff, a new row was added to the temporary table. The row represents a project called 'mento' with the name 'Mento', marketplace type 'Direct', and x_username as 'mento'.
🔧 PR: #4739, Merge
equalizer
&equalizer_exchange
intoequalizer
🧙 Author: @hildobby on 2023-11-10
📝 Summary: The line that was removed from the SQL model is for the exchange 'equalizer_exchange' and its corresponding details. The line that was added is for the exchange 'equalizer' with the same details as before.
🔧 PR: #4739, Lowercase Aave & Balancer flashloans project names
🧙 Author: @hildobby on 2023-11-08
📝 Summary: In this SQL model, a row was removed for the 'maker' entry and a row was added for the 'fiat_dao' entry. The main logic change is that the name of the 'fiatdao' entry has been changed to 'fiat_dao'.
MODEL: dex_pools.sql
🟠 Modified by:
🔧 PR: #4740, Celo Mento Protocol trades
🧙 Author: @tomfutago on 2023-11-14
📝 Summary: In this diff, a reference to the 'mento_celo_pools' table was added.
🔧 PR: #4740, Merge
equalizer
&equalizer_exchange
intoequalizer
🧙 Author: @hildobby on 2023-11-10
📝 Summary: In this diff, the reference to 'equalizer_exchange_fantom_pools' was removed and replaced with a reference to 'equalizer_fantom_pools'. The other references remain unchanged.
MODEL: dex_aggregator_trades.sql
🟠 Modified by:
🔧 PR: #4752, Add tokenlon_trades
🧙 Author: @0xkeen on 2023-11-14
📝 Summary: The reference models that were added or removed in the given diff are:
MODEL: dex_trades.sql
🟠 Modified by:
🔧 PR: #4740, Oneinch updates 4
🧙 Author: @grkhr on 2023-11-13
📝 Summary: The reference models that were added or removed in the given diff are: oneinch_lop_own_trades.
🔧 PR: #4740, Merge
equalizer
&equalizer_exchange
intoequalizer
🧙 Author: @hildobby on 2023-11-10
📝 Summary: The reference models that were added or removed in the diff are: equalizer_exchange_fantom_trades
MODEL: dex_trades_seed.csv
🟠 Modified by:
🔧 PR: #4763, Oneinch updates 4
🧙 Author: @grkhr on 2023-11-13
📝 Summary: [changes too large] The model dex_trades_seed.csv was modified.
SECTOR: labels
toggle to see all model updates
MODEL: labels_bridges_ethereum.sql
🟠 Modified by:
🔧 PR: #4750, add eth bridge addresses & labels
🧙 Author: @RantumBits on 2023-11-09
📝 Summary: The diff of the SQL model shows that several rows were added to the existing query. These new rows include information about different bridges in the Ethereum blockchain, such as their addresses, names, categories, contributors, sources, creation dates and times. The model_name and label_type columns are also included for each row.
SECTOR: tokens
toggle to see all model updates
MODEL: tokens_ethereum_erc20.sql
🟠 Modified by:
🔧 PR: #4776, [EASY] Add missing tokens
🧙 Author: @harisang on 2023-11-13
📝 Summary: [changes too large] The model tokens_ethereum_erc20.sql was modified.
SECTOR: prices
toggle to see all model updates
MODEL: prices_ethereum_tokens.sql
🟠 Modified by:
🔧 PR: #4754, Add tos
🧙 Author: @kooroot on 2023-11-10
📝 Summary: The added token symbols are TON and TOS. The removed token symbol is SDL.
SECTOR: cow_protocol
toggle to see all model updates
MODEL: cow_protocol_ethereum_app_data.sql
🟠 Modified by:
🔧 PR: #4789, fix columns in app data cow
🧙 Author: @olgafetisova on 2023-11-15
📝 Summary: In this SQL model, the following changes were made:
SECTOR: balancer
toggle to see all model updates
MODEL: balancer_v2_arbitrum_bpt_supply.sql
🟢 Added by:
🔧 PR: #4726, Init
bpt_supply
🧙 Author: @thetroyharris on 2023-11-15
📝 Summary: [changes too large] The model balancer_v2_arbitrum_bpt_supply.sql was added.
MODEL: balancer_v2_avalanche_c_bpt_supply.sql
🟢 Added by:
🔧 PR: #4726, Init
bpt_supply
🧙 Author: @thetroyharris on 2023-11-15
📝 Summary: [changes too large] The model balancer_v2_avalanche_c_bpt_supply.sql was added.
MODEL: balancer_bpt_supply.sql
🟢 Added by:
🔧 PR: #4726, Init
bpt_supply
🧙 Author: @thetroyharris on 2023-11-15
📝 Summary: This SQL model creates a view that combines data from multiple tables representing different blockchain platforms. It includes information such as block time, block number, LP virtual supply raw and LP virtual supply for each pool ID. This enables data analysts to easily access and analyze the BPT (Balancer Pool Token) supply across various blockchain platforms in a single query.
MODEL: balancer_v2_base_bpt_supply.sql
🟢 Added by:
🔧 PR: #4726, Init
bpt_supply
🧙 Author: @thetroyharris on 2023-11-15
📝 Summary: [changes too large] The model balancer_v2_base_bpt_supply.sql was added.
MODEL: balancer_v2_ethereum_bpt_prices.sql
🟠 Modified by:
🔧 PR: #4726, Init
bpt_supply
🧙 Author: @thetroyharris on 2023-11-15
📝 Summary: The added logic includes a SELECT statement that retrieves the 'END' column as 'median_price' from the table 'price_formulation'. The result is then ordered in descending order based on the second and third columns.
MODEL: balancer_v2_ethereum_bpt_supply.sql
🟢 Added by:
🔧 PR: #4726, Init
bpt_supply
🧙 Author: @thetroyharris on 2023-11-15
📝 Summary: [changes too large] The model balancer_v2_ethereum_bpt_supply.sql was added.
MODEL: balancer_v2_gnosis_bpt_supply.sql
🟢 Added by:
🔧 PR: #4726, Init
bpt_supply
🧙 Author: @thetroyharris on 2023-11-15
📝 Summary: [changes too large] The model balancer_v2_gnosis_bpt_supply.sql was added.
MODEL: balancer_v2_optimism_bpt_supply.sql
🟢 Added by:
🔧 PR: #4726, Init
bpt_supply
🧙 Author: @thetroyharris on 2023-11-15
📝 Summary: [changes too large] The model balancer_v2_optimism_bpt_supply.sql was added.
MODEL: balancer_v2_polygon_bpt_supply.sql
🟢 Added by:
🔧 PR: #4726, Init
bpt_supply
🧙 Author: @thetroyharris on 2023-11-15
📝 Summary: [changes too large] The model balancer_v2_polygon_bpt_supply.sql was added.
MODEL: balancer_bpt_prices.sql
🟠 Modified by:
🔧 PR: #4760, Adds Base to Balancer BPT Prices
🧙 Author: @viniabussafi on 2023-11-10
📝 Summary: In this diff, a reference to the model 'balancer_v2_base_bpt_prices' was added.
MODEL: balancer_v2_arbitrum_flashloans.sql
🟠 Modified by:
🔧 PR: #4739, Lowercase Aave & Balancer flashloans project names
🧙 Author: @hildobby on 2023-11-08
📝 Summary: In the given SQL model, a change was made to the project name from 'Balancer' to 'balancer'. The rest of the code remains unchanged.
SECTOR: addresses_events
toggle to see all model updates
MODEL: addresses_events_first_activity.sql
🟠 Modified by:
🔧 PR: #4768, Add zora to
addresses_events.first_funded_by
🧙 Author: @hildobby on 2023-11-15
📝 Summary: In this diff, a reference to the model 'addresses_events_zora_first_activity' was added. The SELECT statement remains unchanged.
MODEL: addresses_events_first_funded_by.sql
🟠 Modified by:
🔧 PR: #4768, Add zora to
addresses_events.first_funded_by
🧙 Author: @hildobby on 2023-11-15
📝 Summary: The diff shows that a reference to 'addresses_events_zora_first_funded_by' was added to the SQL model. The SELECT statement remains unchanged.
MODEL: addresses_events_zora_first_activity.sql
🟢 Added by:
🔧 PR: #4768, Add zora to
addresses_events.first_funded_by
🧙 Author: @hildobby on 2023-11-15
📝 Summary: This SQL model creates a summary of blockchain transactions from the 'zora' source. It includes information such as the address, first activity to, first block time and number, first transaction hash, first function called, and the amount transferred in native currency. The model also performs a left join with another table to filter out duplicate functions. If it is an incremental update, it further filters based on date range and checks for null values in a specific column before grouping by address.
MODEL: addresses_events_zora_first_funded_by.sql
🟢 Added by:
🔧 PR: #4768, Add zora to
addresses_events.first_funded_by
🧙 Author: @hildobby on 2023-11-15
📝 Summary: This SQL model creates a table called 'addresses_events_first_funded_by' that is specific to the blockchain 'zora'. It enables data analysts to analyze and track the first funding events associated with addresses on the zora blockchain.
SECTOR: evms
toggle to see all model updates
MODEL: evms_info.sql
🟠 Modified by:
🔧 PR: #4746, Celo
evms.info
native token address fix🧙 Author: @tomfutago on 2023-11-15
📝 Summary: In this SQL model, a row was removed for the 'celo' cryptocurrency and a new row was added with updated information. The address associated with 'celo' changed from 0xe452e6ea2ddeb012e20db73bf5d3863a3ac8d77a to 0x471EcE3750Da237f93B8E339c536989b8978a438. The URL for 'celoscan.io' remained the same.
🔧 PR: #4746, rename Zora in evms.info
🧙 Author: @MSilb7 on 2023-11-09
📝 Summary: In this SQL model, a row for the 'ZORA Network' was removed and replaced with a row for 'ZORA'. The rest of the rows remain unchanged.
MODEL: evms_blocks.sql
🟠 Modified by:
🔧 PR: #4755, Add Zora to all
evms
tables🧙 Author: @hildobby on 2023-11-10
📝 Summary: In this diff, a new source named 'zora' is added to the SQL model. This source is used to fetch data from the 'blocks' table in the 'zora' schema.
MODEL: evms_contracts.sql
🟠 Modified by:
🔧 PR: #4755, Add Zora to all
evms
tables🧙 Author: @hildobby on 2023-11-10
📝 Summary: In this SQL model, a new source called 'zora' is added to the existing sources 'base', 'goerli', and 'zksync'. The SELECT statement remains unchanged.
MODEL: evms_creation_traces.sql
🟠 Modified by:
🔧 PR: #4755, Add Zora to all
evms
tables🧙 Author: @hildobby on 2023-11-10
📝 Summary: The line that was added in this pull request is a new source called 'zora' with the table name 'creation_traces'. This source is being included in the SELECT statement along with three other existing sources ('base', 'goerli', and 'zksync').
MODEL: evms_erc1155_approvalsforall.sql
🟠 Modified by:
🔧 PR: #4755, Add Zora to all
evms
tables🧙 Author: @hildobby on 2023-11-10
📝 Summary: In this diff, a new source named 'zora' with the event 'evt_ApprovalForAll' has been added to the SQL model.
MODEL: evms_erc1155_transfersbatch.sql
🟠 Modified by:
🔧 PR: #4755, Add Zora to all
evms
tables🧙 Author: @hildobby on 2023-11-10
📝 Summary: In this diff, a new source named 'zora' with the event type 'evt_transferbatch' has been added to the SQL model. The existing sources are 'base', 'goerli', and 'zksync'. The SELECT statement remains unchanged.
MODEL: evms_erc1155_transferssingle.sql
🟠 Modified by:
🔧 PR: #4755, Add Zora to all
evms
tables🧙 Author: @hildobby on 2023-11-10
📝 Summary: The line that starts with '+' indicates that a new source named 'zora' has been added to the SQL model. This source is used in conjunction with the 'evt_transfersingle' table from the 'erc1155_zora' schema. The rest of the code remains unchanged, as it selects all columns from an unspecified table.
MODEL: evms_erc20_approvals.sql
🟠 Modified by:
🔧 PR: #4755, Add Zora to all
evms
tables🧙 Author: @hildobby on 2023-11-10
📝 Summary: A new source called 'zora' with the event 'evt_approval' was added to the SQL model.
MODEL: evms_erc20_transfers.sql
🟠 Modified by:
🔧 PR: #4755, Add Zora to all
evms
tables🧙 Author: @hildobby on 2023-11-10
📝 Summary: In this diff, a new source named 'zora' is added to the SQL model. This source is used to retrieve data from the 'erc20_zora' table and specifically selects the 'evt_transfer' column.
MODEL: evms_erc721_approvals.sql
🟠 Modified by:
🔧 PR: #4755, Add Zora to all
evms
tables🧙 Author: @hildobby on 2023-11-10
📝 Summary: In this diff, a new source named 'zora' with the event 'evt_Approval' is added to the SQL model.
MODEL: evms_erc721_approvalsforall.sql
🟠 Modified by:
🔧 PR: #4755, Add Zora to all
evms
tables🧙 Author: @hildobby on 2023-11-10
📝 Summary: In this diff, a new source named 'zora' with the event 'evt_ApprovalForAll' has been added to the SQL model.
MODEL: evms_erc721_transfers.sql
🟠 Modified by:
🔧 PR: #4755, Add Zora to all
evms
tables🧙 Author: @hildobby on 2023-11-10
📝 Summary: In this diff, a new source named 'zora' is added to the SQL model. This source is used to retrieve data from the 'erc721_zora' table for the 'evt_transfer' event. The rest of the code remains unchanged.
MODEL: evms_logs.sql
🟠 Modified by:
🔧 PR: #4755, Add Zora to all
evms
tables🧙 Author: @hildobby on 2023-11-10
📝 Summary: In this diff, a new source named 'zora' was added to the SQL model. This source is being used in the SELECT statement along with three other existing sources ('base', 'goerli', and 'zksync').
MODEL: evms_logs_decoded.sql
🟠 Modified by:
🔧 PR: #4755, Add Zora to all
evms
tables🧙 Author: @hildobby on 2023-11-10
📝 Summary: The line that was added in the pull request includes a new source called 'zora' with the table name 'logs_decoded'. This new source is included in a list of sources used for selecting all columns from these tables.
MODEL: evms_traces.sql
🟠 Modified by:
🔧 PR: #4755, Add Zora to all
evms
tables🧙 Author: @hildobby on 2023-11-10
📝 Summary: The line that was added includes a new source called 'zora' with the table name 'traces'.
MODEL: evms_traces_decoded.sql
🟠 Modified by:
🔧 PR: #4755, Add Zora to all
evms
tables🧙 Author: @hildobby on 2023-11-10
📝 Summary: The line that was added includes a new source called 'zora' with the table name 'traces_decoded'.
MODEL: evms_transactions.sql
🟠 Modified by:
🔧 PR: #4755, Add Zora to all
evms
tables🧙 Author: @hildobby on 2023-11-10
📝 Summary: In this SQL model, a new source called 'zora' has been added to the list of sources. This source is used to fetch data from the 'transactions' table in the 'zora' schema. The rest of the code remains unchanged.
SECTOR: _sector
toggle to see all model updates
MODEL: tokens_ethereum_balances.sql
🟢 Added by:
🔧 PR: #4640, Token balances ethereum
🧙 Author: @aalan3 on 2023-11-15
📝 Summary: This SQL model creates a new table called 'balances_enrich' by enriching the data from the existing table 'tokens_ethereum_base_balances'. It enables data analysts to have access to additional information and insights related to Ethereum token balances.
MODEL: tokens_ethereum_base_balances.sql
🟢 Added by:
🔧 PR: #4640, Token balances ethereum
🧙 Author: @aalan3 on 2023-11-15
📝 Summary: This SQL model creates a union of two tables,
tokens_ethereum_base_balances_erc20
andtokens_ethereum_base_balances_native
. It enables data analysts to retrieve the combined data from these two tables. Additionally, if incremental mode is enabled, it applies a filter based on theblock_time
column for both tables.MODEL: tokens_ethereum_base_balances_erc20.sql
🟢 Added by:
🔧 PR: #4640, Token balances ethereum
🧙 Author: @aalan3 on 2023-11-15
📝 Summary: This SQL model creates a view called 'balances_base' that retrieves data from the 'tokens_ethereum_base_transfers' table. It filters the data based on the blockchain being Ethereum and token standard being ERC20. This view enables data analysts to easily access and analyze balance information for Ethereum tokens using standardized criteria.
MODEL: tokens_ethereum_base_balances_native.sql
🟢 Added by:
🔧 PR: #4640, Token balances ethereum
🧙 Author: @aalan3 on 2023-11-15
📝 Summary: This SQL model creates a base table called 'balances_base' that retrieves data from the 'tokens_ethereum_base_transfers' table. It filters the data based on the blockchain being Ethereum and token standard being native. This model enables data analysts to analyze and track balances for native tokens in Ethereum blockchain.
MODEL: tokens_ethereum_transfers.sql
🟠 Modified by:
🔧 PR: #4640, Token balances ethereum
🧙 Author: @aalan3 on 2023-11-15
📝 Summary: In this diff, the main change is in the
transfers_enrich
model. Theblockchain
parameter remains unchanged as 'ethereum'. However, there is a modification in thetransfers_base
parameter. The reference to'tokens_ethereum_transfers_base'
has been replaced with'tokens_ethereum_base_transfers'
. Additionally, a new parameter callednative_symbol
has been added with a value of 'ETH'.MODEL: dex_celo_base_trades.sql
🟢 Added by:
🔧 PR: #4533, SPE-200 restructuring dex.trades with a macro approach
🧙 Author: @Hosuke on 2023-11-09
📝 Summary: This SQL model creates a union of base trade data from the 'uniswap_v3_celo_base_trades' table. It includes various columns such as blockchain, project, version, block information, token amounts bought and sold, addresses involved in the trade, taker and maker details, contract address of the project involved in the trade transaction hash and event index. The model also adds additional filters for transactions related to Celo blockchain using a helper function called 'add_tx_from_and_to'. This enables data analysts to analyze and query unified base trade data specifically for Celo blockchain transactions.
🟠 Modified by:
🔧 PR: #4533, Celo Mento Protocol trades
🧙 Author: @tomfutago on 2023-11-14
📝 Summary: In this diff, three new models (
mento_v1_celo_base_trades
,mento_v2_celo_base_trades
) were added to thebase_models
list. These models are then used in a common table expression calledbase_union
.🔧 PR: #4533, SPE-224: expand existing
add_tx_from_and_to
and make generic🧙 Author: @jeff-dude on 2023-11-10
📝 Summary: The diff shows that a function called 'add_tx_from_and_to' was removed and replaced with a new function called 'add_tx_columns'. The new function adds three columns ('from', 'to', 'index') to the CTE named 'base_union' for the blockchain 'celo'.
MODEL: mento_v1_celo_base_trades.sql
🟢 Added by:
🔧 PR: #4413, Celo Mento Protocol trades
🧙 Author: @tomfutago on 2023-11-14
📝 Summary: This SQL model creates a view called 'base_trades' that combines data from three different tables in the 'mento_celo' database. It selects various columns related to token exchanges, including block time, block number, token amounts bought and sold, addresses of the tokens involved in each trade, taker and maker information, project contract address, transaction hash and event index. The final query then selects specific columns from the 'base_trades' view to create a result set with additional information such as blockchain type (celo), project name (mento), version number (1), block month and date.
MODEL: mento_v2_celo_base_trades.sql
🟢 Added by:
🔧 PR: #4413, Celo Mento Protocol trades
🧙 Author: @tomfutago on 2023-11-14
📝 Summary: This SQL model creates a table that captures data related to swaps on the Celo blockchain for the Mento project. It includes information such as block month, block date, block time, block number, taker (buyer), maker (seller), token bought amount in raw format, token sold amount in raw format, USD amount (null value), addresses of tokens bought and sold, project contract address, transaction hash and event index. This model enables data analysts to analyze swap activity on the Celo blockchain for the Mento project.
MODEL: slugs_optimism_rewards.sql
🟢 Added by:
🔧 PR: #4777, Add Slugs on optimism to the referral rewards sector
🧙 Author: @datadanne on 2023-11-14
📝 Summary: This SQL model creates a dataset that includes information about blockchain events related to the 'optimism' project and the 'slugs' category. It provides details such as block number, block time, transaction hash, referrer address, referee address, currency contract, reward amount raw value, project contract address,and sub-transaction ID. The model joins two sources of data and applies incremental updates if specified. The dataset is filtered to include only events where 'isCustom' is true.
MODEL: referral_staging_rewards.sql
🟠 Modified by:
🔧 PR: #4689, Add Slugs on optimism to the referral rewards sector
🧙 Author: @datadanne on 2023-11-14
📝 Summary: In this SQL model, the reference to 'soundxyz_optimism_rewards' was removed and then added back. Additionally, a new reference to 'slugs_optimism_rewards' was added. The SELECT statement remains unchanged.
🔧 PR: #4689, [easy] add zora_zora_rewards to referral sector
🧙 Author: @0xRobin on 2023-11-14
📝 Summary: The model added a reference to 'zora_zora_rewards'.
🔧 PR: #4689, add Zora on zora to the referral rewards sector
🧙 Author: @0xRobin on 2023-11-08
📝 Summary: The main logic added in this diff is a SELECT statement that retrieves all columns from a set of models. The models are iterated over using a for loop, and the resulting data is returned as output.
MODEL: nft_zora_transfers.sql
🟢 Added by:
🔧 PR: #4767, Add zora to nft.transfers
🧙 Author: @hildobby on 2023-11-14
📝 Summary: This dbt SQL model creates a table called 'nft_transfers' that enables data analysts to analyze and track NFT transfers on the Zora blockchain. It combines data from multiple sources including transactions, ERC721 transfers, ERC1155 single transfers, and ERC1155 batch transfers.
MODEL: nft_transfers.sql
🟠 Modified by:
🔧 PR: #4767, Add zora to nft.transfers
🧙 Author: @hildobby on 2023-11-14
📝 Summary: In this diff, a reference to the 'nft_zora_transfers' table was added to the SQL model.
MODEL: quix_v1_optimism_events.sql
🟠 Modified by:
🔧 PR: #4783, fix implicit coercion bugs: change from decimal to double
🧙 Author: @jeff-dude on 2023-11-13
📝 Summary: In this SQL model, the calculation for platform fee amount and percentage has been modified. The previous calculations used division and multiplication operators with integers, while the updated calculations use double precision floating-point numbers. This change ensures more accurate results for platform fee amounts and percentages.
MODEL: quix_v2_optimism_events.sql
🟠 Modified by:
🔧 PR: #4783, fix implicit coercion bugs: change from decimal to double
🧙 Author: @jeff-dude on 2023-11-13
📝 Summary: The main logic that was added in this SQL model is the conversion of numeric values using the
double
data type. The calculations forplatform_fee_amount_raw
,platform_fee_amount
,platform_fee_amount_usd
, andplatform_fee_percentage
now use the new syntax with explicit casting to double. This change ensures accurate calculations and conversions for these fields.MODEL: quix_v3_optimism_events.sql
🟠 Modified by:
🔧 PR: #4783, fix implicit coercion bugs: change from decimal to double
🧙 Author: @jeff-dude on 2023-11-13
📝 Summary: In this SQL model, the calculation for platform fee amount and percentage has been modified. The previous calculations used integer division and casting, while the new calculations use double precision floating-point numbers. Additionally, the platform fee amount in USD is now calculated by multiplying with a price value from another table. The royalty fee amount remains unchanged.
MODEL: quix_v4_optimism_events.sql
🟠 Modified by:
🔧 PR: #4783, fix implicit coercion bugs: change from decimal to double
🧙 Author: @jeff-dude on 2023-11-13
📝 Summary: The main logic that was added in this SQL model is the conversion of certain calculations to use the
double
data type instead ofcast
. Specifically, the calculation forplatform_fee_amount_raw
,platform_fee_amount
, andplatform_fee_amount_usd
now use the multiplication operator with a double value (double '2.5'
) instead of casting. Additionally, the platform fee percentage is also casted as a double (CAST(double '2.5' AS DOUBLE)
).MODEL: quix_v5_optimism_events.sql
🟠 Modified by:
🔧 PR: #4783, fix implicit coercion bugs: change from decimal to double
🧙 Author: @jeff-dude on 2023-11-13
📝 Summary: The main logic added in this SQL model is the conversion of certain calculations to use the
double
data type instead ofcast
. Specifically, the calculation forplatform_fee_amount_raw
,platform_fee_amount
, andplatform_fee_amount_usd
now use the syntax(double '2.5' * ...)
. Additionally, the value forplatform_fee_percentage
is casted as a double using(CAST(double '2.5' AS DOUBLE))
.MODEL: dex_avalanche_c_base_trades.sql
🟢 Added by:
🔧 PR: #4717, Add trades model of avalanche_c of Uniswap
🧙 Author: @lequangphu on 2023-11-13
📝 Summary: This SQL model creates a union of multiple base models, specifically the 'uniswap_v3_avalanche_c_base_trades' model. It adds additional columns to the unioned data, including 'from', 'to', and 'index'. This enables data analysts to analyze trade data from different sources in a unified manner and perform further analysis on transactions involving specific addresses or indices.
MODEL: uniswap_v3_avalanche_c_base_trades.sql
🟢 Added by:
🔧 PR: #4717, Add trades model of avalanche_c of Uniswap
🧙 Author: @lequangphu on 2023-11-13
📝 Summary: This SQL model creates a table called 'uniswap_compatible_v3_trades' that enables data analysts to analyze trades on the Uniswap V3 protocol in the Avalanche C blockchain. It sources data from two tables: 'Pair_evt_Swap' and 'Factory_evt_PoolCreated' from the 'uniswap_v3_avalanche_c' project.
MODEL: dex_base_trades.sql
🟢 Added by:
🔧 PR: #4533, SPE-200 restructuring dex.trades with a macro approach
🧙 Author: @Hosuke on 2023-11-09
📝 Summary: This SQL model creates a union of multiple tables (
dex_arbitrum_base_trades
,dex_base_base_trades
,dex_bnb_base_trades
, etc.) and selects specific columns from each table. It also includes a row number calculation to identify duplicate rows based on thetx_hash
andevt_index
. The final result is a single table (base_union
) that contains unique rows from all the input tables. This model enables data analysts to easily query and analyze consolidated trade data across different blockchains, projects, versions, etc.🟠 Modified by:
🔧 PR: #4533, Add trades model of avalanche_c of Uniswap
🧙 Author: @lequangphu on 2023-11-13
📝 Summary: In this diff, a new reference to the model 'dex_avalanche_c_base_trades' was added.
MODEL: dex_arbitrum_base_trades.sql
🟢 Added by:
🔧 PR: #4533, SPE-200 restructuring dex.trades with a macro approach
🧙 Author: @Hosuke on 2023-11-09
📝 Summary: This SQL model creates a union of data from the 'uniswap_v3_arbitrum_base_trades' table and enables analysts to query information about trades made on the Uniswap v3 protocol on the Arbitrum blockchain. The model includes details such as blockchain, project, version, block month, block date, block time, block number, token amounts bought and sold (in raw format), addresses of tokens bought and sold, taker/maker information,
project contract address,
transaction hash,
and event index.
🟠 Modified by:
🔧 PR: #4533, SPE-224: expand existing
add_tx_from_and_to
and make generic🧙 Author: @jeff-dude on 2023-11-10
📝 Summary: The added logic includes a function call to 'add_tx_columns' with parameters specifying the model CTE, blockchain, and columns to be added ('from', 'to', 'index'). This suggests that transaction-related columns are being added for the specified blockchain. The removed logic is a function call to 'add_tx_from_and_to' with parameters indicating the model CTE and blockchain.
MODEL: dex_base_base_trades.sql
🟢 Added by:
🔧 PR: #4533, SPE-200 restructuring dex.trades with a macro approach
🧙 Author: @Hosuke on 2023-11-09
📝 Summary: This SQL model creates a base union table that combines data from the 'uniswap_v3_base_base_trades' table. It enables data analysts to query and analyze trade information such as blockchain, project, version, block details, token amounts bought and sold, addresses involved in the trade, taker/maker details, contract address used for the project transaction hash and event index. The 'add_tx_from_and_to' function is also applied to add additional columns related to transaction details.
🟠 Modified by:
🔧 PR: #4533, SPE-224: expand existing
add_tx_from_and_to
and make generic🧙 Author: @jeff-dude on 2023-11-10
📝 Summary: The main logic added in this diff is a call to the
add_tx_columns
macro. This macro adds three columns (from
,to
, andindex
) to the CTE named 'base_union'. The values for these columns are retrieved from the blockchain named 'base'.MODEL: dex_bnb_base_trades.sql
🟢 Added by:
🔧 PR: #4533, SPE-200 restructuring dex.trades with a macro approach
🧙 Author: @Hosuke on 2023-11-09
📝 Summary: This SQL model creates a base union table that combines data from multiple base models. It includes columns such as blockchain, project, version, block month, block date, block time, and various transaction details. This model enables data analysts to easily query and analyze aggregated data from different sources in the blockchain project.
🟠 Modified by:
🔧 PR: #4533, SPE-224: expand existing
add_tx_from_and_to
and make generic🧙 Author: @jeff-dude on 2023-11-10
📝 Summary: The main logic added in this diff is a call to the
add_tx_columns
macro. This macro adds three columns (from
,to
, andindex
) to the CTE named 'base_union' in the SQL model. The blockchain specified for these columns is 'bnb'.MODEL: dex_ethereum_base_trades.sql
🟢 Added by:
🔧 PR: #4533, SPE-200 restructuring dex.trades with a macro approach
🧙 Author: @Hosuke on 2023-11-09
📝 Summary: This SQL model creates a union of multiple base trade tables (defiswap_ethereum_base_trades, uniswap_v1_ethereum_base_trades, uniswap_v2_ethereum_base_trades, and uniswap_v3_ethereum_base_trades) to consolidate their data. It enables data analysts to query and analyze trade information from these different sources in a single table. The 'add_tx_from_and_to' function is also applied to add transaction details related to Ethereum blockchain.
🟠 Modified by:
🔧 PR: #4533, SPE-224: expand existing
add_tx_from_and_to
and make generic🧙 Author: @jeff-dude on 2023-11-10
📝 Summary: The diff shows that a function called 'add_tx_from_and_to' was removed and replaced with a new function called 'add_tx_columns'. The new function adds three columns ('from', 'to', 'index') to the CTE named 'base_union' for the blockchain 'ethereum'.
MODEL: dex_optimism_base_trades.sql
🟢 Added by:
🔧 PR: #4533, SPE-200 restructuring dex.trades with a macro approach
🧙 Author: @Hosuke on 2023-11-09
📝 Summary: This SQL model creates a union of base trade data from the 'uniswap_v3_optimism_base_trades' table. It enables data analysts to query and analyze trade information such as blockchain, project, version, block details, token amounts bought and sold, addresses involved in the transaction (taker/maker), contract address, transaction hash, and event index. The model also includes a function called 'add_tx_from_and_to' that adds additional transaction details related to optimism.
🟠 Modified by:
🔧 PR: #4533, SPE-224: expand existing
add_tx_from_and_to
and make generic🧙 Author: @jeff-dude on 2023-11-10
📝 Summary: The diff shows that a function called 'add_tx_from_and_to' was removed and replaced with a new function called 'add_tx_columns'. The new function adds three columns ('from', 'to', 'index') to the CTE named 'base_union' for the blockchain named 'optimism'.
MODEL: dex_polygon_base_trades.sql
🟢 Added by:
🔧 PR: #4533, SPE-200 restructuring dex.trades with a macro approach
🧙 Author: @Hosuke on 2023-11-09
📝 Summary: This SQL model creates a union of base trade data from the 'uniswap_v3_polygon_base_trades' table. It includes various columns such as blockchain, project, version, block information, token amounts bought and sold, addresses involved in the trade, taker and maker details, contract address of the project involved in the trade transaction hash and event index. The model also adds additional transaction information related to Polygon network using a function called 'add_tx_from_and_to'. This enables data analysts to analyze and query consolidated base trade data along with relevant transaction details on Polygon network.
🟠 Modified by:
🔧 PR: #4533, SPE-224: expand existing
add_tx_from_and_to
and make generic🧙 Author: @jeff-dude on 2023-11-10
📝 Summary: The diff shows that a function called 'add_tx_from_and_to' was removed and replaced with a new function called 'add_tx_columns'. The new function adds three columns ('from', 'to', 'index') to the CTE named 'base_union' in the SQL model. The blockchain specified for these columns is 'polygon'.
MODEL: superrare_ethereum_base_trades.sql
🟠 Modified by:
🔧 PR: #4761, Turn decimals(x,y) y> 0 to double for implicit coercion with uint256
🧙 Author: @belen-pruvost on 2023-11-10
📝 Summary: In this SQL model, the logic for calculating platform fee and royalty fee amounts has been modified. The calculation now includes a fixed 3% fee and a 15% commission on primary sales for the superrare platform. For other platforms, only the fixed 3% fee is applied. Additionally, the royalty fee amount calculation now uses a fixed 10% rate instead of directly multiplying by 0.10 as before.
MODEL: decentraland_polygon_events.sql
🟠 Modified by:
🔧 PR: #4761, Turn decimals(x,y) y> 0 to double for implicit coercion with uint256
🧙 Author: @belen-pruvost on 2023-11-10
📝 Summary: The main logic added in this SQL model is the calculation of platform fee amounts. Three new columns were added: 'platform_fee_amount_raw', 'platform_fee_amount', and 'platform_fee_amount_usd'. These columns calculate the platform fee amount based on different values from the source table and a fixed percentage. The calculations involve multiplying various values by 0.025 using CAST function to ensure proper data types are maintained. Additionally, two new columns for royalty fees were added but their values are set as NULL in this model diff.
MODEL: pancakeswap_bnb_nft_events.sql
🟠 Modified by:
🔧 PR: #4761, Turn decimals(x,y) y> 0 to double for implicit coercion with uint256
🧙 Author: @belen-pruvost on 2023-11-10
📝 Summary: In this SQL model, the main logic that was added is the conversion of the platform_fee_percentage value from a decimal to a double data type. Additionally, there is a case statement that calculates the royalty_fee_percentage based on certain conditions. The currency_contract column now has a specific contract address assigned to it based on its condition, and there is also an updated CASE statement for determining the currency_symbol column value.
MODEL: stealcam_arbitrum_events.sql
🟠 Modified by:
🔧 PR: #4761, Turn decimals(x,y) y> 0 to double for implicit coercion with uint256
🧙 Author: @belen-pruvost on 2023-11-10
📝 Summary: In this SQL model, the logic for calculating platform fees and royalty fees has been modified. The previous calculations used a constant value of 0.1 or 0.45 multiplied by the surplus_value column to calculate various fee amounts and percentages. These calculations have been updated to use a constant value of 'double '0.1'' or 'double '0.45'' multiplied by the surplus_value column instead, resulting in new values for platform_fee_amount_raw, platform_fee_amount, platform_fee_amount_usd, platform_fee_percentage, royalty_fee_amount_raw,
royalty_fee_amount,
royalty_fee_amount_usd,
and royalty_percentage.
MODEL: uniswap_v3_arbitrum_base_trades.sql
🟢 Added by:
🔧 PR: #4533, SPE-200 restructuring dex.trades with a macro approach
🧙 Author: @Hosuke on 2023-11-09
📝 Summary: This SQL model creates a table called 'uniswap_compatible_v3_trades' that enables data analysts to analyze trades on the Uniswap v3 protocol in the Arbitrum blockchain. It sources data from two tables: 'Pair_evt_Swap' and 'Factory_evt_PoolCreated' from the 'uniswap_v3_arbitrum' project.
MODEL: uniswap_v3_base_base_trades.sql
🟢 Added by:
🔧 PR: #4533, SPE-200 restructuring dex.trades with a macro approach
🧙 Author: @Hosuke on 2023-11-09
📝 Summary: This SQL model creates a table called 'uniswap_compatible_v3_trades' that enables data analysts to analyze and query Uniswap V3 trades. It pulls data from the 'UniswapV3Pool_evt_Swap' and 'UniswapV3Factory_evt_PoolCreated' sources in the 'uniswap_v3_base' project on the blockchain.
MODEL: uniswap_v3_bnb_base_trades.sql
🟢 Added by:
🔧 PR: #4533, SPE-200 restructuring dex.trades with a macro approach
🧙 Author: @Hosuke on 2023-11-09
📝 Summary: This SQL model creates a table called 'uniswap_compatible_v3_trades' that enables data analysts to analyze trades on the Uniswap v3 platform for the Binance blockchain. It sources data from two tables: 'Pair_evt_Swap' and 'Factory_evt_PoolCreated'.
MODEL: uniswap_v3_celo_base_trades.sql
🟢 Added by:
🔧 PR: #4533, SPE-200 restructuring dex.trades with a macro approach
🧙 Author: @Hosuke on 2023-11-09
📝 Summary: This SQL model creates a table called 'uniswap_compatible_v3_trades' that enables data analysts to analyze trades on the Uniswap V3 platform for the Celo blockchain. It includes information about swap events and pool creation events from the Uniswap V3 Factory.
MODEL: dex_trades_beta.sql
🟢 Added by:
🔧 PR: #4533, SPE-200 restructuring dex.trades with a macro approach
🧙 Author: @Hosuke on 2023-11-09
📝 Summary: This SQL model creates and enables the enrichment of DEX trades data by joining it with base trades, ERC20 tokens, and USD prices. It allows data analysts to analyze DEX trade data with additional information such as token details and corresponding USD prices.
MODEL: defiswap_ethereum_base_trades.sql
🟢 Added by:
🔧 PR: #4533, SPE-200 restructuring dex.trades with a macro approach
🧙 Author: @Hosuke on 2023-11-09
📝 Summary: This SQL model creates a table called 'uniswap_compatible_v2_trades' that enables data analysts to analyze and query trade events from the DefiSwap project on the Ethereum blockchain. It includes information about swap events and pair creation events sourced from two different tables.
MODEL: uniswap_v1_ethereum_base_trades.sql
🟢 Added by:
🔧 PR: #4533, SPE-200 restructuring dex.trades with a macro approach
🧙 Author: @Hosuke on 2023-11-09
📝 Summary: This SQL model creates a table that captures data from the Uniswap v1 TokenPurchase and EthPurchase events. It includes information such as block number, block time, token bought/sold amounts, addresses of tokens involved, taker/maker addresses, project contract address, transaction hash and event index. This enables data analysts to analyze trading activity on the Uniswap platform for Ethereum blockchain.
MODEL: uniswap_v2_ethereum_base_trades.sql
🟢 Added by:
🔧 PR: #4533, SPE-200 restructuring dex.trades with a macro approach
🧙 Author: @Hosuke on 2023-11-09
📝 Summary: This SQL model creates a CTE (Common Table Expression) called 'dexs' that retrieves data from the Uniswap V2 trades table. It then selects all columns from the 'dexs' CTE and filters out rows where the project contract address is not equal to three specific trading pairs: weth_ubomb_wash_trading_pair, weth_weth_wash_trading_pair, and feg_eth_wash_trading_pair. This model enables data analysts to analyze Uniswap V2 trades while excluding certain trading pairs of interest.
MODEL: uniswap_v3_ethereum_base_trades.sql
🟢 Added by:
🔧 PR: #4533, SPE-200 restructuring dex.trades with a macro approach
🧙 Author: @Hosuke on 2023-11-09
📝 Summary: This SQL model creates a table called 'uniswap_compatible_v3_trades' that enables data analysts to analyze and query Uniswap V3 trades on the Ethereum blockchain. It sources data from two tables: 'Pair_evt_Swap' and 'Factory_evt_PoolCreated'.
MODEL: uniswap_v3_optimism_base_trades.sql
🟢 Added by:
🔧 PR: #4533, SPE-200 restructuring dex.trades with a macro approach
🧙 Author: @Hosuke on 2023-11-09
📝 Summary: This SQL model creates a table called 'uniswap_compatible_v3_trades' that enables data analysts to analyze trades on the Uniswap v3 protocol specifically for the Optimism blockchain. It includes information about swap events and pool creation events from the Uniswap v3 Optimism dataset.
MODEL: uniswap_v3_polygon_base_trades.sql
🟢 Added by:
🔧 PR: #4533, SPE-200 restructuring dex.trades with a macro approach
🧙 Author: @Hosuke on 2023-11-09
📝 Summary: This SQL model creates a table called 'uniswap_compatible_v3_trades' that enables data analysts to analyze trades on the Uniswap V3 protocol on the Polygon blockchain. It sources data from two tables: 'UniswapV3Pool_evt_Swap' and 'Factory_evt_PoolCreated'.
MODEL: zora_zora_rewards.sql
🟢 Added by:
🔧 PR: #4689, add Zora on zora to the referral rewards sector
🧙 Author: @0xRobin on 2023-11-08
📝 Summary: This SQL model creates a table called 'zora_referral_rewards' that enables data analysts to track and analyze referral rewards in the Zora blockchain protocol. The data for this table is sourced from the 'ProtocolRewards_evt_RewardsDeposit' event in the 'zora_zora' database.
SECTOR: oneinch
toggle to see all model updates
MODEL: oneinch_calls.sql
🟠 Modified by:
🔧 PR: #4782, oneinch: hotfix performance issue
🧙 Author: @grkhr on 2023-11-14
📝 Summary: In this SQL model, the logic that was added includes changing the aggregation function for 'block_time' from 'max' to 'group', and changing the aggregation functions for 'tx_from', 'tx_to', 'tx_success', and 'call_success' from 'max' to
MODEL: oneinch_lop.sql
🟠 Modified by:
🔧 PR: #4763, Oneinch updates 4
🧙 Author: @grkhr on 2023-11-13
📝 Summary: In this diff, the 'gnosis', 'optimism', and 'zksync' elements were removed from a list of supported networks, while the 'polygon' element was added.
MODEL: oneinch_lop_own_trades.sql
🟠 Modified by:
🔧 PR: #4763, Oneinch updates 4
🧙 Author: @grkhr on 2023-11-13
📝 Summary: The main logic added in this SQL model is the creation of two CTEs (Common Table Expressions) called 'tokens_src' and 'tokens_dst'. These CTEs select data from a reference table called 'tokens_erc20' and rename some columns. The purpose of these CTEs is to retrieve information about source tokens and destination tokens, including their symbols and decimals. This information will be used later in the model to calculate token amounts in USD.
SECTOR: mento
toggle to see all model updates
MODEL: mento_celo_pools.sql
🟢 Added by:
🔧 PR: #4413, Celo Mento Protocol trades
🧙 Author: @tomfutago on 2023-11-14
**📝 S
Beta Was this translation helpful? Give feedback.
All reactions