forked from duneanalytics/spellbook
-
Notifications
You must be signed in to change notification settings - Fork 1
/
dbt_project.yml
628 lines (577 loc) · 14.3 KB
/
dbt_project.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
#Welcome to your Spellbook!
name: "spellbook"
version: "1.0.0"
config-version: 2
# This setting configures which "profile" dbt uses for this project.
profile: "spellbook"
vars:
DBT_ENV_CUSTOM_ENV_S3_BUCKET: "{{ env_var('DBT_ENV_CUSTOM_ENV_S3_BUCKET', 'local') }}"
# These configurations specify where dbt should look for different types of files.
# You don't need to change these!
model-paths: ["models"]
analysis-paths: ["analyses"]
test-paths: ["tests"]
seed-paths: ["seeds"]
macro-paths: ["macros"]
snapshot-paths: ["snapshots"]
target-path: "target" # directory which will store compiled SQL files
clean-targets: # directories to be removed by `dbt clean`
- "target"
- "dbt_packages"
# Configuring models
# Full documentation: https://docs.getdbt.com/docs/configuring-models
models:
spellbook:
+post-hook:
sql: "{{ optimize_spell(this, model.config.materialized) }}"
transaction: true
aave:
+schema: aave
+materialized: view
ethereum:
+schema: aave_ethereum
+materialized: view
optimism:
+schema: aave_optimism
+materialized: view
balancer:
+schema: balancer
+materialized: view
ethereum:
+schema: balancer_ethereum
+materialized: view
ens:
+schema: ens
+materialized: view
airdrop:
+schema: airdrop
+materialized: table
optimism:
+schema: airdrop_optimism
+materialized: table
dex:
+schema: dex
+materialized: view
aggregator:
+schema: dex_aggregator
+materialized: view
nft:
+schema: nft
+materialized: view
ethereum:
+schema: nft_ethereum
+materialized: view
metadata:
+schema: nft_ethereum_metadata
+materialized: view
bnb:
+schema: nft_bnb
+materialized: view
avalanche_c:
+schema: nft_avalanche_c
+materialized: view
polygon:
+schema: nft_polygon
+materialized: view
uniswap:
+schema: uniswap
+materialized: view
arbitrum:
+schema: uniswap_arbitrum
+materialized: view
ethereum:
+schema: uniswap_ethereum
+materialized: view
optimism:
+schema: uniswap_optimism
+materialized: view
sushiswap:
+schema: sushiswap
+materialized: view
ethereum:
+schema: sushiswap_ethereum
+materialized: view
avalanche_c:
+schema: sushiswap_avalanche_c
+materialized: view
gnosis:
+schema: sushiswap_gnosis
+materialized: view
opensea:
+schema: opensea
+materialized: view
ethereum:
+schema: opensea_ethereum
+materialized: view
solana:
+schema: opensea_solana
+materialized: view
element:
+schema: element
+materialized: view
ethereum:
+schema: element_ethereum
+materialized: view
bnb:
+schema: element_bnb
+materialized: view
avalanche_c:
+schema: element_avalanche_c
+materialized: view
superrare:
+schema: superrare
+materialized: view
looksrare:
+schema: looksrare
+materialized: view
ethereum:
+schema: looksrare_ethereum
+materialized: view
foundation:
+schema: foundation
+materialized: view
ethereum:
+schema: foundation_ethereum
+materialized: view
blur:
+schema: blur
+materialized: view
ethereum:
+schema: blur_ethereum
+materialized: view
gas:
+schema: gas
+materialized: view
ethereum:
+schema: gas_ethereum
+materialized: view
bnb:
+schema: gas_bnb
+materialized: view
avalanche_c:
+schema: gas_avalanche_c
+materialized: view
optimism:
+schema: gas_optimism
+materialized: view
gmx:
+schema: gmx
+materialized: view
arbitrum:
+schema: gmx_arbitrum
+materialized: view
x2y2:
+schema: x2y2
+materialized: view
ethereum:
+schema: x2y2_ethereum
+materialized: view
zora:
+schema: zora
+materialized: view
ethereum:
+schema: zora_ethereum
+materialized: view
magiceden:
+schema: magiceden
+materialized: view
solana:
+schema: magiceden_solana
+materialized: view
nomad:
+schema: nomad
+materialized: view
ethereum:
+schema: nomad_ethereum
+materialized: view
seaport:
+schema: seaport
+materialized: view
ethereum:
+schema: seaport_ethereum
+materialized: view
balances:
+schema: balances
+materialized: view
ethereum:
+schema: balances_ethereum
+materialized: view
dodo:
+schema: dodo
+materialized: view
ethereum:
+schema: dodo_ethereum
+materialized: view
labels:
+schema: labels
+materialized: view
daos:
+schema: daos
+materialized: view
addresses:
+schema: addresses
+materialized: table
ethereum:
+schema: addresses_ethereum
+materialized: table
optimism:
+schema: addresses_optimism
+materialized: table
addresses_events:
+schema: addresses_events
+materialized: table
ethereum:
+schema: addresses_events_ethereum
+materialized: table
tokens:
+schema: tokens
+materialized: view
ethereum:
+schema: tokens_ethereum
+materialized: view
optimism:
+schema: tokens_optimism
+materialized: view
avalanche_c:
+schema: tokens_avalanche_c
bnb:
+schema: tokens_bnb
+materialized: view
gnosis:
+schema: tokens_gnosis
+materialized: view
arbitrum:
+schema: tokens_arbitrum
+materialized: view
transfers:
+schema: transfers
+materialized: view
ethereum:
+schema: transfers_ethereum
+materialized: view
optimism:
+schema: transfers_optimism
bnb:
+schema: transfers_bnb
+materialized: view
sudoswap:
+schema: sudoswap
+materialized: view
ethereum:
+schema: sudoswap_ethereum
+materialized: view
safe:
+schema: safe
+materialized: view
ethereum:
+schema: safe_ethereum
+materialized: view
cryptopunks:
+schema: cryptopunks
+materialized: view
ethereum:
+schema: cryptopunks_ethereum
+materialized: view
tornado_cash:
+schema: tornado_cash
+materialized: view
perpetual:
+schema: perpetual
+materialized: view
perpetual_protocol:
+schema: perpetual_protocol
+materialized: view
optimism:
+schema: perpetual_protocol_optimism
+materialized: view
pika:
+schema: pika
+materialized: view
optimism:
+schema: pika_optimism
+materialized: view
synthetix:
+schema: synthetix
+materialized: view
optimism:
+schema: synthetix_optimism
archipelago:
+schema: archipelago
+materialized: view
ethereum:
+schema: archipelago_ethereum
+materialized: view
integration_test:
+schema: integration_test
+materialized: view
curvefi:
+schema: curvefi
+materialized: view
ethereum:
+schema: curvefi_ethereum
+materialized: view
cow_protocol:
+schema: cow_protocol
+materialized: view
ethereum:
+schema: cow_protocol_ethereum
+materialized: view
gnosis:
+schema: cow_protocol_gnosis
+materialized: view
ironbank:
+schema: ironbank
+materialized: view
ethereum:
+schema: ironbank_ethereum
+materialized: view
optimism:
+schema: ironbank_optimism
+materialized: view
keep3r_network:
+schema: keep3r_network
+materialized: view
ethereum:
+schema: keep3r_network_ethereum
+materialized: view
airswap:
+schema: airswap
+materialized: view
ethereum:
+schema: airswap_ethereum
+materialized: view
chainlink:
+schema: chainlink
+materialized: view
optimism:
+schema: chainlink_optimism
+materialized: view
contracts:
+schema: contracts
+materialized: view
optimism:
+schema: contracts_optimism
+materialized: view
clipper:
+schema: clipper
+materialized: view
ethereum:
+schema: clipper_ethereum
+materialized: view
reaper:
+schema: reaper
+materialized: view
optimism:
+schema: reaper_optimism
+materialized: view
defiswap:
+schema: defiswap
+materialized: view
ethereum:
+schema: defiswap_ethereum
+materialized: view
swapr:
+schema: swapr
+materialized: view
ethereum:
+schema: swapr_ethereum
+materialized: view
dfx:
+schema: dfx
+materialized: view
ethereum:
+schema: dfx_ethereum
+materialized: view
shibaswap:
+schema: shibaswap
+materialized: view
ethereum:
+schema: shibaswap_ethereum
+materialized: view
pancakeswap:
+schema: pancakeswap
+materialized: view
bnb:
+schema: pancakeswap_bnb
+materialized: view
fraxswap:
+schema: fraxswap
+materialized: view
avalanche_c:
+schema: fraxswap_avalanche_c
+materialized: view
mstable:
+schema: mstable
+materialized: view
ethereum:
+schema: mstable_ethereum
+materialized: view
hashflow:
+schema: hashflow
+materialized: view
ethereum:
+schema: hashflow_ethereum
+materialized: view
seeds:
spellbook:
balances:
ethereum:
+enabled: true
+schema: test_data
balances_ethereum_erc20_latest_entries:
+column_types:
timestamp: timestamp
wallet_address: string
token_address: string
amount_raw: string
balances_ethereum_erc20_specific_wallet:
+column_types:
timestamp: timestamp
wallet_address: string
token_address: string
token_symbol: string
amount_raw: string
amount: string
opensea:
ethereum:
+enabled: true
+schema: test_data
opensea_ethereum_trades_postgres:
+column_types:
evt_block_time: timestamp
evt_tx_hash: string
price: string
solana:
+enabled: true
+schema: test_data
opensea_solana_trades_solscan:
+column_types:
block_time: timestamp
tx_hash: string
amount: string
magiceden:
solana:
+enabled: true
+schema: test_data
magiceden_solana_trades_solscan:
+column_types:
block_time: timestamp
tx_hash: string
amount: string
ens:
+enabled: true
+schema: test_data
dex:
+enabled: true
+schema: test_data
trades:
+column_types:
blockchain: string
project: string
version: string
block_date: date
tx_hash: string
evt_index: int
token_bought_address: string
token_bought_amount: float
token_sold_address: string
token_sold_amount: float
sudoswap:
+enabled: true
+schema: test_data
sudoswap_ethereum_example_trades:
+column_types:
block_number: long
tx_hash: string
trade_category: string
nft_contract_address: string
token_id: string
amount_original: double
platform_fee_amount: double
pool_fee_amount: double
cryptopunks:
+enabled: true
+schema: test_data
cryptopunks_trades_buys_bids_seed:
+column_types:
test_description: string
blockchain: string
project: string
version: string
block_number: string
block_date: date
tx_hash: string
token_id: string
seller: string
buyer: string
amount_raw: string
currency_contract: string
daos:
+enabled: true
+schema: test_data
daos_addresses_seed:
+column_types:
blockchain: string
dao_creator_tool: string
dao: string
dao_wallet_address: string
created_date: date
daos_transactions_seed:
+column_types:
blockchain: string
dao_creator_tool: string
dao: string
dao_wallet_address: string
value: float
block_date: date
tx_type: string
tx_hash: string
curvefi:
ethereum:
+enabled: true
+schema: test_data
nft:
+enabled: true
+schema: test_data
nft_linked_addresses_postgres:
+column_types:
master_address: string
alternative_address: string
perpetual:
+enabled: true
+schema: test_data
trades:
+column_types:
blockchain: string
block_date: date
underlying_asset: string
market: string
market_address: string
trade: string
project: string
version: string
tx_hash: string
transfers:
bnb:
+enabled: true
+schema: test_data
transfers_bnb_bep20_agg_day_v2:
+column_types:
blockchain: string
day: date
wallet_address: string
token_address: string
symbol: string
amount_raw: double
amount: double
tx_num: long
transfers_bnb_bep20_agg_hour_v2:
+column_types:
blockchain: string
hour: timestamp
wallet_address: string
token_address: string
symbol: string
amount_raw: double
amount: double
tx_num: long