Re: Extract/Interpret embedded byte data from a record

2021-04-15 Thread Xingbo Huang
Hi Sumeet, Python Row-based operation will be supported in the releases-1.13. I guess you are looking at the code of the master branch. Since you are using the Python Table API, you can use python udf to parse your data. For the details of python UDF, you can refer to the doc[1]. [1]

Re: Extract/Interpret embedded byte data from a record

2021-04-14 Thread Sumeet Malhotra
Additional observation: From the Flink repo, the file "flink-python/pyflink/table/table.py" seems to support map(), flat_map() and other row based operations although the 1.12 documentation doesn't reflect that. Is that correct? From the code, it appears that these operations are supported in

Re: Extract/Interpret embedded byte data from a record

2021-04-14 Thread Sumeet Malhotra
Thanks Piotrek! I forgot to mention that I'm using PyFlink and mostly Table APIs. The documentation ( https://ci.apache.org/projects/flink/flink-docs-release-1.12/dev/table/tableApi.html#row-based-operations) suggests that Map() function is not currently supported in Python. So, what do you think

Re: Extract/Interpret embedded byte data from a record

2021-04-14 Thread Piotr Nowojski
Hi, One thing that you can do is to read this record using Avro keeping `Result` as `bytes` and in a subsequent mapping function, you could change the record type and deserialize the result. In Data Stream API: source.map(new MapFunction { ...} ) Best, Piotrek śr., 14 kwi 2021 o 03:17 Sumeet

Extract/Interpret embedded byte data from a record

2021-04-13 Thread Sumeet Malhotra
Hi, I'm reading data from Kafka, which is Avro encoded and has the following general schema: { "name": "SomeName", "doc": "Avro schema with variable embedded encodings", "type": "record", "fields": [ { "name": "Name", "doc": "My name", "type": "string" }, {