You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by Lasse Nedergaard <la...@gmail.com> on 2024/11/28 16:16:03 UTC

State Migration flink sql

Hi

I have a little challenge and I would like some input. 

I have a streaming job and some parts of it use a Flink SQL statement with a partition by clause (Partition by column1) running in production using Flink 1.20.

Now I have to modify the partition by so it now is (Partition by column1, column2)

I then run into state migration problems as the RowData serialiser say it isn’t compatible. Fair enough. But I know it’s ok set/handle column2 as empty string during migration. 
I don’t want to drop the state and have therefore looked into the state processor api. But is it possible to replace the underlying key state from a string to two strings and provide defaults for the missing value of column2?

I can’t see way through state migration and I can’t see it is possible to change the uid for the sql partition part so I could drop the state for only this operator. 

Any ideas how to move forward?

Med venlig hilsen / Best regards
Lasse Nedergaard