Created
August 27, 2021 09:32
-
-
Save dendisuhubdy/e3402b32ec2f7fe1cf93b9c464ecedb4 to your computer and use it in GitHub Desktop.
parse_json_redpanda.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
if __name__ == "__main__": | |
line_count = 0 | |
with open("/Users/dendisuhubdy/Downloads/redpanda/data/2/kafka/btc_usdt_spot/0_111/0-1-v1.log", "rb") as fp: | |
Lines = fp.readlines() | |
for line in Lines: | |
print(line) | |
if line_count == 1: | |
break | |
# task is to parse multiple JSON messages in one line |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment