This is the documentation for CDH 5.0.x. Documentation for other versions is available at Cloudera Documentation.

Accessing Table Information with the HCatalog Command-line API

# Create a table
$ hcat -e "create table groups(name string,placeholder string,id int) row format delimited fields terminated by ':' stored as textfile"
OK

# Get the schema for a table
$ hcat -e "desc groups"
OK
name	string
placeholder	string
id	int

# Create another table
$ hcat -e "create table groupids(name string,id int)"
OK

See the HCatalog documentation for information on using the HCatalog command-line application.

Page generated September 3, 2015.