简体   繁体   中英

How can I create Hive tables from AWS S3 bucket from my local machine?

I am trying to create hive table from S3 location but I am getting error. This is my query

hive> create external table if not exists external_sales(invoice_id string,
branch string,
customer_type string,
gender string,
product_category string,
price int,
quantity int,
tax float,
total float,
purchase_date string,
ptime string,
payment_mode string,
cogs float,
gross_margin_p float,
gross_income float,
rating float)
location's3n://rawdata831547/csv_data/supermarket_sales.csv'
tblproperties ("skip.header.line.count"="1");

Error -

No FileSystem for scheme "s3n"

Also tried S3a:// , s3n:// Thanks in advance!

It looks like this bug: HIVE-13996

Try to add hadoop libraries path to the HADOOP_CLASSPATH (in the shell before running hive):

export HADOOP_CLASSPATH=$HADOOP_CLASSPATH:$HADOOP_HOME/share/hadoop/tools/lib/*

You can check the hadoop classpath with this:

bin/hadoop classpath

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM