Updated on 2024-08-19 GMT+08:00

FileSystem Source Table

Function

This section describes the definition of the FileSystem source table, parameters used for creating the source table, and sample code.

Prerequisites

To create a FileSystem source table, an enhanced datasource connection is required. You can set security group rules as required when you configure the connection.

Important Notes

  • When you create a Flink OpenSource SQL job, set Flink Version to 1.12 in the Running Parameters tab. Select Save Job Log, and specify the OBS bucket for saving job logs.
  • For details about how to use data types, see section Format.

Syntax

1
2
3
4
5
6
7
create table dataGenSource(
   amount int
) with (
   'connector' = 'filesystem',
   'path' = 'obs://longyuan/source-files',
   'format' = 'csv'
);

Parameters

Table 1 Parameter description

Parameter

Mandatory

Default Value

Type

Description

connector

Yes

None

String

The value is fixed at filesystem.

path

Yes

None

String

OBS path

format

Yes

None

String

File format

Available values are: csv and parquet

FAQs

None