Command Line Interface
Table of Contents | ||
---|---|---|
|
Set Up
The HCatalog command line interface (CLI) can be invoked as HIVE_HOME=
hive_home hcat_home/bin/hcat
where hive_home is the directory where Hive has been installed and hcat_home is the directory where HCatalog has been installed.
...
Option | Usage | Description |
---|---|---|
-g |
| Tells HCatalog that the table which needs to be created must have group "mygroup". |
-p |
| Tells HCatalog that the table which needs to be created must have permissions "rwxr-xr-x". |
-f |
| Tells HCatalog that myscript.hcatalog is a file containing DDL commands to execute. |
-e |
| Tells HCatalog to treat the following string as a DDL command and execute it. |
-D |
| Passes the key-value pair to HCatalog as a Java System Property. |
|
| Prints a usage message. |
Note the following:
...
When using the HCatalog CLI, you cannot specify a permission string without read permissions for owner, such as -wxrwxr-x
, because the string begins with "-
". If such a permission setting is desired, you can use the octal version instead, which in this case would be 375. Also, any other kind of permission string where the owner has read permissions (for example r-x------
or r--r--r--
) will work fine.
...
HCatalog does not support the following Hive DDL and other HiveQL commands:
- IMPORT FROM ALTER INDEX ... EXPORT TABLEREBUILD
- CREATE TABLE ... AS SELECT
- ALTER TABLE ... REBUILDCONCATENATE
- ALTER TABLE ... CONCATENATEARCHIVE/UNARCHIVE PARTITION
- ANALYZE TABLE ... COMPUTE STATISTICSALTER TABLE ARCHIVE/UNARCHIVE PARTITION
- IMPORT FROM ...
- EXPORT TABLE
For information about using WebHCat for DDL commands, see URL Format and WebHCat Reference: DDL Resources.
Create/Drop/Alter Table
CREATE TABLE
...
Panel | ||||||
---|---|---|---|---|---|---|
| ||||||
Previous: Reader and Writer Interfaces Hive command line interface: Hive CLI General: HCatalog Manual – WebHCat Manual – Hive Wiki Home – Hive Project Site |