Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added new function JSONExtractArrayRaw #8081

Merged
merged 9 commits into from
Dec 8, 2019
Merged

Added new function JSONExtractArrayRaw #8081

merged 9 commits into from
Dec 8, 2019

Conversation

errx
Copy link

@errx errx commented Dec 8, 2019

I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en

Changelog category (leave one):

  • New Feature

Changelog entry (up to few sentences, required except for Non-significant/Documentation categories):
Added function JSONExtractArrayRaw

Detailed description (optional):

Added new function JSONExtractArrayRaw. This function will return an array on unparsed json array elements.

Combined with arrayJoin this function can be useful when you need to "flatten" nested json (for example with Kafka engine)

example:

SELECT arrayJoin(JSONExtractArrayRaw('{"a": 1, "b": [{"c": 100}, {"d": 200}]}', 'b'))
┌─arrayJoin(JSONExtractArrayRaw('{"a": 1, "b": [{"c": 100}, {"c": 200}]}', 'b'))─┐
│ {"c":100}                                                                      │
│ {"c":200}                                                                      │
└──────────────────────────────────────────────────────────────

@alexey-milovidov alexey-milovidov merged commit a7f5ac7 into ClickHouse:master Dec 8, 2019
@KochetovNicolai KochetovNicolai added the pr-feature Pull request with new product feature label Dec 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-feature Pull request with new product feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants