Hi, Gyula.
If you want flink to fill the unspecified column with NULL, you can try the
following sql like :
```
INSERT INTO Sink(a) SELECT a from Source
```
--
Best!
Xuyang
在 2024-01-11 16:10:47,"Giannis Polyzos" <[email protected]> 写道:
Hi Gyula,
to the best of my knowledge, this is not feasible and you will have to do
something like CAST(NULL AS STRING) to insert null values manually.
Best,
Giannis
On Thu, Jan 11, 2024 at 9:58 AM Gyula Fóra <[email protected]> wrote:
Hi All!
Is it possible to insert into a table without specifying all columns of the
target table?
In other words can we use the default / NULL values of the table when not
specified somehow?
For example:
Query schema: [a: STRING]
Sink schema: [a: STRING, b: STRING]
I would like to be able to simply insert with column a and get null values for
b.
For a simple table like the above it doesn't make much of a practical
difference but if you have very large tables with complex fields and a lot of
optional columns this can be very useful.
Thank you!
Gyula