Skip to content

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

Open
wonder-mice wants to merge 1 commit intorcongiu:developfrom
wonder-mice:develop
Open

Add add.raw.json.column SerDe property#51
wonder-mice wants to merge 1 commit intorcongiu:developfrom
wonder-mice:develop

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