forked from duneanalytics/spellbook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dbt_project.yml
914 lines (822 loc) · 20.5 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
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
#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
+materialized: view
aave:
+schema: aave
ethereum:
+schema: aave_ethereum
optimism:
+schema: aave_optimism
balancer:
+schema: balancer
arbitrum:
+schema: balancer_arbitrum
ethereum:
+schema: balancer_ethereum
polygon:
+schema: balancer_polygon
optimism:
+schema: balancer_optimism
ens:
+schema: ens
airdrop:
+schema: airdrop
+materialized: table
optimism:
+schema: airdrop_optimism
+materialized: table
dex:
+schema: dex
aggregator:
+schema: dex_aggregator
nft:
+schema: nft
arbitrum:
+schema: nft_arbitrum
avalanche_c:
+schema: nft_avalanche_c
bnb:
+schema: nft_bnb
ethereum:
+schema: nft_ethereum
metadata:
+schema: nft_ethereum_metadata
+materialized: table
+file_format: delta
+tags: "static"
gnosis:
+schema: nft_gnosis
optimism:
+schema: nft_optimism
polygon:
+schema: nft_polygon
compound:
+schema: compound
ethereum:
+schema: compound_ethereum
gitcoin:
+schema: gitcoin
ethereum:
+schema: gitcoin_ethereum
uniswap:
+schema: uniswap
arbitrum:
+schema: uniswap_arbitrum
ethereum:
+schema: uniswap_ethereum
optimism:
+schema: uniswap_optimism
polygon:
+schema: uniswap_polygon
nomiswap:
+schema: nomiswap
bnb:
+schema: nomiswap_bnb
sushiswap:
+schema: sushiswap
ethereum:
+schema: sushiswap_ethereum
avalanche_c:
+schema: sushiswap_avalanche_c
gnosis:
+schema: sushiswap_gnosis
babyswap:
+schema: babyswap
bnb:
+schema: babyswap_bnb
opensea:
+schema: opensea
ethereum:
+schema: opensea_ethereum
solana:
+schema: opensea_solana
element:
+schema: element
ethereum:
+schema: element_ethereum
bnb:
+schema: element_bnb
avalanche_c:
+schema: element_avalanche_c
abi:
+schema: abi
superrare:
+schema: superrare
looksrare:
+schema: looksrare
ethereum:
+schema: looksrare_ethereum
foundation:
+schema: foundation
ethereum:
+schema: foundation_ethereum
blur:
+schema: blur
ethereum:
+schema: blur_ethereum
gas:
+schema: gas
ethereum:
+schema: gas_ethereum
bnb:
+schema: gas_bnb
avalanche_c:
+schema: gas_avalanche_c
optimism:
+schema: gas_optimism
arbitrum:
+schema: gas_arbitrum
gmx:
+schema: gmx
arbitrum:
+schema: gmx_arbitrum
avalanche_c:
+schema: gmx_avalanche_c
tigris:
+schema: tigris
arbitrum:
+schema: tigris_arbitrum
polygon:
+schema: tigris_polygon
x2y2:
+schema: x2y2
ethereum:
+schema: x2y2_ethereum
zora:
+schema: zora
ethereum:
+schema: zora_ethereum
magiceden:
+schema: magiceden
solana:
+schema: magiceden_solana
nomad:
+schema: nomad
ethereum:
+schema: nomad_ethereum
seaport:
+schema: seaport
ethereum:
+schema: seaport_ethereum
bnb:
+schema: seaport_bnb
arbitrum:
+schema: seaport_arbitrum
optimism:
+schema: seaport_optimism
avalanche_c:
+schema: seaport_avalanche_c
polygon:
+schema: seaport_polygon
balances:
+schema: balances
ethereum:
+schema: balances_ethereum
dodo:
+schema: dodo
ethereum:
+schema: dodo_ethereum
labels:
+schema: labels
+materialized: table
+file_format: delta
dao:
+schema: dao
addresses:
+schema: addresses
ethereum:
+schema: addresses_ethereum
optimism:
+schema: addresses_optimism
addresses_events:
+schema: addresses_events
+materialized: table
ethereum:
+schema: addresses_events_ethereum
+materialized: table
aztec:
+schema: aztec
ethereum:
+schema: aztec_ethereum
tokens:
+schema: tokens
+materialized: table
+file_format: delta
ethereum:
+schema: tokens_ethereum
+materialized: table
+file_format: delta
optimism:
+schema: tokens_optimism
+materialized: table
+file_format: delta
avalanche_c:
+schema: tokens_avalanche_c
+materialized: table
+file_format: delta
bnb:
+schema: tokens_bnb
+materialized: table
+file_format: delta
gnosis:
+schema: tokens_gnosis
+materialized: table
+file_format: delta
arbitrum:
+schema: tokens_arbitrum
+materialized: table
+file_format: delta
polygon:
+schema: tokens_polygon
+materialized: table
+file_format: delta
fantom:
+schema: tokens_fantom
+materialized: table
+file_format: delta
trader_joe:
+schema: trader_joe
avalanche_c:
+schema: trader_joe_avalanche_c
transfers:
+schema: transfers
ethereum:
+schema: transfers_ethereum
optimism:
+schema: transfers_optimism
bnb:
+schema: transfers_bnb
sudoswap:
+schema: sudoswap
ethereum:
+schema: sudoswap_ethereum
safe:
+schema: safe
ethereum:
+schema: safe_ethereum
jarvis_network:
+schema: jarvis_network
polygon:
+schema: jarvis_network_polygon
cryptopunks:
+schema: cryptopunks
ethereum:
+schema: cryptopunks_ethereum
tornado_cash:
+schema: tornado_cash
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
archipelago:
+schema: archipelago
ethereum:
+schema: archipelago_ethereum
integration_test:
+schema: integration_test
curvefi:
+schema: curvefi
ethereum:
+schema: curvefi_ethereum
optimism:
+schema: curvefi_optimism
avalanche_c:
+schema: curvefi_avalanche_c
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
keep3r_network:
+schema: keep3r_network
ethereum:
+schema: keep3r_network_ethereum
airswap:
+schema: airswap
ethereum:
+schema: airswap_ethereum
chainlink:
+schema: chainlink
optimism:
+schema: chainlink_optimism
polygon:
+schema: chainlink_polygon
bnb:
+schema: chainlink_bnb
contracts:
+schema: contracts
optimism:
+schema: contracts_optimism
bnb:
+schema: contracts_bnb
clipper:
+schema: clipper
ethereum:
+schema: clipper_ethereum
reaper:
+schema: reaper
optimism:
+schema: reaper_optimism
biswap:
+schema: biswap
bnb:
+schema: biswap_bnb
defiswap:
+schema: defiswap
ethereum:
+schema: defiswap_ethereum
mdex:
+schema: mdex
bnb:
+schema: mdex_bnb
swapr:
+schema: swapr
ethereum:
+schema: swapr_ethereum
dfx:
+schema: dfx
ethereum:
+schema: dfx_ethereum
shibaswap:
+schema: shibaswap
ethereum:
+schema: shibaswap_ethereum
velodrome:
+schema: velodrome
optimism:
+schema: velodrome_optimism
zigzag:
+schema: zigzag
arbitrum:
+schema: zigzag_arbitrum
pancakeswap:
+schema: pancakeswap
bnb:
+schema: pancakeswap_bnb
bancor:
+schema: bancor
ethereum:
+schema: bancor_ethereum
kyberswap:
+schema: kyberswap
avalanche_c:
+schema: kyberswap_avalanche_c
fraxswap:
+schema: fraxswap
avalanche_c:
+schema: fraxswap_avalanche_c
bnb:
+schema: fraxswap_bnb
polygon:
+schema: fraxswap_polygon
ethereum:
+schema: fraxswap_ethereum
mstable:
+schema: mstable
ethereum:
+schema: mstable_ethereum
platypus_finance:
+schema: platypus_finance
avalanche_c:
+schema: platypus_finance_avalanche_c
woofi:
+schema: woofi
avalanche_c:
+schema: woofi_avalanche_c
bnb:
+schema: woofi_bnb
hashflow:
+schema: hashflow
ethereum:
+schema: hashflow_ethereum
avalanche_c:
+schema: hashflow_avalanche_c
nexusmutual:
+schema: nexusmutual
ethereum:
+schema: nexusmutual_ethereum
quix:
+schema: quix
optimism:
+schema: quix_optimism
zeroex:
+schema: zeroex
ethereum:
erc20:
+schema: zeroex_ethereum_erc20
nft:
+schema: zeroex_ethereum_nft
wombat:
+schema: wombat
bnb:
+schema: wombat_bnb
iziswap:
+schema: iziswap
bnb:
+schema: iziswap_bnb
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
#
# ovm_optimism:
# optimism:
# +schema: ovm_optimism
#
chain_info:
+schema: chain_info
bridge:
+schema: bridge
tessera:
+schema: tessera
ethereum:
+schema: tessera_ethereum
tofu:
+schema: tofu
bnb:
+schema: tofu_bnb
seeds:
spellbook:
+schema: test_data
balances:
ethereum:
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:
opensea_wyvern_trades_samples:
+column_types:
tx_hash: string
block_time: timestamp
token_id: string
amount_original: double
buyer: string
seller: string
platform_fee_amount: double
royalty_fee_amount: double
solana:
opensea_solana_trades_solscan:
+column_types:
block_time: timestamp
tx_hash: string
amount: string
seaport:
seaport_trades_seed:
+column_types:
blockchain: string
project: string
version: string
block_date: date
tx_hash: string
evt_index: int
nft_contract_address: string
token_id: string
sub_type: string
sub_idx: int
buyer: string
seller: string
magiceden:
solana:
magiceden_solana_trades_solscan:
+column_types:
block_time: timestamp
tx_hash: string
amount: string
ens:
dex:
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:
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:
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
dao:
dao_addresses_seed:
+column_types:
blockchain: string
dao_creator_tool: string
dao: string
dao_wallet_address: string
created_date: date
dao_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:
chainlink:
chainlink_get_price_seed:
+column_types:
blockchain: string
block_time: timestamp
block_number: int
feed_name: string
oracle_price: double
proxy_address: string
aggregator_address: string
underlying_token_address: string
nft:
nft_wash_trades_refactor_seed:
+column_types:
blockchain: string
project: string
version: string
nft_contract_address: string
token_id: bigint
token_standard: string
trade_category: string
buyer: string
seller: string
project_contract_address: string
aggregator_name: string
aggregator_address: string
tx_from: string
tx_to: string
block_time: string
block_date: string
block_number: bigint
tx_hash: string
unique_trade_id: string
buyer_first_funded_by: string
seller_first_funded_by: string
filter_1_same_buyer_seller: boolean
filter_2_back_and_forth_trade: boolean
filter_3_bought_or_sold_3x: boolean
filter_4_first_funded_by_same_wallet: boolean
is_wash_trade: boolean
nexusmutual:
ethereum:
nexusmutual_ethereum_trades_seed:
+column_types:
evt_tx_hash: string
block_date: date
evt_block_number: string
nonce: string
curr: string
sum_assured: string
premium: string
premium_nxm: string
perpetual:
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:
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
quix:
quix_events_seed:
+column_types:
blockchain: string
project: string
version: string
block_date: date
block_time: timestamp
token_id: string
collection: string
token_standard: string
trade_type: string
number_of_items: int
trade_category: string
evt_type: string
seller: string
buyer: string
nft_contract_address: string
project_contract_address: string
tx_hash: string
evt_index: int
block_number: int
tx_from: string
tx_to: string
royalty_fee_receive_address: string
zeroex:
ethereum:
fills:
zeroex_api_ethereum_fills_sample:
+column_types:
tx_hash: string
block_number: int
evt_index: int
contract_address: string
block_time: timestamp
maker: string
taker: string
taker_token: string
taker_symbol: string
maker_token: string
maker_symbol: string
token_pair: string
taker_token_amount: double
taker_token_amount_raw: string
maker_token_amount: double
maker_token_amount_raw: string
type: string
affiliate_address: string
swap_flag: boolean
matcha_limit_order_flag: boolean
volume_usd: double
tx_from: string
tx_to: string
nfts:
zeroex_nft_ethereum_fills_sample:
+column_types:
block_time: timestamp
block_date: timestamp
evt_index: int
tx_hash: string
maker: string
taker: string
matcher: string
nft_address: string
nft_id: string
label: string
price_label: string
token: string
token_amount_raw: string
symbol: string
price_usd: double
token_amount: double
project_name: string
optimism:
zeroex_api_optimism_fills_sample:
+column_types:
tx_hash: string
evt_index: int
contract_address: string
block_time: timestamp
block_date: date
maker: string
taker: string
taker_token: string
maker_token: string
taker_token_amount: double
taker_token_amount_raw: double
maker_token_amount: double
maker_token_amount_raw: double
type: string
affiliate_address: string
swap_flag: boolean
matcha_limit_order_flag: boolean
volume_usd: double
gmx:
avalanche_c:
gmx_glp_aum_seed:
+column_types:
date: date
usdc_aum: double
usdc_e_aum: double
x2y2:
ethereum:
x2y2_ethereum_trades_etherscan:
+column_types:
block_number: long
tx_hash: string
token_id: string
amount_original: double
foundation:
ethereum:
foundation_trades_samples:
+column_types:
tx_hash: string
block_time: timestamp
token_id: string
amount_original: double
buyer: string
seller: string
platform_fee_amount: double
royalty_fee_amount: double