I found the problem.
In the data stream I had an empty list, but not none (null)
 
On 2021/12/08 13:11:31 Королькевич Михаил wrote:
> Hello, Flink team!
>
> 1) Is it possible to save a python list to table from datastream?
>
> 2) and then save the accumulated data to avro file?
>
> For example, my data stream has the type.
>
> Types.ROW_NAMED(['id', 'items'], [Types.STRING, Types.LIST(items_row)] )
>
> items_row = Types.ROW_NAMED(field_names=['start', 'end'],
> field_types=[Types.LONG(), Types.LONG()])
>
> How do I create a schema table for the current data type?
>
> I tried like this
>
> schema = Schema.new_builder() \
>
> .column('id', DataTypes.STRING()) \
>
> .column('items', DataTypes.ARRAY(
>
> DataTypes.ROW([
>
> DataTypes.FIELD("start", DataTypes.BIGINT()),
>
> DataTypes.FIELD("end", DataTypes.BIGINT())]))).build()
>
> And it doesn't work.
>
>

Reply via email to