Thanks Alan. The problem persists and the error message I get is:

"ERROR 1115: Unsupported type: 50  in Pig's schema".

The test script is a simple 3-line,

A = load '/etc/passwd' using PigStorage(':');
B = foreach A generate $0 as id;
STORE B INTO 'default.unix_users' USING  org.apache.hcatalog.pig.HCatStorer();

The table unix_names had been created prior to the run as:

$ /usr/local/hcat/bin/hcat -e "CREATE TABLE unix_users (line STRING) STORED AS RCFILE"

and the query on mysql CLI shows the correct metadata for the table "unix_users".

(a few fields deleted for clarity)

mysql> select * from TBLS;

| TBL_ID | DB_ID | OWNER   | SD_ID |   TBL_NAME |             TBL_TYPE | +--------+-------------+---------------+-----------+--------------------+-----------------------------+
|          1 |        1 |      prasad |         1 |     unix_users | MANAGED_TABLE |

1 row in set (0.00 sec)

mysql> select * from COLUMNS;

|     1 | NULL    | line        | string    |           0 |

1 row in set (0.00 sec)

Could you please give any pointers ? Also copied below is part of the log that indicates the error in input / output file validation.

thank you,

Pig Stack Trace
ERROR 1115: Unsupported type: 50  in Pig's schema

org.apache.pig.impl.plan.VisitorException: ERROR 1115:
<file, line 3, column 0> Output Location Validation Failed for: 'default.unix_users More info to follow:
Unsupported type: 50  in Pig's schema
        at org.apache.pig.newplan.logical.rules.InputOutputFileValidator$InputOutputFileVisitor.visit(
        at org.apache.pig.newplan.logical.relational.LOStore.accept(
        at org.apache.pig.newplan.DepthFirstWalker.depthFirst(
        at org.apache.pig.newplan.DepthFirstWalker.depthFirst(
        at org.apache.pig.newplan.DepthFirstWalker.depthFirst(
        at org.apache.pig.newplan.DepthFirstWalker.walk(
        at org.apache.pig.newplan.PlanVisitor.visit(
        at org.apache.pig.newplan.logical.rules.InputOutputFileValidator.validate(
        at org.apache.pig.backend.hadoop.executionengine.HExecutionEngine.compile(
        at org.apache.pig.PigServer.compilePp(
        at org.apache.pig.PigServer.executeCompiledLogicalPlan(
        at org.apache.pig.PigServer.execute(
        at org.apache.pig.PigServer.executeBatch(
        at org.apache.pig.Main.main(
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
        at java.lang.reflect.Method.invoke(
        at org.apache.hadoop.util.RunJar.main(

On Wed, Mar 28, 2012 at 5:30 PM, Alan Gates <> wrote:
You should be able to store to an unpartitioned table by passing no arguments to HCatStorer (despite what the docs say).


On Mar 28, 2012, at 5:26 PM, Prasad B wrote:

> The documentation on HCatStorer says:
> "For the USING clause, you can have two string arguments:
> The first string argument represents key/value pairs for partition. This is a *mandatory* argument. In the above example, month, date and hour are columns on which table is partitioned. The values for partition keys should NOT be quoted, even if the partition key is defined to be of string type."
> Since the first argument is mandatory, it implies that tables into which data is stored using HCatStorer have to be created with at least one partition. For eg., as
> CREATE TABLE table_name (line STRING);
> ALTER TABLE table_name ADD PARTITION (col="xxx")
> Is my understanding correct ? My script tried to store to an unpartitioned table, by specifying ' ' for the first argument, and the HCatBaseStorer complains about the type.
> Prasad.