tonychen0716 created FLINK-20583:
------------------------------------
Summary: Support to define the data range of decimal types in datagen table source connector
Key: FLINK-20583
URL:
https://issues.apache.org/jira/browse/FLINK-20583 Project: Flink
Issue Type: Bug
Components: Table SQL / Runtime
Affects Versions: 1.12.0
Environment: Flink 1.12.0
Reporter: tonychen0716
Fix For: 1.12.1
{code:java}
– FLink SQL
CREATE TABLE datagen
(
lon DECIMAL(38, 18) COMMENT 'lon',
lat DECIMAL(38, 18) COMMENT 'lat'
)
WITH (
'connector' = 'datagen',
'rows-per-second' = '10',
'fields.lon.kind' = 'random',
'fields.lon.min' = '116.40',
'fields.lon.max' = '116.41',
'fields.lat.kind' = 'random',
'fields.lat.min' = '39.894454',
'fields.lat.max' = '39.90'
);
CREATE TABLE sink
(
lon DECIMAL(38, 18),
lat DECIMAL(38, 18)
)
WITH (
'connector' = 'print'
);
INSERT INTO sink
SELECT lon,
lat
from datagen;
{code}
It give exception:
{code:java}
Table options are:
'connector'='datagen'
'fields.lat.kind'='random'
'fields.lat.max'='39.90'
'fields.lat.min'='39.894454'
'fields.lon.kind'='random'
'fields.lon.max'='116.41'
'fields.lon.min'='116.40'
'rows-per-second'='10'
Unsupported options found for connector 'datagen'.
Unsupported options:
fields.lat.max
fields.lat.min
fields.lon.max
fields.lon.min
Supported options:
connector
fields.lat.kind
fields.lon.kind
number-of-rows
rows-per-second
INSERT INTO sink
SELECT lon,
lat
from datagen
{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)