waytoharish opened a new issue, #10895:
URL: https://github.com/apache/hudi/issues/10895
Hi Team,
I am trying to insert a nested Object data in the Hudi Table but not able to
figure out how can I do that:
Here is my JSON input
{
"uuid": "Hello",
"name": "Hk",
"age" : 10,
"ts": "1396014602",
"data": [
{
"test": "Test",
"type": "Test"
}
]
}
Here is my Java Code :
public static final DataType ROW_DATA_TYPE = ROW(
DataTypes.FIELD("uuid", DataTypes.VARCHAR(256)), //
record key
DataTypes.FIELD("name", DataTypes.VARCHAR(10)),
DataTypes.FIELD("age", DataTypes.INT()),
DataTypes.FIELD("ts", DataTypes.TIMESTAMP(3)),
DataTypes.FIELD("ts", DataTypes.TIMESTAMP(3)),
DataTypes.FIELD("data", DataTypes.ARRAY(
ROW(
DataTypes.FIELD("test", DataTypes.VARCHAR(256)), //
record key
DataTypes.FIELD("type", DataTypes.VARCHAR(10))
))),
DataTypes.FIELD("partition", DataTypes.VARCHAR(10))
)
.notNull();
I am not able to figure out how to map the value in
static class HudiDataSource implements MapFunction<Telemetry, RowData> {
@Override
public RowData map(Telemetry kafkaRecord) throws Exception {
return
insertRow(StringData.fromString(kafkaRecord.getCampaignName()),
StringData.fromString("Danny"), 23,
TimestampData.fromEpochMillis(1),
StringData.fromString("par1")
);
}
}
Please could someone help here how can nested data is supprted
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]