Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Plain View
Hive >> mail # user >> Data Loaded but Select returns nothing!


+
Kuldeep Chitrakar 2012-07-30, 11:58
+
Connell, Chuck 2012-07-30, 13:04
Copy link to this message
-
Re: Data Loaded but Select returns nothing!
Kuldeep

Couple of things I hoticed here are

Your table is bucketed, when you load data into a bucketed table you need to enable

hive.enforce.bucketing=true;

Bucketing needs a MR job so you need to load the non bucketed data into a normal table and from that load to a bucketed table using 'Insert Overwrite'.

Then another quick nit
Your table is partitioned so you need to load your data into some partition but you have not spefied a partition in Load.

Regards
Bejoy KS

Sent from handheld, please excuse typos.

-----Original Message-----
From: Kuldeep Chitrakar <[EMAIL PROTECTED]>
Date: Mon, 30 Jul 2012 06:58:33
To: [EMAIL PROTECTED]<[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Subject: Data Loaded but Select returns nothing!

Hi

I am trying to load a CSV file into HIve table.

Everything works fine but when a fire "select * from tablename" command. It does not retun anything.

--Create Table

CREATE TABLE IF NOT EXISTS learn.crime_managed_native (
NoState String,
TypeofCrime String,
Crime String,
Year int,
Count int)
PARTITIONED BY (State String)
CLUSTERED BY (Crime) SORTED BY (Year ASC) INTO 8 BUCKETS
ROW FORMAT DELIMITED FIELDS TERMINATED BY ','
STORED AS TEXTFILE;

--Load Data

LOAD DATA LOCAL INPATH '/home/cloudera/CrimeHive.csv' INTO TABLE crime_managed_native;

What could be the possible issue.

Thanks,
Kuldeep
+
Kuldeep Chitrakar 2012-07-30, 13:02
+
Kuldeep Chitrakar 2012-07-30, 13:23
+
Bejoy KS 2012-07-30, 13:22
+
Matouk Iftissen 2012-07-30, 12:13
+
Kuldeep Chitrakar 2012-07-30, 12:38
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB