File Connector Introduction

GeaFlow support read data from file and write data to file.

Syntax

CREATE TABLE file_table (
  id BIGINT,
  name VARCHAR,
  age INT
) WITH (
	type='file',
    geaflow.dsl.file.path = '/path/to/file'
)

Options

KeyRequiredDescription
geaflow.dsl.file.pathtrueThe file path to read or write.
geaflow.dsl.column.separatorfalseThe column separator for split text to columns.Default value is ‘,’.
geaflow.dsl.line.separatorfalseThe line separator for split text to columns..Default value is ‘\n’.

Example

CREATE TABLE file_source (
  id BIGINT,
  name VARCHAR,
  age INT
) WITH (
	type='file',
    geaflow.dsl.file.path = '/path/to/file'
);

CREATE TABLE file_sink (
  id BIGINT,
  name VARCHAR,
  age INT
) WITH (
	type='file',
    geaflow.dsl.file.path = '/path/to/file'
);

INSERT INTO file_sink
SELECT * FROM file_source;