Yes, it does. My bad, I pasted the wrong thing
Here's the correct one:
```
tEnv.executeSql(
"INSERT INTO TABLE2\n"
+ "SELECT *\n"
+ "FROM TABLE1;\n");
```
On Wed, Dec 20, 2023 at 5:00 PM Giannis Polyzos <[email protected]>
wrote:
> doesn't this throw an exception? I see your INSERT INTO query contains 3
> fields, but TABLE2 has 4 fields. I believe you need to run *INSERT INTO
> TABLE2 SELECT * FROM TABLE1;*
>
> On Wed, Dec 20, 2023 at 4:45 PM Flaviu Cicio <[email protected]>
> wrote:
>
>> Hi Giannis,
>>
>> Yes, the checkpoint is enabled
>>
>> I can share part of the code:
>>
>> ```
>> env = StreamExecutionEnvironment.getExecutionEnvironment();
>>
>> env.getConfig().setRestartStrategy(RestartStrategies.noRestart());
>> env.enableCheckpointing(5000);
>>
>> tEnv = StreamTableEnvironment.create(
>> env,
>> EnvironmentSettings.newInstance().inStreamingMode().build());
>>
>>
>> tEnv.getConfig().getConfiguration().setBoolean("sqlassertrunner.unit.connector.table.dml-sync",
>> true);
>>
>> tEnv.executeSql(String.format("CREATE CATALOG paimon WITH (\n"
>> + " 'type'='paimon',\n"
>> + " 'warehouse'='%s'\n"
>> + ");", UNIT_TEST_INPUT_TEMP_PATH));
>> tEnv.executeSql("USE CATALOG paimon;");
>> ```
>>
>> ```
>>
>> tEnv.executeSql("CREATE TABLE TABLE1\n"
>> + "(\n"
>> + " id STRING NOT NULL,\n"
>> + " uuid STRING,\n"
>> + " assetSubType STRING NOT NULL,\n"
>> + " isoCode STRING,\n"
>> + " nameLong ROW(`de` ROW(`string` STRING)),\n"
>> + " PRIMARY KEY (id) NOT ENFORCED\n"
>> + ") ;")
>>
>> tEnv.executeSql("CREATE TABLE TABLE2"
>> + "(\n"
>> + " id STRING NOT NULL,\n"
>> + " uuid STRING,\n"
>> + " assetSubType STRING NOT NULL,\n"
>> + " isoCode STRING,\n"
>> + " nameLong ROW(`de` ROW(`string` STRING)),\n"
>> + " PRIMARY KEY (id) NOT ENFORCED\n"
>> + ") ;")
>>
>> tEnv.executeSql(
>> "INSERT INTO TABLE1 VALUES ('1',\n"
>> + " '1111',\n"
>> + " 'CURRENCY',\n"
>> + " '123145-iso',\n"
>> + " ROW(ROW('Long Name DE'))\n"
>> + " );");
>>
>> tEnv.executeSql(
>> "INSERT INTO TABLE2\n"
>> + "SELECT id\n"
>> + " , uuid\n"
>> + " , isoCode\n"
>> + "FROM TABLE1;\n");
>>
>> ```
>>
>> On 2023/12/20 13:38:54 Giannis Polyzos wrote:
>> > Hi Flaviu,
>> > do you have checkpointing enabled? Can you share your code?
>> >
>> > Best
>> >
>> > On Wed, Dec 20, 2023 at 3:36 PM Flaviu Cicio <[email protected]> wrote:
>> >
>> > > Hi,
>> > >
>> > > I'm currently in the process of integrating Paimon with Flink and
>> have
>> > > come across an issue.
>> > > Specifically, I'm using the table environment to insert entries into
>> a
>> > > table, then reading from it, and finally inserting the entries into
>> another
>> > > table.
>> > > The issue is that the entries are not inserted into the second table.
>> > >
>> > > I have tried different configurations and approaches, but none have
>> been
>> > > successful.
>> > >
>> > > Best,
>> > > Flaviu
>> > >
>> > >
>> > >
>> >
>>
>