pabloem commented on a change in pull request #12427: URL: https://github.com/apache/beam/pull/12427#discussion_r466750803
########## File path: sdks/python/apache_beam/testing/benchmarks/nexmark/nexmark_util.py ########## @@ -103,6 +121,107 @@ def process(self, elem): yield event +class ParseJsonEvnetFn(beam.DoFn): + """Parses the raw event info into a Python objects. + + Each event line has the following format: + + person: {id,name,email,credit_card,city, \ + state,timestamp,extra} + auction: {id,item_name, description,initial_bid, \ + reserve_price,timestamp,expires,seller,category,extra} + bid: {auction,bidder,price,timestamp,extra} + + For example: + + {"id":1000,"name":"Peter Jones","emailAddress":"n...@xcat.com",\ + "creditCard":"7241 7320 9143 4888","city":"Portland","state":"WY",\ + "dateTime":1528098831026,\"extra":"WN_HS_bnpVQ\\[["} + + {"id":1000,"itemName":"wkx mgee","description":"eszpqxtdxrvwmmywkmogoahf",\ + "initialBid":28873,"reserve":29448,"dateTime":1528098831036,\ + "expires":1528098840451,"seller":1000,"category":13,"extra":"zcuupiz"} + + {"auction":1000,"bidder":1001,"price":32530001,"dateTime":1528098831066,\ + "extra":"fdiysaV^]NLVsbolvyqwgticfdrwdyiyofWPYTOuwogvszlxjrcNOORM"} Review comment: It's a bit of a silly thing, but something like this: ```suggestion person: {id,name,email,credit_card,city, \ state,timestamp,extra} auction: {id,item_name, description,initial_bid, \ reserve_price,timestamp,expires,seller,category,extra} bid: {auction,bidder,price,timestamp,extra} For example: {"id":1000,"name":"Peter Jones","emailAddress":"n...@xcat.com",\ "creditCard":"7241 7320 9143 4888","city":"Portland","state":"WY",\ "dateTime":1528098831026,\"extra":"WN_HS_bnpVQ\\[["} {"id":1000,"itemName":"wkx mgee","description":"eszpqxtdxrvwmmywkmogoahf",\ "initialBid":28873,"reserve":29448,"dateTime":1528098831036,\ "expires":1528098840451,"seller":1000,"category":13,"extra":"zcuupiz"} {"auction":1000,"bidder":1001,"price":32530001,"dateTime":1528098831066,\ "extra":"fdiysaV^]NLVsbolvyqwgticfdrwdyiyofWPYTOuwogvszlxjrcNOORM"} ``` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org