Skip to content

Commit 43eedce

Browse files
committed
alpha2tao shovel table
1 parent 4f96478 commit 43eedce

File tree

1 file changed

+5
-3
lines changed
  • scraper_service/shovel_alpha_to_tao

1 file changed

+5
-3
lines changed

scraper_service/shovel_alpha_to_tao/main.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
format="%(asctime)s %(process)d %(message)s")
1414

1515

16-
class BlockTimestampShovel(ShovelBaseClass):
16+
class AlphaToTaoShovel(ShovelBaseClass):
1717
table_name = "shovel_alpha_to_tao"
1818

1919
def process_block(self, n):
@@ -30,9 +30,11 @@ def do_process_block(self, n):
3030
CREATE TABLE IF NOT EXISTS {self.table_name} (
3131
block_number UInt64 CODEC(Delta, ZSTD),
3232
timestamp DateTime CODEC(Delta, ZSTD),
33+
netuid UInt8 CODEC(Delta, ZSTD),
34+
alpha Float64 CODEC(ZSTD)
3335
) ENGINE = ReplacingMergeTree()
3436
PARTITION BY toYYYYMM(timestamp)
35-
ORDER BY block_number
37+
ORDER BY (block_number, netuid)
3638
"""
3739
get_clickhouse_client().execute(query)
3840
except Exception as e:
@@ -68,7 +70,7 @@ def do_process_block(self, n):
6870

6971

7072
def main():
71-
BlockTimestampShovel(name="block_timestamps").start()
73+
AlphaToTaoShovel(name="alpha_to_tao").start()
7274

7375

7476
if __name__ == "__main__":

0 commit comments

Comments
 (0)