chunjun SQL模式 source源端SQL语法解析BUG
- Dominant language
- Java
- Stars
- 4.1k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
### Search before asking
- [X] I had searched in the [issues](https://github.com/DTStack/chunjun/issues) and found no similar issues.
### What happened
1、kafka上原始数据:
{
"ver": "v2.2.2",
"pKey": "5949",
"sn": "03",
"ts": 16623128445200,
"devs": [
{
"dev": "41",
"sysId": "2001",
"d": [
{
"m": "WPP",
"v": 150
}
]
}
]
}
2、用SQL创建来源:
CREATE TABLE source_ods
(
ver STRING,
pKey STRING,
sn STRING,
ts STRING,
devs array< row >>>
) WITH (
'connector' = 'kafka-x'
,'topic' = 'xxxx'
,'properties.bootstrap.servers' = 'xxx'
,'properties.group.id' = 'dwd'
,'scan.startup.mode' = 'earliest-offset'
,'format' = 'json'
,'json.timestamp-format.standard' = 'SQL'
,'json.ignore-parse-errors' = 'true'
);
3、问题点:
chunjun建表JSON无法使用字符串接收
devs array< row >>>
但是我原生FLINK 是可以这样接收创建源端
devs array< row >
也可以这样接收创建源端
devs STRING
### What you expected to happen
1、kafka上原始数据:
{
"ver": "v2.2.2",
"pKey": "5949",
"sn": "03",
"ts": 16623128445200,
"devs": [
{
"dev": "41",
"sysId": "2001",
"d": [
{
"m": "WPP",
"v": 150
}
]
}
]
}
2、用SQL创建来源:
CREATE TABLE source_ods
(
ver STRING,
pKey STRING,
sn STRING,
ts STRING,
devs array< row >>>
) WITH (
'connector' = 'kafka-x'
,'topic' = 'xxxx'
,'properties.bootstrap.servers' = 'xxx'
,'properties.group.id' = 'dwd'
,'scan.startup.mode' = 'earliest-offset'
,'format' = 'json'
,'json.timestamp-format.standard' = 'SQL'
,'json.ignore-parse-errors' = 'true'
);
3、问题点:
chunjun建表JSON无法使用字符串接收
devs array< row >>>
但是我原生FLINK 是可以这样接收创建源端
devs array< row >
也可以这样接收创建源端
devs STRING

### How to reproduce
1、kafka上原始数据:
{
"ver": "v2.2.2",
"pKey": "5949",
"sn": "03",
"ts": 16623128445200,
"devs": [
{
"dev": "41",
"sysId": "2001",
"d": [
{
"m": "WPP",
"v": 150
}
]
}
]
}
2、用SQL创建来源:
CREATE TABLE source_ods
(
ver STRING,
pKey STRING,
sn STRING,
ts STRING,
devs array< row >>>
) WITH (
'connector' = 'kafka-x'
,'topic' = 'xxxx'
,'properties.bootstrap.servers' = 'xxx'
,'properties.group.id' = 'dwd'
,'scan.startup.mode' = 'earliest-offset'
,'format' = 'json'
,'json.timestamp-format.standard' = 'SQL'
,'json.ignore-parse-errors' = 'true'
);
3、问题点:
chunjun建表JSON无法使用字符串接收
devs array< row >>>
但是我原生FLINK 是可以这样接收创建源端
devs array< row >
也可以这样接收创建源端
devs STRING

### Anything else
1、kafka上原始数据:
{
"ver": "v2.2.2",
"pKey": "5949",
"sn": "03",
"ts": 16623128445200,
"devs": [
{
"dev": "41",
"sysId": "2001",
"d": [
{
"m": "WPP",
"v": 150
}
]
}
]
}
2、用SQL创建来源:
CREATE TABLE source_ods
(
ver STRING,
pKey STRING,
sn STRING,
ts STRING,
devs array< row >>>
) WITH (
'connector' = 'kafka-x'
,'topic' = 'xxxx'
,'properties.bootstrap.servers' = 'xxx'
,'properties.group.id' = 'dwd'
,'scan.startup.mode' = 'earliest-offset'
,'format' = 'json'
,'json.timestamp-format.standard' = 'SQL'
,'json.ignore-parse-errors' = 'true'
);
3、问题点:
chunjun建表JSON无法使用字符串接收
devs array< row >>>
但是我原生FLINK 是可以这样接收创建源端
devs array< row >
也可以这样接收创建源端
devs STRING

### Version
1.12_release
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
Contributor guide
Assessment
This issue has not been assessed yet.