So I have webhcat 0.11.0 and have written a Java class which uses HCatalog’s DDL. Basically I took Alans example code from github and leveraged it. It works great but I noticed that when I create a text table, I cannot specify (or haven’t found how to specify) a JsonSerde row format. Basically I want to do something like what is done on the command line.
hive>use myalphadb; create table test_jsontable (id string, name string) ROW FORMAT SERDE ‘org.apache.hcatalog.data.JsonSerDe';
However, I don’t see how to do this using HCatCreateTableDesc. And if the table is created as a regular text file, hive will not be able to read the data and will return nulls for all keys and values.
So – is there a way to tell HCatalog programmatically to create a table use a row format serde of JSON?