Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Git Commit History #475

Merged
merged 213 commits into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
213 commits
Select commit Hold shift + click to select a range
49ff68d
Chainlink: Chainlink OCR Rewards (#255)
SebMelendez01 Jun 27, 2024
0bf087a
Evm new balances tables (#256)
anthonyyim Jun 27, 2024
0b9aaf8
Use new warehouses for balances computation so we don't max out wareh…
anthonyyim Jun 28, 2024
c5daf18
adding vrf fees models (#258)
alexwes Jun 28, 2024
a3cdc25
Update unique key for Base (#260)
anthonyyim Jun 28, 2024
2e5ae9d
Add metrics breakdown table for EVM chains (#259)
anthonyyim Jun 28, 2024
ada6354
Increase time window of Near DAU adjusted calc (#263)
anthonyyim Jun 28, 2024
1201113
Chainlink: Adding Chainlink Models (#261)
SebMelendez01 Jun 28, 2024
502b420
Chainlink financials treasury (#262)
alexwes Jun 28, 2024
f1a65ac
Added Ton Stablecoin Transfers + Aggregated Data (#264)
Sunny77D Jun 28, 2024
af7e24f
Stablecoin V2: Solana and Is Wallet Column (#265)
SebMelendez01 Jun 28, 2024
1809a73
Chainlink financials treasury (#266)
alexwes Jun 28, 2024
7e26566
Chainlink: EZ Metrics (#267)
SebMelendez01 Jun 29, 2024
7ba3864
Calculate adjusted Near DAU for all of time (#268)
anthonyyim Jun 29, 2024
c036d33
Stablecoins: Fix Ethereum Unique Key and use ref (#269)
SebMelendez01 Jul 1, 2024
c464c4d
Added Ton address types (#270)
Sunny77D Jul 1, 2024
32ddd4f
Updating chainlink ez metric by chain (#271)
SebMelendez01 Jul 2, 2024
f1d00d8
Ton stablecoin models (#272)
Sunny77D Jul 2, 2024
f0663d5
Fix Ton Stablecoins (#273)
Sunny77D Jul 2, 2024
92dae3a
Added Avalanche Subnets (#274)
Sunny77D Jul 2, 2024
a00e894
Add `ez_stablecoin_metrics` view for Reflexive (#275)
0xnirmal Jul 3, 2024
a607962
Fix avalanche subnets (#276)
Sunny77D Jul 3, 2024
14b97a0
P2P Stablecoins (#277)
SebMelendez01 Jul 3, 2024
a0f7130
Updated Ton Open League models to ez tables (#280)
Sunny77D Jul 4, 2024
23ca782
Across: Remove support for Lisk (#281)
SebMelendez01 Jul 6, 2024
98b1820
Set Test Severity to Warn in Polkadot and Acala Tests (#282)
akan72 Jul 8, 2024
478aa81
point docs at .com domain
simon-weber-artemis Jul 8, 2024
2d7697e
Chainlink: Chainlink Metrics (#284)
SebMelendez01 Jul 8, 2024
2940b38
Added Unique Ids to open league Models (#283)
Sunny77D Jul 9, 2024
7b88f21
Labeling: Adding EVM Flipside Labels (#278)
SebMelendez01 Jul 10, 2024
f0c728b
SQL Pre-Commit Hook (#285)
0xnirmal Jul 10, 2024
d04cb5d
readme update
0xnirmal Jul 10, 2024
129459e
adding akash mints and burns data (#288)
alexwes Jul 11, 2024
c3e74c4
Added Season 5 to Ton Open League (#291)
Sunny77D Jul 11, 2024
21ee729
Chainlink: adding gnosis, base, avalanche, bsc, arbitrum, optimism, p…
SebMelendez01 Jul 12, 2024
a050946
Alw akash dates fix (#290)
alexwes Jul 12, 2024
435e7c5
Alw avax fees fix (#289)
alexwes Jul 12, 2024
b83a3d0
Added from_address_adjusted for near (#294)
Sunny77D Jul 12, 2024
f80f9ac
Chainlink: Fixing VRF Incremental Run (#295)
SebMelendez01 Jul 13, 2024
c4840b6
USDT Stablecoin Supply: Ethereum and Tron (#296)
SebMelendez01 Jul 14, 2024
679ed9b
materialize views as tables -> you cannot do cross-region views b/c P…
0xnirmal Jul 15, 2024
9ef61de
blocklist turd coin from osmosis fees
0xnirmal Jul 22, 2024
5a408f7
Set Default Snowflake WH in dbt_project.yml (#279)
akan72 Jul 15, 2024
3764668
Add Additional Injective Rollups (#297)
akan72 Jul 16, 2024
cfe6ef6
Fix uwu_lend node name (#298)
akan72 Jul 16, 2024
ac2ed41
Chainlink: -rm -rf old models (#293)
SebMelendez01 Jul 16, 2024
d986a2e
Update Staging Warehouses (#299)
akan72 Jul 16, 2024
74b9189
Stablecoin V2: EVM Models (#300)
SebMelendez01 Jul 16, 2024
5506cf4
Used Coingecko Price Data when available (#302)
Sunny77D Jul 16, 2024
6164752
Convert TOL DEX TVL to usd (#304)
Sunny77D Jul 17, 2024
5beeb77
Add additional chains to fact_wormhole_flows (#303)
akan72 Jul 17, 2024
051dcbe
Stablecoin V2: Separating Pre-mint and Bridge Addresses (#305)
SebMelendez01 Jul 17, 2024
6c99391
Stablecoin V2: Split up macros and Test with Base (#306)
SebMelendez01 Jul 17, 2024
11f205b
Renzo Fees and Unique Depositors (#287)
macksed Jul 17, 2024
506326c
Add more fields to CoinGecko share (#307)
0xnirmal Jul 17, 2024
15802e7
Fix Syntax Error in fact_wormhole_flows (#308)
akan72 Jul 18, 2024
33165b2
Stablecoin V2: Ethereum (#309)
SebMelendez01 Jul 18, 2024
ba4feef
Update fact_wormhole_flows.sql (#311)
akan72 Jul 18, 2024
c650613
Son/fact ton apps data (#312)
Sunny77D Jul 18, 2024
42315db
Stablecoin V2: Create Arbitrum Lineage, incremental `stablecoin_metri…
SebMelendez01 Jul 18, 2024
4696cbd
Stablecoin V2: Arbitrum, Stablcoin Balances (#314)
SebMelendez01 Jul 18, 2024
fca30bb
Fix Nit errors for Ton Models (#315)
Sunny77D Jul 19, 2024
bd7c670
Add Injective Flows (#316)
akan72 Jul 19, 2024
df8d9c3
Stablecoin V2: Tagging to Exchange --> CEX, Update P2P to Remove Intr…
SebMelendez01 Jul 19, 2024
fffd836
Stablecoin V2: Optimism Pipeline (#318)
SebMelendez01 Jul 19, 2024
6cdbf47
Add injective trending data (#301)
akan72 Jul 19, 2024
4b92130
Add injective data to gas_dau_txns tables (#310)
akan72 Jul 19, 2024
f11b776
Remove Date Adjustment from Injective Models (#319)
akan72 Jul 19, 2024
9b2da81
Stablecoin V2: Make Ethereum Arb, Base incremental (#320)
SebMelendez01 Jul 19, 2024
3c9a39d
Stablecoin V2: Fix Incremental Run (#321)
SebMelendez01 Jul 20, 2024
657fb19
Stablecoin V2: Optimism (#322)
SebMelendez01 Jul 22, 2024
688264a
Stablecoin V2: Tron (#324)
SebMelendez01 Jul 22, 2024
00c6c24
Fix Column Name in Injective Bridge Flows Data (#323)
akan72 Jul 22, 2024
655da2d
rm stargate artifacts (#325)
akan72 Jul 22, 2024
225f924
Stablecoin V2: Avalanche (#326)
SebMelendez01 Jul 22, 2024
0c0c24c
Stablecoin V2: Polygon (#327)
SebMelendez01 Jul 22, 2024
0bb9f17
Stablecoin V2: Polygon, Tron (#328)
SebMelendez01 Jul 23, 2024
a210524
P2P Tranfers: Tron (#329)
SebMelendez01 Jul 23, 2024
a0cbe42
Stablecoin V2: Artemis Filter (#330)
SebMelendez01 Jul 23, 2024
e642c34
Update naming of TON Metrics (#331)
Sunny77D Jul 23, 2024
63cd2a0
Stablecoin V2: Artemis Filter (#332)
SebMelendez01 Jul 23, 2024
23cc429
Balances: Replace Nulls with Empty Strings (#333)
SebMelendez01 Jul 23, 2024
c396332
Create injective_ibc Rollup (#334)
akan72 Jul 24, 2024
4ba2536
Stablecoin V2: Polygon Address Credits and Ethereum (#335)
SebMelendez01 Jul 24, 2024
5043488
Stablecoin V2: Polygon (#336)
SebMelendez01 Jul 25, 2024
2c9c00b
Stablecoin V2: Tron and Ethereum Balances (#337)
SebMelendez01 Jul 25, 2024
4ad94e2
Stablecoin V2: Ethereum DAI (#338)
SebMelendez01 Jul 27, 2024
fec61de
added ton stablecoin transfers symbol using url (#340)
Sunny77D Jul 30, 2024
e7d60f5
Alw maker new (#339)
alexwes Jul 30, 2024
fe8671d
AAVE (#341)
SebMelendez01 Jul 30, 2024
c2a9f02
removing spaces for snowflake script compatibility (#342)
alexwes Jul 30, 2024
fd3528e
Fixed Sui to not count failed transactions in DAU and transaction cou…
Sunny77D Jul 30, 2024
ebdcbb4
C911: NEAR (#344)
SebMelendez01 Jul 31, 2024
f6ffc31
Bitcoin: MAU and WAU (#345)
SebMelendez01 Jul 31, 2024
27f1d18
Stablecoin V2: Tron and Solana (#346)
SebMelendez01 Jul 31, 2024
331d0fe
C911: Celestia (#347)
SebMelendez01 Jul 31, 2024
3799b79
add realtime mkt data
0xnirmal Aug 1, 2024
734123d
Stablecoin V2: Solana and Clustering (#348)
SebMelendez01 Aug 2, 2024
5879157
Stablecoin V2: Tron (#349)
SebMelendez01 Aug 4, 2024
62ddfae
Stablecoin V2: BSC and Pricing (#350)
SebMelendez01 Aug 5, 2024
1f64b44
Adding new Models: AAVE (#351)
SebMelendez01 Aug 5, 2024
e5c8e62
Stablecoin V2: Fixing Macros (#352)
SebMelendez01 Aug 5, 2024
8b43456
AAVE Fix Safety Incentives (#353)
SebMelendez01 Aug 5, 2024
b4a91db
fixing Maker DQ issue (treasury data not forward filled) (#355)
alexwes Aug 5, 2024
9815805
Fixing Art Share Coingecko Lineage (#354)
SebMelendez01 Aug 5, 2024
c58bfb8
C911 Fixing maker (#357)
SebMelendez01 Aug 6, 2024
7e01ca0
C911: Pushing maker fix (#359)
SebMelendez01 Aug 6, 2024
c2edc24
mkr quick fix + removing some nulls (#360)
alexwes Aug 6, 2024
03b06b3
Added Data sets for KaiChing (#356)
Sunny77D Aug 6, 2024
cdf41a0
Optimize Coingecko Realtime Query (#358)
akan72 Aug 6, 2024
3d626cf
Stablecoin V2: BSC (#361)
SebMelendez01 Aug 6, 2024
3c9e789
Add Ton stablecoin contracts Dimension Model (#362)
Sunny77D Aug 6, 2024
55a34bc
Aave update macros (#363)
SebMelendez01 Aug 7, 2024
414615a
Turned Data Freshness to error instead of warn (#364)
Sunny77D Aug 7, 2024
b822393
Stablecoin V2: Ton (#366)
SebMelendez01 Aug 7, 2024
299eba2
AAVE update ez metrics (#367)
SebMelendez01 Aug 7, 2024
1cd6461
Remove Parallel Finance (#365)
SebMelendez01 Aug 7, 2024
91969b6
aave_quickfix (#368)
SebMelendez01 Aug 7, 2024
5836baa
Stablecoin V2: Forcing Ton P2P Lineage (#369)
SebMelendez01 Aug 7, 2024
c6ecbda
C911: ton stablecoin job (#370)
SebMelendez01 Aug 8, 2024
69655c4
Added Optimism filtered transfers + tagged transfered (#371)
Sunny77D Aug 8, 2024
83d4983
Stablecoin V2: Celo (#372)
SebMelendez01 Aug 8, 2024
7cd8fb5
Stablecoin V2: Clean up (#373)
SebMelendez01 Aug 8, 2024
8c5f0a3
Remove Blast stablecoin from data pipeline (#374)
Sunny77D Aug 8, 2024
12be33f
Stablecoin V2: removing clustering (#375)
SebMelendez01 Aug 8, 2024
2e79ccf
Stablecoin V2: Fixing cKES metrics (#376)
SebMelendez01 Aug 8, 2024
ee74756
Add Blast (#378)
Sunny77D Aug 9, 2024
b930290
C911: AAVE (#377)
SebMelendez01 Aug 9, 2024
7650129
Fixing cKES pricing on v1 tables (#380)
SebMelendez01 Aug 9, 2024
126301d
Stablecoin V2: Adding to Common Database (#381)
SebMelendez01 Aug 10, 2024
19ed701
Adding stablecoin transfers to Art Share (#382)
SebMelendez01 Aug 10, 2024
b05bd2f
C911: Removing Same Chain Inflows and outflows (#383)
SebMelendez01 Aug 10, 2024
8c83a82
C911: Updating Solana Schema's (#384)
SebMelendez01 Aug 11, 2024
be695b7
Paypal: Adding Dim Contracts to Art Share (#385)
SebMelendez01 Aug 11, 2024
19f775f
Solana P2P Token Transfers (#386)
SebMelendez01 Aug 12, 2024
57c6277
added Optimism chain sankey dbt (#388)
Sunny77D Aug 12, 2024
dca7d8d
Optimism Models to Flip the Chain Flow Sankey (#389)
Sunny77D Aug 12, 2024
fd54857
Polygon: Add L1 Da Cost (#390)
SebMelendez01 Aug 13, 2024
2e3f3e0
Alw add uniswap (#387)
alexwes Aug 13, 2024
1c9d6cb
Maker: ez metrics by chain (#391)
alexwes Aug 13, 2024
ac00018
AAVE add raw data (#392)
SebMelendez01 Aug 13, 2024
cb1188f
Updated Ton to use Raw Transaction (#393)
Sunny77D Aug 13, 2024
37fff93
Stablecoin V2: Clustering (#394)
SebMelendez01 Aug 14, 2024
64774df
AAVE update ez metrics (#395)
SebMelendez01 Aug 14, 2024
8011096
Ethereum: Share `dim_contracts_addresses` (#396)
SebMelendez01 Aug 14, 2024
4a83d87
Fix Fact Ton DAU (#397)
Sunny77D Aug 14, 2024
e5af6e1
Adding usdc as an Asset (#398)
Sunny77D Aug 14, 2024
6dbd81b
Adding complete asset queries (#399)
SebMelendez01 Aug 14, 2024
e3b0c54
Adding Hex to UTF8 UDF (#400)
SebMelendez01 Aug 14, 2024
9783ec6
Stablecoin V2: Adding new stablecoin models (#401)
SebMelendez01 Aug 14, 2024
b558a1b
Stablecoin V2: removing clustering on final table (#402)
SebMelendez01 Aug 14, 2024
4ad47d9
Converted Aptos data to incremental (#403)
Sunny77D Aug 15, 2024
9627d24
Added macros for adding new stablecoins (#404)
Sunny77D Aug 16, 2024
e75ecce
AAVE Reserve Factor (#407)
SebMelendez01 Aug 19, 2024
5f0f4ec
Starknet: Dune (#406)
SebMelendez01 Aug 19, 2024
366ffdc
add usdt model (#408)
adim1973 Aug 19, 2024
f6883e0
Paypal: EZ Token Transfers Solana and Ethereum (#409)
SebMelendez01 Aug 19, 2024
aeaeb3d
Making ethereum token transfers incremental (#410)
SebMelendez01 Aug 19, 2024
647f879
Add Drift Trump + Kamala Prediction Market Data (#411)
akan72 Aug 19, 2024
74dc391
Adding complete Lido data models (#405)
alexwes Aug 19, 2024
8daa24c
Updating AAVE Protocol Revenue (#413)
SebMelendez01 Aug 19, 2024
2805f19
Coingecko fixing division by zero (#415)
SebMelendez01 Aug 20, 2024
21fd775
add dai model (#416)
adim1973 Aug 20, 2024
bdd0a93
Add USDe dbt model (#417)
adim1973 Aug 20, 2024
533d735
add PYUSD dbt model (#418)
adim1973 Aug 20, 2024
bc3afab
Fixing Starknet (#419)
SebMelendez01 Aug 20, 2024
bf2533a
Stablecoin V2: Celo Stablecoin Supply (#420)
SebMelendez01 Aug 20, 2024
d73f0ec
add BUSD dbt model (#421)
adim1973 Aug 20, 2024
cd3e31e
converting current_date to to_date(sysdate()) (#422)
alexwes Aug 20, 2024
71b4523
Stablecoin DQ Issue: Celo (#423)
SebMelendez01 Aug 20, 2024
f88e558
Stablecoin V2.5: Stablecoin and Sector Breakdown (#425)
SebMelendez01 Aug 20, 2024
19faf13
Add prediction market metrics to ez_drift_metrics_by_chain (#412)
akan72 Aug 20, 2024
3eed3ec
Son/sei fact transactions (#426)
Sunny77D Aug 20, 2024
0a60d04
Stablecoin V2.5: Adding weekly and monthly breakdowns (#427)
SebMelendez01 Aug 20, 2024
e89d45a
Add polymarket trump and kamala metrics (#428)
akan72 Aug 20, 2024
b0eea5b
updating AAVE ez_metric tables (#429)
SebMelendez01 Aug 21, 2024
d6ec958
Add sell metrics for drift + polymarket (#430)
akan72 Aug 21, 2024
e2bffd2
Stablecoin V2.5 (#431)
SebMelendez01 Aug 21, 2024
234bf5f
Stablecoin v2.5: (#432)
SebMelendez01 Aug 21, 2024
06bb791
Stablecoin V2.5: Clean up stablecoin breakdown (#433)
SebMelendez01 Aug 22, 2024
ebed7f3
Stablecoin V2.5: updating stablecoin pricing for non-usd stablecoins …
SebMelendez01 Aug 22, 2024
ee58343
Son/add fact sei evm transactions (#435)
Sunny77D Aug 22, 2024
a9dced5
add cUSD dbt model (#436)
adim1973 Aug 23, 2024
cd1cbd5
Stablecoins: quickfix (#437)
SebMelendez01 Aug 23, 2024
5e7978e
Stablecoins: Fix Balances Bug (#438)
SebMelendez01 Aug 23, 2024
b285078
Updating Datahub Warehouse (#439)
SebMelendez01 Aug 23, 2024
272460c
Script and AAVE Complete Queries (#440)
SebMelendez01 Aug 23, 2024
5c7d74c
Updated Tagging + Fix Sei Transactions (#441)
Sunny77D Aug 23, 2024
9fd55bf
add EURC dbt model (#442)
adim1973 Aug 24, 2024
aaa234c
add cEUR dbt model (#443)
adim1973 Aug 24, 2024
16babf2
add cKES dbt model (#444)
adim1973 Aug 24, 2024
cef455c
add cREAL dbt model (#445)
adim1973 Aug 24, 2024
bdb17ec
add USDP dbt model (#447)
adim1973 Aug 25, 2024
31b8f48
add USDGLO dbt model (#448)
adim1973 Aug 25, 2024
6900ad1
Updating AAVE with APY (#449)
SebMelendez01 Aug 27, 2024
1c3a28e
adding lido earnings and total expenses (#414)
alexwes Aug 27, 2024
74ad954
Updating coingecko metadata (#452)
SebMelendez01 Aug 29, 2024
f2022ed
updating zksync to be on dune data (#454)
SebMelendez01 Aug 29, 2024
37cc761
Quickfix: Adding chain to zksync query (#455)
SebMelendez01 Aug 29, 2024
08bebac
Stablecoins (TON): Updating stablecoin metrics for ton (#457)
SebMelendez01 Sep 3, 2024
57c897a
[Stablecoin Dashboard] Adding ton stablecoin metrics to ez table (#458)
SebMelendez01 Sep 3, 2024
f03ca3e
Added Defillama as its own project (#459)
Sunny77D Sep 3, 2024
a967a65
Filtered out un verified stablecoin transfers and accounts (#460)
Sunny77D Sep 4, 2024
db1cc67
Stablecoin Dashboard: Adding new stablecoin metrics (#461)
SebMelendez01 Sep 4, 2024
326ed33
Blur: inital fundamentals commit (#453)
alexwes Sep 5, 2024
b52ca10
adding jupiter perps txns + ez metrics by chain (#456)
alexwes Sep 5, 2024
10d04b6
Quick Fix for ton stablecoin (#464)
Sunny77D Sep 5, 2024
4c45ff3
replacing old Axelar data with Axelarscan data (#463)
alexwes Sep 5, 2024
a9853da
Wormhole: EZ metrics + Txns (#465)
alexwes Sep 6, 2024
6769446
Chiliz: Fundamental metrics (#466)
alexwes Sep 6, 2024
0d1a8e8
Customer 911: updating tables to fix issue with near and tron (#471)
SebMelendez01 Sep 6, 2024
70c4dfb
[911 Mitigation] Don't select rows that have null defillamaIds (#472)
anthonyyim Sep 7, 2024
f337073
[Stablecoin V3] Adding models for stablecoin tiles (#473)
SebMelendez01 Sep 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
9 changes: 9 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
repos:
- repo: local
hooks:
- id: sqlfluff-changed-files
name: sqlfluff-changed-files
entry: ./dbt_scripts/run_sqlfluff_on_changed_files.sh
language: script
files: \.sql$
25 changes: 25 additions & 0 deletions .sqlfluff
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# .sqlfluff configuration file
[sqlfluff]
dialect = snowflake
templater = jinja

# General linting rules
[sqlfluff:rules]
max_line_length = 100 # Set maximum line length
tab_space_size = 4 # Define tab space size

# Specific rule configurations
[sqlfluff:rules:L003] # Indentation should be a multiple of 4 spaces
tab_space_size = 4

[sqlfluff:rules:capitalisation.keywords]
capitalisation_policy = upper

[sqlfluff:rules:capitalisation.identifiers] # Inconsistent capitalisation of unquoted identifiers
extended_capitalisation_policy = consistent

[sqlfluff:rules:references.consistent] # Avoid using aliases in join clauses
single_table_references = consistent

[sqlfluff:layout:type:comma]
line_position = leading
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Welcome to the Artemis DBT repository!

### What is this?

This is the home of all of the data-munging business logic that ultimately powers a variety of the data in the Artemis application suite, including the [Terminal](https://app.artemis.xyz/), [Sheets](https://www.artemis.xyz/sheets), and [Snowflake](https://www.artemis.xyz/datashare) integration.
This is the home of all of the data-munging business logic that ultimately powers a variety of the data in the Artemis application suite, including the [Terminal](https://app.artemisanalytics.com/), [Sheets](https://www.artemis.xyz/sheets), and [Snowflake](https://www.artemis.xyz/datashare) integration.

### Who is this for?

Expand Down Expand Up @@ -56,8 +56,9 @@ There are two ways to get help:
## Environment Setup

1. Fork this repository (button towards the top right)
2. Write SQL model changes
3. Open a PR and view results of your changes directly in the Github Actions - more on this in [adding a new metric](#adding-a-new-metric).
2. Run `source syncenv` to download dependencies
3. Write SQL model changes
4. Open a PR and view results of your changes directly in the Github Actions - more on this in [adding a new metric](#adding-a-new-metric).

## System Design

Expand All @@ -71,7 +72,7 @@ Fact tables are then combined into `ez_asset_metrics` tables that are piped into

**BEFORE** adding metrics for a protocol, you must create the asset first.

For example, let's say a user wants to add GEODNET fees to our [DePin dashboard.](https://app.artemis.xyz/sectors?tab=dePin). They must first add the [GEODNET](https://geodnet.com/) asset first by completing the following steps:
For example, let's say a user wants to add GEODNET fees to our [DePin dashboard.](https://app.artemisanalytics.com/sectors?tab=dePin). They must first add the [GEODNET](https://geodnet.com/) asset first by completing the following steps:

- [ ] Fork this repository
- [ ] Add GEODNET to the `databases.csv` file
Expand Down
23 changes: 22 additions & 1 deletion databases.csv
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,37 @@ AVALANCHE_FLIPSIDE
AXELAR_FLIPSIDE
BASE
BASE_FLIPSIDE
BEAM
BEDROCK
BITCOIN
BITCOIN_FLIPSIDE
BLAST
BLAST_FLIPSIDE
BLUR
BSC
BSC_FLIPSIDE
BUSD
CARDANO
CCTP
CELESTIA
CELO
CEUR
CHAINLINK
CKES
COMMON
COMPOUND
COSMOSHUB
CREAL
CUSD
DAI
DEXALOT
DEFILLAMA
DFK
EIGENPIE
ETHEREUM
ETHEREUM_FLIPSIDE
ETHERFI
EURC
FANTOM
FLOW
FLOW_FLIPSIDE
Expand All @@ -40,8 +53,10 @@ IMMUTABLE_X
INTERNET_COMPUTER
INJECTIVE
JUPITER
KAICHING
KELP_DAO
LANDING_DATABASE
MAKER
NEAR
NEAR_FLIPSIDE
OPTIMISM
Expand All @@ -54,6 +69,7 @@ POLYGON
POLYGON_FLIPSIDE
POLYGON_ZK
PUFFER_FINANCE
PYUSD
RAINBOW_BRIDGE
RENZO_PROTOCOL
SEI
Expand All @@ -68,5 +84,10 @@ SWELL
SUI
TON
TRON
ZKSYNC
UNISWAP
USDC
USDE
USDGLO
USDP
USDT
ZKSYNC
133 changes: 133 additions & 0 deletions dbt_project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,139 @@ models:
+snowflake_warehouse: "DAILY_DEFILLAMA"
bam_models:
+snowflake_warehouse: "DAILY_BAM"
staging:
acala:
+snowflake_warehouse: "ACALA"
across:
+snowflake_warehouse: "ACROSS"
akash:
+snowflake_warehouse: "AKASH"
aptos:
+snowflake_warehouse: "APTOS"
arbitrum:
+snowflake_warehouse: "ARBITRUM"
avalanche:
+snowflake_warehouse: "AVALANCHE"
axelar:
+snowflake_warehouse: "AXELAR"
base:
+snowflake_warehouse: "BASE"
beam:
+snowflake_warehouse: "BEAM"
benqi:
+snowflake_warehouse: "BENQI_FINANCE"
bitcoin:
+snowflake_warehouse: "BITCOIN"
blast:
+snowflake_warehouse: "BLAST"
blur:
+snowflake_warehouse: "BLUR"
cardano:
+snowflake_warehouse: "CARDANO"
cctp:
+snowflake_warehouse: "CCTP"
celestia:
+snowflake_warehouse: "CELESTIA"
celo:
+snowflake_warehouse: "CELO"
coinbase:
+snowflake_warehouse: "COINBASE"
compound:
+snowflake_warehouse: "COMPOUND"
cosmoshub:
+snowflake_warehouse: "COSMOSHUB"
curve:
+snowflake_warehouse: "CURVE"
dexalot:
+snowflake_warehouse: "DEXALOT"
dfk:
+snowflake_warehouse: "DFK"
ethereum:
+snowflake_warehouse: "ETHEREUM"
fantom:
+snowflake_warehouse: "FANTOM"
flow:
+snowflake_warehouse: "FLOW"
frax:
+snowflake_warehouse: "FRAX"
fuse:
+snowflake_warehouse: "FUSE"
gnosis:
+snowflake_warehouse: "GNOSIS"
immutable_x:
+snowflake_warehouse: "IMMUTABLE_X"
injective:
+snowflake_warehouse: "INJECTIVE"
lido:
+snowflake_warehouse: "LIDO"
linea:
+snowflake_warehouse: "LINEA"
mantle:
+snowflake_warehouse: "mantle"
moonwell:
+snowflake_warehouse: "MOONWELL"
multiversx:
+snowflake_warehouse: "MULTIVERSX"
optimism:
+snowflake_warehouse: "OPTIMISM"
osmosis:
+snowflake_warehouse: "OSMOSIS"
pancakeswap:
+snowflake_warehouse: "PANCAKESWAP_SM"
polkadot:
+snowflake_warehouse: "POLKADOT"
polygon:
+snowflake_warehouse: "POLYGON"
near:
+snowflake_warehouse: "NEAR"
quickswap:
+snowflake_warehouse: "QUICKSWAP"
radiant:
+snowflake_warehouse: "RADIANT"
rainbow_bridge:
+snowflake_warehouse: "RAINBOW_BRIDGE"
rocketpool:
+snowflake_warehouse: "ROCKETPOOL"
scroll:
+snowflake_warehouse: "SCROLL"
seamless:
+snowflake_warehouse: "SEAMLESSPROTOCOL"
sei:
+snowflake_warehouse: "SEI"
solana:
+snowflake_warehouse: "SOLANA"
sonne:
+snowflake_warehouse: "SONNE_FINANCE"
spark:
+snowflake_warehouse: "SPARK"
stacks:
+snowflake_warehouse: "STACKS"
stader:
+snowflake_warehouse: "STADER"
stakewise:
+snowflake_warehouse: "STAKEWISE"
stride:
+snowflake_warehouse: "STRIDE"
sushiswap:
+snowflake_warehouse: "SUSHISWAP_SM"
ton:
+snowflake_warehouse: "TON"
trader_joe:
+snowflake_warehouse: "TRADER_JOE"
tron:
+snowflake_warehouse: "TRON"
uniswap:
+snowflake_warehouse: "UNISWAP_SM"
uwu_lend:
+snowflake_warehouse: "UWULEND"
venus:
+snowflake_warehouse: "VENUS"
zcash:
+snowflake_warehouse: "ZCASH"
zksync:
+snowflake_warehouse: "ZKSYNC"
zora:
+snowflake_warehouse: "ZORA"

vars:
dbt_date:time_zone: "Etc/UTC"
52 changes: 52 additions & 0 deletions dbt_scripts/create_fidelity_queries.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Assumtions:
# 1. Everything is stored in the projects folder not staging

# Check if exactly one argument is provided
if [ "$#" -ne 1 ]; then
echo "Usage: $0 <project_name>"
exit 1
fi

PROJECT_NAME="$1"

INPUT_FOLDER="models/projects/$PROJECT_NAME"
OUTPUT_FOLDER="models/_complete_asset_models/$PROJECT_NAME"

mkdir -p "$OUTPUT_FOLDER"

BACKUP_FILE="materialized_backup.txt"

echo "Backing up original materialized settings with filenames..."
grep -r 'materialized="' "$INPUT_FOLDER" | sed 's/^\(.*\):.*materialized="\(.*\)".*/\1:\2/' > "$BACKUP_FILE"

echo "Changing all materialized settings to ephemeral..."
find "$INPUT_FOLDER" -type f -name "*.sql" | while read -r file; do
sed -i '' 's/materialized="table"/materialized="ephemeral"/' "$file"
sed -i '' 's/materialized="incremental"/materialized="ephemeral"/' "$file"
done

CORE_FOLDER_PATH="$INPUT_FOLDER/core"
echo "Running dbt compile for each file..."
find "$CORE_FOLDER_PATH" -type f -name "*.sql" | while read -r file; do
base_filename=$(basename "$file" .sql)

output_file="$OUTPUT_FOLDER/${base_filename}__complete__.sql"

dbt compile --select "$file" > "$output_file"
# Remove unwanted log lines from the first 7 lines of the output file
head -n 7 "$output_file" | sed '/^\[0m/d' | sed '/^Found /d' | sed '/^Concurrency: /d' > "${output_file}.tmp"
tail -n +8 "$output_file" >> "${output_file}.tmp"
mv "${output_file}.tmp" "$output_file"

echo "Compiled and created: $output_file"
done

#Restore the original `materialized` settings
echo "Restoring original materialized settings..."
while IFS=: read -r filepath materialized_value; do
sed -i '' "s/materialized=\"ephemeral\"/materialized=\"$materialized_value\"/" "$filepath"
done < "$BACKUP_FILE"

Clean up the backup file
rm "$BACKUP_FILE"
echo "All files restored to original materialized settings."
19 changes: 19 additions & 0 deletions dbt_scripts/run_sqlfluff_on_changed_files.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash
# Get the list of changed SQL files
CHANGED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep '\.sql$')

if [ -z "$CHANGED_FILES" ]; then
echo "No changed SQL files to lint"
exit 0
fi

# Run SQLFluff on each changed SQL file
for file in $CHANGED_FILES; do
sqlfluff fix "$file"
if [ $? -ne 0 ]; then
echo "SQLFluff found issues in $file"
exit 1
fi
done

exit 0
Loading
Loading