forked from duneanalytics/spellbook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdbt_project.yml
1065 lines (976 loc) · 24.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
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#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
arbitrum:
+schema: balancer_arbitrum
+materialized: view
ethereum:
+schema: balancer_ethereum
+materialized: view
polygon:
+schema: balancer_polygon
+materialized: view
optimism:
+schema: balancer_optimism
+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
arbitrum:
+schema: nft_arbitrum
+materialized: view
avalanche_c:
+schema: nft_avalanche_c
+materialized: view
bnb:
+schema: nft_bnb
+materialized: view
ethereum:
+schema: nft_ethereum
+materialized: view
metadata:
+schema: nft_ethereum_metadata
+materialized: table
+file_format: delta
+tags: "static"
gnosis:
+schema: nft_gnosis
+materialized: view
optimism:
+schema: nft_optimism
+materialized: view
polygon:
+schema: nft_polygon
+materialized: view
compound:
+schema: compound
+materialized: view
ethereum:
+schema: compound_ethereum
+materialized: view
gitcoin:
+schema: gitcoin
+materialized: view
ethereum:
+schema: gitcoin_ethereum
+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
polygon:
+schema: uniswap_polygon
+materialized: view
nomiswap:
+schema: nomiswap
+materialized: view
bnb:
+schema: nomiswap_bnb
+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
babyswap:
+schema: babyswap
+materialized: view
bnb:
+schema: babyswap_bnb
+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
abi:
+schema: abi
+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
arbitrum:
+schema: gas_arbitrum
+materialized: view
gmx:
+schema: gmx
+materialized: view
arbitrum:
+schema: gmx_arbitrum
+materialized: view
avalanche_c:
+schema: gmx_avalanche_c
+materialized: view
tigris:
+schema: tigris
+materialized: view
arbitrum:
+schema: tigris_arbitrum
+materialized: view
polygon:
+schema: tigris_polygon
+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
bnb:
+schema: seaport_bnb
+materialized: view
arbitrum:
+schema: seaport_arbitrum
+materialized: view
optimism:
+schema: seaport_optimism
+materialized: view
avalanche_c:
+schema: seaport_avalanche_c
+materialized: view
polygon:
+schema: seaport_polygon
+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: table
+file_format: delta
dao:
+schema: dao
+materialized: view
addresses:
+schema: addresses
+materialized: view
ethereum:
+schema: addresses_ethereum
+materialized: view
optimism:
+schema: addresses_optimism
+materialized: view
addresses_events:
+schema: addresses_events
+materialized: table
ethereum:
+schema: addresses_events_ethereum
+materialized: table
aztec:
+schema: aztec
+materialized: view
ethereum:
+schema: aztec_ethereum
+materialized: view
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
+materialized: view
avalanche_c:
+schema: trader_joe_avalanche_c
+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
jarvis_network:
+schema: jarvis_network
+materialized: view
polygon:
+schema: jarvis_network_polygon
+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
optimism:
+schema: curvefi_optimism
+materialized: view
avalanche_c:
+schema: curvefi_avalanche_c
+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
polygon:
+schema: chainlink_polygon
+materialized: view
bnb:
+schema: chainlink_bnb
+materialized: view
contracts:
+schema: contracts
+materialized: view
optimism:
+schema: contracts_optimism
+materialized: view
bnb:
+schema: contracts_bnb
+materialized: view
clipper:
+schema: clipper
+materialized: view
ethereum:
+schema: clipper_ethereum
+materialized: view
reaper:
+schema: reaper
+materialized: view
optimism:
+schema: reaper_optimism
+materialized: view
biswap:
+schema: biswap
+materialized: view
bnb:
+schema: biswap_bnb
+materialized: view
defiswap:
+schema: defiswap
+materialized: view
ethereum:
+schema: defiswap_ethereum
+materialized: view
mdex:
+schema: mdex
+materialized: view
bnb:
+schema: mdex_bnb
+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
velodrome:
+schema: velodrome
+materialized: view
optimism:
+schema: velodrome_optimism
zigzag:
+schema: zigzag
+materialized: view
arbitrum:
+schema: zigzag_arbitrum
+materialized: view
pancakeswap:
+schema: pancakeswap
+materialized: view
bnb:
+schema: pancakeswap_bnb
+materialized: view
bancor:
+schema: bancor
+materialized: view
ethereum:
+schema: bancor_ethereum
+materialized: view
kyberswap:
+schema: kyberswap
+materialized: view
avalanche_c:
+schema: kyberswap_avalanche_c
+materialized: view
fraxswap:
+schema: fraxswap
+materialized: view
avalanche_c:
+schema: fraxswap_avalanche_c
+materialized: view
bnb:
+schema: fraxswap_bnb
+materialized: view
polygon:
+schema: fraxswap_polygon
+materialized: view
ethereum:
+schema: fraxswap_ethereum
+materialized: view
mstable:
+schema: mstable
+materialized: view
ethereum:
+schema: mstable_ethereum
+materialized: view
platypus_finance:
+schema: platypus_finance
+materialized: view
avalanche_c:
+schema: platypus_finance_avalanche_c
+materialized: view
woofi:
+schema: woofi
+materialized: view
avalanche_c:
+schema: woofi_avalanche_c
+materialized: view
bnb:
+schema: woofi_bnb
+materialized: view
hashflow:
+schema: hashflow
+materialized: view
ethereum:
+schema: hashflow_ethereum
+materialized: view
avalanche_c:
+schema: hashflow_avalanche_c
+materialized: view
nexusmutual:
+schema: nexusmutual
+materialized: view
ethereum:
+schema: nexusmutual_ethereum
+materialized: view
quix:
+schema: quix
+materialized: view
optimism:
+schema: quix_optimism
+materialized: view
zeroex:
+schema: zeroex
+materialized: view
ethereum:
+schema: zeroex_ethereum
+materialized: view
wombat:
+schema: wombat
+materialized: view
bnb:
+schema: wombat_bnb
+materialized: view
iziswap:
+schema: iziswap
+materialized: view
bnb:
+schema: iziswap_bnb
+materialized: view
hop_protocol:
+schema: hop_protocol
+materialized: view
optimism:
+schema: hop_protocol_optimism
+materialized: view
# ethereum:
# +schema: hop_protocol_ethereum
# +materialized: view
# polygon:
# +schema: hop_protocol_polygon
# +materialized: view
# polygon2:
# +schema: hop_polygon
# +materialized: view
# arbitrum:
# +schema: hop_protocol_arbitrum
# +materialized: view
# gnosis:
# +schema: hop_protocol_gnosis
# +materialized: view
# gnosis2:
# +schema: hop_gnosis
# +materialized: view
# ovm_optimism:
# optimism:
# +schema: ovm_optimism
# +materialized: view
chain_info:
+schema: chain_info
+materialized: view
bridge:
+schema: bridge
+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_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:
+enabled: true
+schema: test_data
opensea_solana_trades_solscan:
+column_types:
block_time: timestamp
tx_hash: string
amount: string
seaport:
+enabled: true
+schema: test_data
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:
+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
dao:
+enabled: true
+schema: test_data
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:
+enabled: true
+schema: test_data
chainlink:
+enabled: true
+schema: test_data
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:
+enabled: true
+schema: test_data
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:
+enabled: true
+schema: test_data
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:
+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
quix:
+enabled: true
+schema: test_data
quix_events_seed:
+column_types:
blockchain: string
project: string
version: string