Sep-27-2018, 01:56 AM
Hi,
I am new to python. I have a text file contains data in below format.
{"ts": "2018-09-10 10:20:11.312151","action":0,"type":0,"Query":"SELECT COL1,COL2\n FROM TABLE1\LIMIT 1","ID":2}
{"ts": "2018-09-10 10:20:11.312151","action":"","type":0,"Query":"","ID":2} like that.
Expected Output:
key1 key2 key3 key4 ...
val1 val2 val3 ...
val1 val2 val3 ...
How do I read the file and parse the data?
Thanks.
I am new to python. I have a text file contains data in below format.
{"ts": "2018-09-10 10:20:11.312151","action":0,"type":0,"Query":"SELECT COL1,COL2\n FROM TABLE1\LIMIT 1","ID":2}
{"ts": "2018-09-10 10:20:11.312151","action":"","type":0,"Query":"","ID":2} like that.
Expected Output:
key1 key2 key3 key4 ...
val1 val2 val3 ...
val1 val2 val3 ...
How do I read the file and parse the data?
Thanks.