hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Saurabh M <mpp.databa...@gmail.com>
Subject Re: Question regarding external table and csv in NFS
Date Wed, 17 Jul 2013 21:02:36 GMT
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 <ghoshm@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.
>

Mime
View raw message