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

Add add.raw.json.column SerDe property #51

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open

Add add.raw.json.column SerDe property #51

wants to merge 1 commit into from

Conversation

wonder-mice
Copy link

Added SerDe property "add.raw.json.column" can be used to include
entire raw json string into the row as separate field.
For example.

CREATE TABLE test_01 (
type string
)
ROW FORMAT SERDE "org.openx.data.jsonserde.JsonSerDe"
WITH SERDEPROPERTIES ("add.raw.json.column" = "raw_json");

will create table with additional "raw_json" field. That field will
contain raw json string. That can be usefull when json structure
is not uniform and later processing with UDTF is desired.

Added SerDe property "add.raw.json.column" can be used to include
entire raw json string into the row as separate field.
For example.

CREATE TABLE test_01 (
    type string
)
ROW FORMAT SERDE "org.openx.data.jsonserde.JsonSerDe"
WITH SERDEPROPERTIES ("add.raw.json.column" = "raw_json");

will create table with additional "raw_json" field. That field will
contain raw json string. That can be usefull when json structure
is not uniform and later processing with UDTF is desired.
Copy link
Owner

@rcongiu rcongiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good idea, however, could you also add unit tests for it ? If not it's fine, i can do it, but it would speed up the merge of the pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants