我正在做一个 Hive 演示,我想对包含 JSON 消息的文件执行和聚合查询,在每个日志行的开头以 log4j 样式消息开头:
20:49:07.962 [main] INFO com.example.application - {"DocId":"ABC","User":{"Id":1236,"Username":"larry1234","Name":"Larry","ShippingAddress":{"Address1":"789 Main St.","Address2":"","City":"Durham","State":"NC","PostalCode":"27713"},"Orders":[{"ItemId":1111,"OrderDate":"11/11/2012"},{"ItemId":2222,"OrderDate":"12/12/2012"}]}}
我有大量这样的记录,并且正在做一个 Hive 演示。我知道Hive-JSON-Serde。但是我如何告诉 Hive 忽略 log4j 序言?