Dear Wiki user, You have subscribed to a wiki page or wiki category on "Pig Wiki" for change notification.
The "Howl/HowlCliFuncSpec" page has been changed by AshutoshChauhan. http://wiki.apache.org/pig/Howl/HowlCliFuncSpec -------------------------------------------------- New page: == Howl CLI Functional Specification == This wiki page outlines what is supported from Howl CLI. In http://wiki.apache.org/hadoop/Hive/LanguageManual/DDL Hive's DDL spec outlines various allowed operations. This wiki will talk about which of those are allowed and are not allowed from Howl CLI. Among those which are allowed how are they different from Hive's CLI. ==== CREATE TABLE ==== * STORED AS clause which is currently defined as: [STORED AS file_format] file_format: . : SEQUENCEFILE | TEXTFILE | RCFILE | INPUTFORMAT input_format_classname OUTPUTFORMAT output_format_classname will be modified to support [STORED AS file_format] file_format: . : RCFILE | INPUTFORMAT input_format_classname OUTPUTFORMAT output_format_classname INPUTDRIVER input_driver_classname OUTPUTDRIVER output_driver_classname * CREATE TABLE command must contain "STORED AS" clause, if it doesnt it will result in an exception "Operation not supported. Create table doesn't contain STORED AS clause. Please provide one." * If table is partitioned, then user provides partition columns. These columns can only be of type String. * CLUSTERED BY clause is not supported. If provided will result in an exception "Operation not supported. CLUSTERED BY is not supported." CREATE TABLE AS SELECT * Not Supported. Throws an exception with message "Operation Not Supported". CREATE TABLE LIKE * Allowed only if existing table was created using Howl. Else, throws an exception "Operation not supported. Table table name should have been created through Howl. Seems like its not." DROP TABLE * Behavior same as of Hive. ==== ALTER TABLE ==== ALTER TABLE table_name ADD partition_spec [ LOCATION 'location1' ] partition_spec [ LOCATION 'location2' ] ... . partition_spec: . : PARTITION (partition_col = partition_col_value, partition_col = partiton_col_value, ...) * Allowed only if TABLE table_name was created using Howl. Else, throws an exception "Operation not supported. Partitions can be added only to tables through Howl." Alter Table File Format ALTER TABLE table_name SET FILEFORMAT file_format Here file_format must be same as the one described above in CREATE TABLE. Else, throw an exception "Operation not supported. Not a valid file format." * CLUSTERED BY clause is not supported. If provided will result in an exception "Operation not supported. CLUSTERED BY is not supported." Change Column Name/Type/Position/Comment ALTER TABLE table_name CHANGE [COLUMN] col_old_name col_new_name column_type [COMMENT col_comment] [FIRST|AFTER column_name] * Not supported. Throws an exception with message "Operation Not Supported". Add/Replace Columns ALTER TABLE table_name ADD|REPLACE COLUMNS (col_name data_type [COMMENT col_comment], ...) * ADD Columns is allowed. Behavior same as of Hive. * Replace column is not supported. Throws an exception with message "Operation Not Supported". Alter Table Touch ALTER TABLE table_name TOUCH; ALTER TABLE table_name TOUCH PARTITION partition_spec; * Not Supported. Throws an exception with message "Operation Not Supported". ===== CREATE VIEW ===== * Not Supported. Throws an exception with message "Operation Not Supported". ===== DROP VIEW ===== * Not Supported. Throws an exception with message "Operation Not Supported". ===== ALTER VIEW ===== * Not Supported. Throws an exception with message "Operation Not Supported". ===== SHOW TABLES ===== * Behavior same as of Hive. ===== SHOW PARTITIONS ===== * Behavior same as of Hive. ===== SHOW FUNCTIONS ===== * Not Supported. Throws an exception with message "Operation Not Supported". ===== DESCRIBE ===== * Behavior same as of Hive. Any other commands apart from one listed above will result in an exception with message "Operation Not Supported". ==== User Interface for Howl ==== It will support following four command line options: * -g : Usage is -g mygroup This indicates to Howl that table that needs to be created must have group as "mygroup" * -p : Usage is -p rwxr-xr-x This indicates to Howl that table that needs to be created must have permissions as "rwxr-xr-x" * -f : Usage is -f myscript.howl This indicates to howl that myscript.howl is a file which contains DDL commands it needs to execute. * -e : Usage is -e 'create table mytable(a int);' This indicates to Howl to treat the following string as DDL command and execute it. Notes: * -g and -p options are not mandatory. If not supplied and command contains a CREATE TABLE which is successful, user will be told with what permissions and in which group her table is created. This will be printed on stdout. Message will read as "Table tablename is created with default group as groupname and default permissions as perms ". * Only one of either -e or -f option can be provided. * Order of options is immaterial. User can specify the options in any order.