Home:ALL Converter>How can I find external table in hive and hadoop?

How can I find external table in hive and hadoop?

Ask Time:2015-10-20T10:53:12         Author:허규준

Json Formatter

First I installed hadoop 2.6.0 on centos (reference path, and configuration http://www.rexamine.com/2015/02/installing-hadoop-2-6-0-on-centos-7/)

Installed hive and configure hive-default.xml

<name>javax.jdo.option.connectionURL</name>
<value>jdbc:derby:;databaseName=metastore_db:create=true</value>

-->> (changed)

<name>javax.jdo.option.connectionURL</name>
<value>jdbc:derby:;databaseName=/opt/hive(HIVE_HOME)metastore_db:create=true</value>

and I used data (https://github.com/reillywatson/nasdaq-outliers) nasdaq_daily_prices_*.csv file to create external table (stock.hql)

create external table if not exists stocks(
...
location /user/hadoop/stock)

and I executed

hive -f stock.hql

and I executed too

bin/hive - e "describe extended stocks"

but hive return "table not found".

So how can I find external table and use it in hive and hadoop?

p.s My hadoop configuration is same in

http://www.rexamine.com/2015/02/installing-hadoop-2-6-0-on-centos-7/

and hive configuration is just changed

<value>jdbc:derby:;databaseName=/opt/hive(HIVE_HOME)metastore_db:create=true</value>


HADOOP_HOME=/opt/hadoop
HIVE_HOME=/opt/hive

Author:허규준,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/33227190/how-can-i-find-external-table-in-hive-and-hadoop
yy