The role of CREATE TABLE is to provide the necessary metadata for the table
-- the location of the data, its format, etc. Executing CREATE TABLE
creates an entry in the catalog, but otherwise doesn't do anything.

In a case like this one

CREATE TABLE Table1 (column_name1 STRING, column_name2 DOUBLE) WITH
('connector' = 'filesystem', 'path' = 'file:///C:/temp/test4.txt', 'format'
= 'csv', 'csv.field-delimiter' = ';');

Flink doesn't need to know in advance if you will be reading from or
writing to Table1 (or both). The CREATE TABLE DDL statement includes enough
information to handle either case.

David

On Mon, Aug 29, 2022 at 8:15 AM <pod...@gmx.com> wrote:

>
> To create table from file:
>
> "CREATE TABLE Table1 (column_name1 STRING, column_name2 DOUBLE) WITH
> ('connector' = 'filesystem', 'path' = 'file:///C:/temp/test4.txt', 'format'
> = 'csv', 'csv.field-delimiter' = ';')");
>
> To create file:
>
> "CREATE TABLE Table1 (column_name1 STRING, column_name2 DOUBLE) WITH (
> 'connector'='filesystem', 'path'='file:///C:/temp/test',  'format' = 'csv',
> 'csv.field-delimiter'= ';')");
>
> Till I add 'sink.partition-commit.delay' or something - syntax is same.
>
>

Reply via email to