Skip to content

Commit 2df2d33

Browse files
chore: add dbt-osmosis
1 parent 8def99f commit 2df2d33

27 files changed

+1208
-155
lines changed

dbt_project.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ clean-targets: # directories to be removed by `dbt clean`
3131
# files using the `{{ config(...) }}` macro.
3232
models:
3333
mezo:
34+
+dbt-osmosis: "{model}.yml"
3435
submission_method: bigframes
3536
notebook_template_id: 6574243905263370240
3637
packages: []
@@ -44,4 +45,7 @@ models:
4445
+materialized: view
4546
80_marts:
4647
schema: "marts"
47-
+materialized: table
48+
+materialized: table
49+
seeds:
50+
mezo:
51+
+dbt-osmosis: "{model}.yml"

models/00_sources/coin_gecko.yml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,30 @@ sources:
44
schema: raw_coin_gecko
55
tables:
66
- name: coins
7-
- name: prices
7+
columns:
8+
- name: id
9+
data_type: STRING
10+
- name: symbol
11+
data_type: STRING
12+
- name: name
13+
data_type: STRING
14+
- name: platforms
15+
data_type: JSON
16+
- name: _dlt_load_id
17+
data_type: STRING
18+
- name: _dlt_id
19+
data_type: STRING
20+
- name: prices
21+
columns:
22+
- name: id
23+
data_type: STRING
24+
- name: coin_id
25+
data_type: STRING
26+
- name: usd_value
27+
data_type: FLOAT64
28+
- name: last_updated_at
29+
data_type: TIMESTAMP
30+
- name: _dlt_load_id
31+
data_type: STRING
32+
- name: _dlt_id
33+
data_type: STRING

models/00_sources/goldsky.yml

Lines changed: 191 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,200 @@ sources:
44
schema: raw_goldsky
55
tables:
66
- name: raw_goldsky_musd_trove_manager__liquidation
7+
columns:
8+
- name: vid
9+
data_type: INT64
10+
- name: block
11+
data_type: INT64
12+
- name: id
13+
data_type: STRING
14+
- name: block_number
15+
data_type: BIGNUMERIC
16+
- name: timestamp
17+
data_type: BIGNUMERIC
18+
- name: transaction_hash
19+
data_type: STRING
20+
- name: contract_id
21+
data_type: STRING
22+
- name: liquidated_principal
23+
data_type: BIGNUMERIC
24+
- name: liquidated_interest
25+
data_type: BIGNUMERIC
26+
- name: liquidated_coll
27+
data_type: BIGNUMERIC
28+
- name: coll_gas_compensation
29+
data_type: BIGNUMERIC
30+
- name: gas_compensation
31+
data_type: BIGNUMERIC
32+
- name: _gs_chain
33+
data_type: STRING
34+
- name: _gs_gid
35+
data_type: STRING
36+
- name: event_date
37+
data_type: DATE
738
- name: raw_goldsky_musd_trove_manager__trove_liquidated
39+
columns:
40+
- name: vid
41+
data_type: INT64
42+
- name: block
43+
data_type: INT64
44+
- name: id
45+
data_type: STRING
46+
- name: block_number
47+
data_type: BIGNUMERIC
48+
- name: timestamp
49+
data_type: BIGNUMERIC
50+
- name: transaction_hash
51+
data_type: STRING
52+
- name: contract_id
53+
data_type: STRING
54+
- name: borrower
55+
data_type: STRING
56+
- name: debt
57+
data_type: BIGNUMERIC
58+
- name: coll
59+
data_type: BIGNUMERIC
60+
- name: operation
61+
data_type: STRING
62+
- name: _gs_chain
63+
data_type: STRING
64+
- name: _gs_gid
65+
data_type: STRING
66+
- name: event_date
67+
data_type: DATE
868
- name: raw_goldsky_borrower_operations_mezo__trove_updated
69+
columns:
70+
- name: block
71+
data_type: INT64
72+
- name: block_number
73+
data_type: BIGNUMERIC
74+
- name: timestamp
75+
data_type: BIGNUMERIC
76+
- name: transaction_hash
77+
data_type: STRING
78+
- name: contract_id
79+
data_type: STRING
80+
- name: borrower
81+
data_type: STRING
82+
- name: principal
83+
data_type: BIGNUMERIC
84+
- name: interest
85+
data_type: BIGNUMERIC
86+
- name: coll
87+
data_type: BIGNUMERIC
88+
- name: stake
89+
data_type: BIGNUMERIC
90+
- name: interest_rate
91+
data_type: BIGNUMERIC
92+
- name: last_interest_update_time
93+
data_type: BIGNUMERIC
94+
- name: operation
95+
data_type: STRING
96+
- name: _gs_chain
97+
data_type: STRING
98+
- name: _gs_gid
99+
data_type: STRING
100+
- name: event_date
101+
data_type: DATE
9102
- name: raw_goldsky_market_mezo__donated
103+
columns:
104+
- name: block
105+
data_type: INT64
106+
- name: block_number
107+
data_type: BIGNUMERIC
108+
- name: timestamp
109+
data_type: BIGNUMERIC
110+
- name: transaction_hash
111+
data_type: STRING
112+
- name: contract_id
113+
data_type: STRING
114+
- name: donor
115+
data_type: STRING
116+
- name: beneficiary_id
117+
data_type: STRING
118+
- name: recipient
119+
data_type: STRING
120+
- name: amount
121+
data_type: BIGNUMERIC
122+
- name: _gs_chain
123+
data_type: STRING
124+
- name: _gs_gid
125+
data_type: STRING
126+
- name: event_date
127+
data_type: DATE
10128
- name: raw_goldsky_market_mezo__order_placed
129+
columns:
130+
- name: block
131+
data_type: INT64
132+
- name: block_number
133+
data_type: BIGNUMERIC
134+
- name: timestamp
135+
data_type: BIGNUMERIC
136+
- name: transaction_hash
137+
data_type: STRING
138+
- name: contract_id
139+
data_type: STRING
140+
- name: order_id
141+
data_type: STRING
142+
- name: customer
143+
data_type: STRING
144+
- name: product_id
145+
data_type: STRING
146+
- name: price
147+
data_type: BIGNUMERIC
148+
- name: _gs_chain
149+
data_type: STRING
150+
- name: _gs_gid
151+
data_type: STRING
152+
- name: event_date
153+
data_type: DATE
11154
- name: raw_goldsky_mezo_bridge_mainnet__assets_locked
155+
columns:
156+
- name: block
157+
data_type: INT64
158+
- name: block_number
159+
data_type: BIGNUMERIC
160+
- name: timestamp
161+
data_type: BIGNUMERIC
162+
- name: transaction_hash
163+
data_type: STRING
164+
- name: contract_id
165+
data_type: STRING
166+
- name: sequence_number
167+
data_type: BIGNUMERIC
168+
- name: recipient
169+
data_type: STRING
170+
- name: token
171+
data_type: STRING
172+
- name: amount
173+
data_type: BIGNUMERIC
174+
- name: _gs_chain
175+
data_type: STRING
176+
- name: _gs_gid
177+
data_type: STRING
178+
- name: event_date
179+
data_type: DATE
12180
- name: raw_goldsky_mezo_vaults_mezo__transfer
181+
columns:
182+
- name: block
183+
data_type: INT64
184+
- name: block_number
185+
data_type: BIGNUMERIC
186+
- name: timestamp
187+
data_type: BIGNUMERIC
188+
- name: transaction_hash
189+
data_type: STRING
190+
- name: contract_id
191+
data_type: STRING
192+
- name: from
193+
data_type: STRING
194+
- name: to
195+
data_type: STRING
196+
- name: value
197+
data_type: BIGNUMERIC
198+
- name: _gs_chain
199+
data_type: STRING
200+
- name: _gs_gid
201+
data_type: STRING
202+
- name: event_date
203+
data_type: DATE
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
version: 2
2+
models:
3+
- name: stg_coin_gecko__coins
4+
columns:
5+
- name: id
6+
data_type: STRING
7+
- name: symbol
8+
data_type: STRING
9+
- name: name
10+
data_type: STRING
11+
- name: platforms
12+
data_type: JSON
13+
- name: _dlt_load_id
14+
data_type: STRING
15+
- name: _dlt_id
16+
data_type: STRING
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
version: 2
2+
models:
3+
- name: stg_coin_gecko__prices
4+
columns:
5+
- name: id
6+
data_type: STRING
7+
- name: coin_id
8+
data_type: STRING
9+
- name: usd_value
10+
data_type: FLOAT64
11+
- name: last_updated_at
12+
data_type: TIMESTAMP
13+
- name: _dlt_load_id
14+
data_type: STRING
15+
- name: _dlt_id
16+
data_type: STRING
Lines changed: 29 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,65 @@
11
models:
22
- name: stg_goldsky_borrower_operations_mezo__trove_updated
3-
description: Processes raw trove updated data from borrower operations, transforming and normalizing currency fields for downstream analysis.
3+
description: >-
4+
Processes raw trove updated data from borrower operations, transforming and normalizing currency
5+
fields for downstream analysis.
46
columns:
57
- name: block
68
description: Block number in which this event occurred
7-
9+
data_type: INT64
810
- name: block_number
911
description: Block number as a high-precision numeric value
10-
12+
data_type: BIGNUMERIC
1113
- name: transaction_hash
1214
description: Hash of the transaction that emitted this event
1315
data_tests:
1416
- not_null
1517

18+
data_type: STRING
1619
- name: contract_id
1720
description: Address of the contract that emitted the event
1821
data_tests:
1922
- not_null
2023

24+
data_type: STRING
2125
- name: borrower
2226
description: Address of the borrower
2327
data_tests:
2428
- not_null
2529

30+
data_type: STRING
31+
- name: last_interest_update_time
32+
description: Timestamp of the last interest update
33+
data_type: BIGNUMERIC
34+
- name: _gs_chain
35+
description: Chain where the event originated, e.g., 'mezo'
36+
data_type: STRING
37+
- name: _gs_gid
38+
description: Unique identifier from Goldsky for the event
39+
data_type: STRING
40+
- name: record_timestamp
41+
description: Timestamp of the event formatted as a datetime
42+
data_tests:
43+
- not_null
44+
data_type: TIMESTAMP
45+
- name: operation
46+
description: Type of operation performed on the trove
47+
data_type: STRING
2648
- name: principal
2749
description: Principal debt amount (normalized currency)
2850
data_tests:
2951
- not_null
3052

53+
data_type: NUMERIC
3154
- name: interest
3255
description: Interest amount (normalized currency)
33-
56+
data_type: NUMERIC
3457
- name: collateral
3558
description: Collateral amount (normalized currency)
3659
data_tests:
3760
- not_null
3861

62+
data_type: NUMERIC
3963
- name: stake
4064
description: Stake amount (normalized currency)
41-
42-
- name: interest_rate
43-
description: Interest rate for the trove.
44-
45-
- name: last_interest_update_time
46-
description: Timestamp of the last interest update
47-
48-
- name: operation
49-
description: Type of operation performed on the trove
50-
51-
- name: _gs_chain
52-
description: Chain where the event originated, e.g., 'mezo'
53-
54-
- name: _gs_gid
55-
description: Unique identifier from Goldsky for the event
56-
57-
- name: record_timestamp
58-
description: Timestamp of the event formatted as a datetime
59-
data_tests:
60-
- not_null
65+
data_type: NUMERIC

0 commit comments

Comments
 (0)