File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
scraper_service/shovel_alpha_to_tao Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 13
13
format = "%(asctime)s %(process)d %(message)s" )
14
14
15
15
16
- class BlockTimestampShovel (ShovelBaseClass ):
16
+ class AlphaToTaoShovel (ShovelBaseClass ):
17
17
table_name = "shovel_alpha_to_tao"
18
18
19
19
def process_block (self , n ):
@@ -30,9 +30,11 @@ def do_process_block(self, n):
30
30
CREATE TABLE IF NOT EXISTS { self .table_name } (
31
31
block_number UInt64 CODEC(Delta, ZSTD),
32
32
timestamp DateTime CODEC(Delta, ZSTD),
33
+ netuid UInt8 CODEC(Delta, ZSTD),
34
+ alpha Float64 CODEC(ZSTD)
33
35
) ENGINE = ReplacingMergeTree()
34
36
PARTITION BY toYYYYMM(timestamp)
35
- ORDER BY block_number
37
+ ORDER BY ( block_number, netuid)
36
38
"""
37
39
get_clickhouse_client ().execute (query )
38
40
except Exception as e :
@@ -68,7 +70,7 @@ def do_process_block(self, n):
68
70
69
71
70
72
def main ():
71
- BlockTimestampShovel (name = "block_timestamps " ).start ()
73
+ AlphaToTaoShovel (name = "alpha_to_tao " ).start ()
72
74
73
75
74
76
if __name__ == "__main__" :
You can’t perform that action at this time.
0 commit comments