Apache Hive : WebHCat Reference GetDB

Last updated: December 12, 2024

Apache Hive : WebHCat Reference GetDB

Description

Describe a database. (Note: This resource has a “format=extended” parameter however the output structure does not change if it is used.)

URL

http://www.myserver.com/templeton/v1/ddl/database/:db

Parameters

NameDescriptionRequired?Default
:dbThe database nameRequiredNone

The standard parameters are also supported.

Results

NameDescription
locationThe database location
paramsThe database parameters
commentThe database comment
databaseThe database name

Example

Curl Command

% curl -s 'http://localhost:50111/templeton/v1/ddl/database/newdb?user.name=ctdean'

JSON Output

{
 "location":"hdfs://localhost:9000/warehouse/newdb.db",
 "params":"{a=b}",
 "comment":"Hello there",
 "database":"newdb"
}

JSON Output (error)

{
  "error": "No such database: newdb",
  "errorCode": 404
}

Navigation Links Previous: GET ddl/database Next: PUT ddl/database/:db