Hi Mainak,

Can you try using this:

 create external table outside_supplier (S_SUPPKEY INT, S_NAME STRING,
S_ADDRESS STRING, S_NATIONKEY INT, S_PHONE STRING, S_ACCTBAL DOUBLE,
S_COMMENT STRING) ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' STORED AS
TEXTFILE LOCATION 'file:///mnt/h/tpc-h-impala/data/supplier.tbl';

I assume that "supplier.tbl" is a directory and the csv file is present in
the same.

Let me know if it worked!

Thanks,

Saurabh


On Thu, Jul 18, 2013 at 1:55 AM, Mainak Ghosh <gho...@us.ibm.com> wrote:

> Hello,
>
> I have just started using Hive and I was trying to create an external
> table with the csv file placed in NFS. I tried using file:// and local://.
> Both of these attempts failed with the error:
>
> create external table outside_supplier (S_SUPPKEY INT, S_NAME STRING,
> S_ADDRESS STRING, S_NATIONKEY INT, S_PHONE STRING, S_ACCTBAL DOUBLE,
> S_COMMENT STRING) ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' STORED AS
> TEXTFILE LOCATION 'local://mnt/h/tpc-h-impala/data/supplier.tbl';
>
> FAILED: Error in metadata: MetaException(message:Got exception:
> java.io.IOException No FileSystem for scheme: local)
>
> and
>
> create external table outside_supplier (S_SUPPKEY INT, S_NAME STRING,
> S_ADDRESS STRING, S_NATIONKEY INT, S_PHONE STRING, S_ACCTBAL DOUBLE,
> S_COMMENT STRING) ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' STORED AS
> TEXTFILE LOCATION 'file://mnt/h/tpc-h-impala/data/supplier.tbl';
>
> FAILED: Error in metadata:
> MetaException(message:file:/h/tpc-h-impala/data/supplier.tbl is not a
> directory or unable to create one)
>
> Am I missing some configuration? Any help would be really appreciated.
>
> Thanks and Regards,
> Mainak.
>

Reply via email to