hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hanish Bansal <hanish.bansal.agar...@gmail.com>
Subject Sql statements respective to few metastore client apis
Date Mon, 27 Oct 2014 13:44:17 GMT
Hi All,

I am switching from HiveMetaStoreClient java api to HiveServer2 jdbc client
api.

I am unable to find respective sql queries for some of cases:

1. To get file format of a table:

In HiveMetaStoreClient:

String fileFormat = hiveClient.getTable(db,tablename).getSd()
                    .getInputFormat();

In HiveServer2 jdbc client api: ??

2. To get field delimiter of table:

In HiveMetaStoreClient:

String fieldDelim = hiveClient.getTable(db, tablename).getSd()
                    .getSerdeInfo().getParameters().get("field.delim");

In HiveServer2 jdbc client api: ??

3. To get location of a table:

In HiveMetaStoreClient:

String location = hiveClient.getTable(dbname,
tablename).getSd().getLocation();

In HiveServer2 jdbc client api: ??


If anyone know how to write respective sql statement for these, please let
me know.

Thanks in advance !!


-- 
*Regards*
*Hanish Bansal*

Mime
View raw message