Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Hive, mail # user - Templeton create table with custom inputformat


Copy link to this message
-
Templeton create table with custom inputformat
Peter Marron 2013-07-29, 07:47
Hi,

(I'm a little bit behind in reading the lists, so apologies if this is a duplicate question.)

I am running Templeton v1 (?) and HCatalog 0.5.0 with hive 0.11.0 over Hadoop 1.0.4.

I can use something like this:

curl -s -X PUT -HContent-type:application/json -d @createtable.json http://hpcluster1:50111/templeton/v1/ddl/database/default/table/ordinals?user.name=pmarron

to successfully create a Hive table in my metastore. Where the file createtable.json looks like this:

{ "external":true,
  "columns" :  [
        { "name": "english", "type": "string" },
        { "name": "number", "type": "string" },
        { "name": "italian", "type": "string" }
    ],
  "format": {
      "storedAs" : "rcfile"
      "rowFormat": { "fieldsTerminatedBy": ","  }
    }
}

Now, I can change the "storedAs" argument to be "rcfile", "sequencefile", "textfile" or "orc" and they all work.
However I can't work out any syntax which allows me to create a table with a custom InputFormat.
Is there some way to create a table over the Templeton RESTful interface with  a custom InputFormat?

Also I can't find the source code where this JSON is parsed, is it shipped with the Hive 11 source?
If so can someone tell me where?

Many thanks in advance.

Regards,

Z

+
Peter Marron 2013-08-02, 09:08