forked from duneanalytics/spellbook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdbt_project.yml
656 lines (561 loc) · 13.6 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
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
#Welcome to your Spellbook!
name: "spellbook"
version: "1.0.0"
config-version: 2
quoting:
database: false
schema: false
identifier: false
# This setting configures which "profile" dbt uses for this project.
profile: "spellbook-local"
vars:
DBT_ENV_CUSTOM_ENV_S3_BUCKET: "{{ env_var('DBT_ENV_CUSTOM_ENV_S3_BUCKET', 'local') }}"
DBT_ENV_INCREMENTAL_TIME: "{{ env_var('DBT_ENV_INCREMENTAL_TIME', '1') }}"
DBT_ENV_INCREMENTAL_TIME_UNIT: "{{ env_var('DBT_ENV_INCREMENTAL_TIME_UNIT', 'day') }}"
ETH_ERC20_ADDRESS: '0x0000000000000000000000000000000000000000'
# These configurations specify where dbt should look for different types of files.
# You don't need to change these!
model-paths: ["models", "sources"]
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 tests
# Full documentation: https://docs.getdbt.com/reference/test-configs
tests:
spellbook:
+store_failures: true # store failures for all tests
# Configuring seeds
# Full documentation: https://docs.getdbt.com/reference/seed-configs
# For configuring individual seeds (e.g. overriding column types) we recommend a yml file nested in the same folder as the seed
# example: seeds/cryptopunks/schema.yml
seeds:
spellbook:
+schema: test_data
# Configuring models
# Full documentation: https://docs.getdbt.com/docs/configuring-models
models:
spellbook:
+post-hook:
- sql: "{{ set_trino_session_property(is_materialized(model), 'writer_scaling_min_data_processed', model.config.get('writer_min_size', '500MB')) }}"
transaction: true
- sql: "{{ set_trino_session_property(is_materialized(model), 'task_scale_writers_enabled', false) }}"
transaction: true
- sql: "{{ optimize_spell(this, model.config.materialized) }}"
transaction: true
- sql: "{{ mark_as_spell(this, model.config.materialized) }}"
transaction: true
+materialized: view
+schema: no_schema # this should be overridden in model specific configs
+view_security: invoker
dex:
+schema: dex
cex:
+schema: cex
arbitrum:
+schema: cex_arbitrum
avalanche_c:
+schema: cex_avalanche_c
bnb:
+schema: cex_bnb
ethereum:
+schema: cex_ethereum
optimism:
+schema: cex_optimism
polygon:
+schema: cex_polygon
fantom:
+schema: cex_fantom
bitcoin:
+schema: cex_bitcoin
uniswap:
+schema: uniswap
arbitrum:
+schema: uniswap_arbitrum
ethereum:
+schema: uniswap_ethereum
optimism:
+schema: uniswap_optimism
polygon:
+schema: uniswap_polygon
bnb:
+schema: uniswap_bnb
base:
+schema: uniswap_base
celo:
+schema: uniswap_celo
balances:
+schema: balances
ethereum:
+schema: balances_ethereum
arbitrum:
+schema: balances_arbitrum
bnb:
+schema: balances_bnb
polygon:
+schema: balances_polygon
dodo:
+schema: dodo
ethereum:
+schema: dodo_ethereum
bnb:
+schema: dodo_bnb
polygon:
+schema: dodo_polygon
arbitrum:
+schema: dodo_arbitrum
optimism:
+schema: dodo_optimism
base:
+schema: dodo_base
labels:
+schema: labels
+materialized: table
+file_format: delta
dao:
+schema: dao
addresses:
+schema: addresses
ethereum:
+schema: addresses_ethereum
tokens:
+schema: tokens
+materialized: table
+file_format: delta
solana_utils:
+schema: solana_utils
odos:
+schema: odos
avalanche_c:
+schema: odos_avalanche_c
transfers:
+schema: transfers
ethereum:
+schema: transfers_ethereum
optimism:
+schema: transfers_optimism
bnb:
+schema: transfers_bnb
arbitrum:
+schema: transfers_arbitrum
polygon:
+schema: transfers_polygon
base:
+schema: transfers_base
celo:
+schema: transfers_celo
sudoswap:
+schema: sudoswap
ethereum:
+schema: sudoswap_ethereum
safe:
+schema: safe
ethereum:
+schema: safe_ethereum
optimism:
+schema: safe_optimism
gnosis:
+schema: safe_gnosis
polygon:
+schema: safe_polygon
bnb:
+schema: safe_bnb
avalanche_c:
+schema: safe_avalanche_c
fantom:
+schema: safe_fantom
arbitrum:
+schema: safe_arbitrum
goerli:
+schema: safe_goerli
base:
+schema: safe_base
lifi:
+schema: lifi
fantom:
+schema: lifi_fantom
optimism:
+schema: lifi_optimism
aragon:
+schema: aragon
ethereum:
+schema: aragon_ethereum
gnosis:
+schema: aragon_gnosis
polygon:
+schema: aragon_polygon
base:
+schema: aragon_base
arbitrum:
+schema: aragon_arbitrum
spiritswap:
+schema: spiritswap
fantom:
+schema: spiritswap_fantom
jarvis_network:
+schema: jarvis_network
polygon:
+schema: jarvis_network_polygon
cryptopunks:
+schema: cryptopunks
ethereum:
+schema: cryptopunks_ethereum
spaceid:
+schema: spaceid
bnb:
+schema: spaceid_bnb
spartacus_exchange:
+schema: spartacus_exchange
fantom:
+schema: spartacus_exchange_fantom
tornado_cash:
+schema: tornado_cash
arbitrum:
+schema: tornado_cash_arbitrum
avalanche_c:
+schema: tornado_cash_avalanche_c
bnb:
+schema: tornado_cash_bnb
ethereum:
+schema: tornado_cash_ethereum
gnosis:
+schema: tornado_cash_gnosis
optimism:
+schema: tornado_cash_optimism
polygon:
+schema: tornado_cash_polygon
perpetual:
+schema: perpetual
perpetual_protocol:
+schema: perpetual_protocol
optimism:
+schema: perpetual_protocol_optimism
pika:
+schema: pika
optimism:
+schema: pika_optimism
synthetix:
+schema: synthetix
optimism:
+schema: synthetix_optimism
synapse:
+schema: synapse
arbitrum:
+schema: synapse_arbitrum
avalanche_c:
+schema: synapse_avalanche_c
bnb:
+schema: synapse_bnb
ethereum:
+schema: synapse_ethereum
fantom:
+schema: synapse_fantom
optimism:
+schema: synapse_optimism
polygon:
+schema: synapse_polygon
fiat_dao:
+schema: fiat_dao
ethereum:
+schema: fiat_dao_ethereum
curvefi:
+schema: curvefi
ethereum:
+schema: curvefi_ethereum
optimism:
+schema: curvefi_optimism
fantom:
+schema: curvefi_fantom
cow_protocol:
+schema: cow_protocol
ethereum:
+schema: cow_protocol_ethereum
gnosis:
+schema: cow_protocol_gnosis
ironbank:
+schema: ironbank
ethereum:
+schema: ironbank_ethereum
optimism:
+schema: ironbank_optimism
camelot:
+schema: camelot
arbitrum:
+schema: camelot_arbitrum
reaper:
+schema: reaper
optimism:
+schema: reaper_optimism
yield_yak:
+schema: yield_yak
avalanche_c:
+schema: yield_yak_avalanche_c
kyberswap:
+schema: kyberswap
avalanche_c:
+schema: kyberswap_avalanche_c
optimism:
+schema: kyberswap_optimism
ethereum:
+schema: kyberswap_ethereum
arbitrum:
+schema: kyberswap_arbitrum
bnb:
+schema: kyberswap_bnb
polygon:
+schema: kyberswap_polygon
hashflow:
+schema: hashflow
ethereum:
+schema: hashflow_ethereum
avalanche_c:
+schema: hashflow_avalanche_c
bnb:
+schema: hashflow_bnb
nexusmutual:
+schema: nexusmutual
ethereum:
+schema: nexusmutual_ethereum
zeroex:
+schema: zeroex
ethereum:
+schema: zeroex_ethereum
optimism:
+schema: zeroex_optimism
polygon:
+schema: zeroex_polygon
avalanche_c:
+schema: zeroex_avalanche_c
fantom:
+schema: zeroex_fantom
arbitrum:
+schema: zeroex_arbitrum
bnb:
+schema: zeroex_bnb
celo:
+schema: zeroex_celo
ampleforth:
+schema: ampleforth
ethereum:
+schema: ampleforth_ethereum
apecoin:
+schema: apecoin
ethereum:
+schema: apecoin_ethereum
pangolin:
+schema: pangolin
avalanche_c:
+schema: pangolin_avalanche_c
giveth:
+schema: giveth
gnosis:
+schema: giveth_gnosis
genie:
+schema: genie
ethereum:
+schema: genie_ethereum
forta_network:
+schema: forta_network
ethereum:
+schema: forta_network_ethereum
gas_dao:
+schema: gas_dao
ethereum:
+schema: gas_dao_ethereum
ribbon:
+schema: ribbon
ethereum:
+schema: ribbon_ethereum
galxe:
+schema: galxe
ethereum:
+schema: galxe_ethereum
optimism:
+schema: galxe_optimism
gearbox:
+schema: gearbox
ethereum:
+schema: gearbox_ethereum
snowswap:
+schema: snowswap
ethereum:
+schema: snowswap_ethereum
arbitrum:
+schema: arbitrum
arbitrum:
+schema: arbitrum_arbitrum
forefront:
+schema: forefront
ethereum:
+schema: forefront_ethereum
component:
+schema: component
ethereum:
+schema: component_ethereum
alchemydao:
+schema: alchemydao
ethereum:
+schema: alchemydao_ethereum
tokenfy:
+schema: tokenfy
ethereum:
+schema: tokenfy_ethereum
tokenlon:
+schema: tokenlon
ethereum:
+schema: tokenlon_ethereum
thales:
+schema: thales
ethereum:
+schema: thales_ethereum
shapeshift:
+schema: shapeshift
ethereum:
+schema: shapeshift_ethereum
value_defi:
+schema: value_defi
ethereum:
+schema: value_defi_ethereum
botto:
+schema: botto
ethereum:
+schema: botto_ethereum
notional:
+schema: notional
ethereum:
+schema: notional_ethereum
dappradar:
+schema: dappradar
ethereum:
+schema: dappradar_ethereum
paladin:
+schema: paladin
ethereum:
+schema: paladin_ethereum
hop_protocol:
+schema: hop_protocol
optimism:
+schema: hop_protocol_optimism
ethereum:
+schema: hop_protocol_ethereum
# polygon:
# +schema: hop_protocol_polygon
# polygon2:
# +schema: hop_polygon
# arbitrum:
# +schema: hop_protocol_arbitrum
# gnosis:
# +schema: hop_protocol_gnosis
# gnosis2:
# +schema: hop_gnosis
chain_info:
+schema: chain_info
bridge:
+schema: bridge
optimism:
+schema: bridge_optimism
tessera:
+schema: tessera
ethereum:
+schema: tessera_ethereum
maker:
+schema: maker
ethereum:
+schema: maker_ethereum
ovm:
+schema: ovm
optimism:
+schema: ovm_optimism
rubicon:
+schema: rubicon
optimism:
+schema: rubicon_optimism
arbitrum:
+schema: rubicon_arbitrum
beethoven_x:
+schema: beethoven_x
fantom:
+schema: beethoven_x_fantom
rocifi:
+schema: rocifi
polygon:
+schema: rocifi_polygon
oneinch:
+schema: oneinch
ethereum:
+schema: oneinch_ethereum
pooltogether:
+schema: pooltogether
ethereum:
+schema: pooltogether_ethereum
coinbase_wallet_quests:
+schema: coinbase_wallet_quests
optimism:
+schema: coinbase_wallet_quests_optimism
optimism_quests:
+schema: optimism_quests
optimism:
+schema: optimism_quests_optimism
dydx:
+schema: dydx
ethereum:
+schema: dydx_ethereum
lido:
+schema: lido
accounting:
+schema: lido_accounting
ethereum:
+schema: lido_accounting_ethereum
liquidity:
+schema: lido_liquidity
ethereum:
+schema: lido_liquidity_ethereum
layerzero:
+schema: layerzero
ethereum:
+schema: layerzero_ethereum
avalanche_c:
+schema: layerzero_avalanche_c
gnosis:
+schema: layerzero_gnosis
arbitrum:
+schema: layerzero_arbitrum
fantom:
+schema: layerzero_fantom
optimism:
+schema: layerzero_optimism
polygon:
+schema: layerzero_polygon
bnb:
+schema: layerzero_bnb
celo:
+schema: layerzero_celo
base:
+schema: layerzero_base
bebop:
+schema: bebop
ethereum:
+schema: bebop_ethereum
polygon:
+schema: bebop_polygon
arbitrum:
+schema: bebop_arbitrum
tokemak:
+schema: tokemak
ethereum:
+schema: tokemak_ethereum
quests:
+schema: quests
worldcoin:
+schema: worldcoin
optimism:
+schema: worldcoin_optimism
aerodrome:
+schema: aerodrome
base:
+schema: aerodrome_base