Re: Failed to deserialize Avro record

2020-06-09 Thread Ramana Uppala
> > deserialized and check debug the AvroRowDeserializationSchema with it. > > > > Best, > > > > Dawid > > > > On 06/06/2020 16:27, Ramana Uppala wrote: > > > We are using AvroRowDeserializationSchema with Kafka Table source to > > deserialize

Re: [External Sender] Re: Flink sql nested elements

2020-06-09 Thread Ramana Uppala
.FIELD(|| > ||                                "f3",|| > ||                                > DataTypes.ROW(DataTypes.FIELD("nested", DataTypes.STRING()))|| > ||                        )|| > ||                );|| > ||            }|| > ||        });|| > ||Table table = tEnv.sqlQuery("SELECT f3.nested FROM T");|| > ||DataStream result =

Failed to deserialize Avro record

2020-06-06 Thread Ramana Uppala
We are using AvroRowDeserializationSchema with Kafka Table source to deserialize the messages. Application failed with "Failed to deserialize Avro record." for different messages it seems. Caused by: org.apache.avro.AvroRuntimeException: Malformed data. Length is negative: -26 Caused by:

Re: [External Sender] Re: Flink sql nested elements

2020-06-05 Thread Ramana Uppala
> Hi,Ramana > > For nested data type, Flink use dot (eg a.b.c) to visit nested elements. > Your SQL syntax looks right, which Flink version are you using? And could > you post your Avro Schema file and DDL ? > > Best, > Leonard Xu > > > 在 2020年6月5日,03:34,Ramana Uppala 写道: >

Re: [External Sender] Re: Avro Arrat type validation error

2020-06-05 Thread Ramana Uppala
the legacy type: > > TableSchema.field("field", Types.OBJECT_ARRAY(Types.STRING)); > > In 1.11 we will introduce new sources and formats already working > entirely with the new type system (AvroRowDataDeserializationSchema and > KafkaDynamicTable). > > Hope this help

Flink sql nested elements

2020-06-04 Thread Ramana Uppala
We have Avro schema that contains nested structure and when querying using Flink SQL, we are getting below error. Exception in thread "main" java.lang.AssertionError at org.apache.calcite.sql.parser.SqlParserPos.sum_(SqlParserPos.java:236) at

Creating TableSchema from the Avro Schema

2020-06-04 Thread Ramana Uppala
Hi, In Flink 1.9, we have option to create the TableSchema form TypeInformation. We have used below. TypeInformation typeInfo = AvroSchemaConverter.convertToTypeInfo(schema); TableSchema tableSchema = TableSchema.fromTypeInfo(typeInfo); However TableSchema's fromTypeInfo method is deprecated

Avro Arrat type validation error

2020-06-04 Thread Ramana Uppala
Hi, Avro schema contains Array type and we created TableSchema out of the AvroSchema and created a table in catalog. In the catalog, this specific filed type shown as ARRAY. We are using AvroRowDeserializationSchema with the connector and returnType of TableSource showing Array mapped to