I have some logs like below
2021-08-16 16:56:37 info [614289000000000020ab22baa4a1cfb7,4c8b36453209aef4] -- [main] c.g.c.uservalidatorfactoryimpl - {"userid": "1", "msg": "action", "status": "rcvd"}
2021-08-16 16:56:38 info [614289000000000020ab22baa4a1cfb7,4c8b36453209aef4] -- [main] c.g.c.uservalidatorfactoryimpl - {"userid": "1", "msg": "response", "status": "processed"}
I need to read this from the file and convert to dataset which looks something like below
2021-08-16 16:56:37,[614289000000000020ab22baa4a1cfb7,4c8b36453209aef4], 1 , action , rcvd
2021-08-16 16:56:38,[614289000000000020ab22baa4a1cfb7,4c8b36453209aef4], 1 , response , processed
val dataset = env.readTextFile("text.log")
dataset.print()
Since the log file is not structured, is it possible to parse and clean the logs into CSV format using any of the flink APIS?
it will be really helpful if someone can through light on any other best way convert in to csv format so that it can be loaded for further processing?