GitHub user jackylk opened a pull request:
https://github.com/apache/carbondata/pull/2731 [CARBONDATA-2945] Support ingest JSON record in StreamSQL
Support ingest JSON record from Kafka/socket stream source in StreamSQL
A tblproperty called "record_format" is added, for example, following creates a stream source table on kafka whose record format is json
```
CREATE TABLE source (
id INT,
name STRING,
city STRING,
salary FLOAT,
file struct<school:array<string>, age:int>
)
STORED AS carbondata
TBLPROPERTIES(
'streaming'='source',
'format'='kafka',
'kafka.bootstrap.servers'='localhost:9092',
'subscribe'='test',
'record_format'='json' // can be csv or json
)
```
- [X] Any interfaces changed?
No
- [X] Any backward compatibility impacted?
No
- [X] Document update required?
Yes
- [X] Testing done
Please provide details on
- Whether new unit test cases have been added or why no new tests are required?
- How it is tested? Please attach test report.
- Is it a performance related change? Please attach the performance test report.
- Any additional information to help reviewers in testing this change.
- [X] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.
NA
You can merge this pull request into a Git repository by running:
$ git pull
https://github.com/jackylk/incubator-carbondata json
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/carbondata/pull/2731.patchTo close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #2731
----
commit d9e105a448184ffd1c4ba47ca5bfb842f5009f71
Author: Jacky Li <jacky.likun@...>
Date: 2018-09-17T16:27:57Z
support json format in StreamSQL
----
---