File size: 354 Bytes
2e55369 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
import re, glob
from pyarrow.parquet import ParquetDataset
def rows(topic):
dataset = ParquetDataset(f"parquet/{topic}.parquet")
return sum(p.count_rows() for p in dataset.fragments)
for f in sorted(glob.glob("parquet/*.parquet")):
topic = re.match(r".*\/(.*?)\.parquet", f)[1]
num = rows(topic)
print(f"- {topic}: {int(num):,}")
|