Status
Current state: [One of "Under Discussion"]
Discussion thread: here (<- link to https://mail-archives.apache.org/mod_mbox/flink-dev/)
...
Based on the above two facts, we propose to match database name space between Flink and Postgres, and make Postgres's <schema.table> corresponding to Flink's table name, as shown below.
Flink Catalog Metaspace Structure | Postgres Metaspace Structure |
catalog name (defined in Flink only) | n/a |
database name | database name |
table name | <schema name.>table name |
The full path of Postgres table in Flink would be "<catalog>.<db>.`<schema.table>`" if schema is specified.
...
The full url when connecting to the db will be with database name, like "jdbc:postgresql://localhost:5432/db"
Data Type Mapping
Flink Type | Postgres Type |
smallint | smallint |
int | integer |
bigint | bigint |
float | real |
double | double precision |
decimal(p,s) | numeric(p,s) |
boolean | boolean |
timestamp | timestamp without timezone |
timestamp with timezone | timestamp with timezo (depending on pg server timezone) |
date | date |
time | time without timezone |
time with timezone | time with timezone |
interval | interval |
string | text |
varchar(n) | character varying |
char | char, character |
binary/varbinary/bytes | bytea |
array | [] (array of all the above primitive types) |
Flink types not listed above are not supported by Postgres.
...