Updated on 2026-08-27 GMT+08:00

Introduction to Flink SQL

DWS-connector can connect to DWS tables as a source table, result table, and dimension table for Flink jobs by implementing the DynamicTableSourceFactory and DynamicTableSinkFactory interfaces.

When used as the source table, DWS-Connector can push down limit and where conditions to the database for execution by implementing the SupportsLimitPushDown and SupportsFilterPushDown interfaces.

When DWS-Connector is used as the result table, the SQL syntax format may vary slightly in different Flink environments. The precise SQL syntax format is contingent upon the specific environment format.

For details, see Source Tables, Result Tables, and Dimension Tables. The following table describes the mapping between DWS data types and Flink SQL data types during Flink SQL compilation.

Table 1 Mapping between DWS and Flink SQL data types

DWS

Flink SQL

Remarks

TINYINT

TINYINT

--

  • SMALLINT
  • SMALLSERIAL

SMALLINT

--

  • INTEGER
  • SERIAL
  • BINARY_INTEGER

INT

BINARY_INTEGER is used for Oracle compatibility.

  • BIGINT
  • BIGSERIAL

BIGINT

--

  • REAL
  • FLOAT4

FLOAT

--

  • FLOAT8
  • DOUBLE PRECISION
  • BINARY_DOUBLE

DOUBLE

BINARY_DOUBLE is used for Oracle compatibility.

  • NUMERIC(p, s)
  • DECIMAL(p, s)

DECIMAL(p, s)

--

  • BIT
  • BOOL
  • BOOLEAN

BOOLEAN

--

DATE

DATE

--

TIME [(p)] [WITHOUT TIMEZONE]

TIME [(p)] [WITHOUT TIMEZONE]

--

TIMESTAMP [(p)] [WITHOUT TIMEZONE]

TIMESTAMP [(p)] [WITHOUT TIMEZONE]

--

TIMESTAMP [(p)] [WITH TIMEZONE]

TIMESTAMP_LTZ [(p)]

--

  • CHAR(n)
  • CHARACTER(n)
  • NCHAR(n)
  • CHAR(n)
  • STRING

--

  • VARCHAR(n)
  • CHARACTER VARYING(n)
  • VARCHAR2(n)
  • NVARCHAR2(n)
  • CLOB
  • TEXT
  • VARCHAR(n)
  • STRING

VARCHAR2 (n) and CLOB are used for Oracle compatibility.

BYTEA

BYTES

--

--

  • ARRAY
  • ROW
  • MAP
  • MULTISET
  • RAW

Not supported