Hi,
Create table statement is :
CREATE TABLE dummy_table (foo INT, bar STRING)
COMMENT 'This is the staging page view table'
ROW FORMAT DELIMITED FIELDS TERMINATED BY '44' LINES TERMINATED
BY '10'
STORED AS TEXTFILE
LOCATION '/home/hadoop/user/data';
Copy command is : hadoop dfs -put /home/hadoop/dummy_table.txt
/home/hadoop/user/data
Dummy_table.txt is a simple comma delemiter file having content as
below:
1,a
2,a
3,a
File is getting copied properly,even I have print its content using hadoop
dfs -cat command, it is showing me all the records.
But when I am firing a query "select * from dummy_table" on *hive over
hadoop-0.19.2* it is giving me nothing. Event when I an firing a query
"select count(1) from dummy_table" is giving 0 as a result.
*This problem is occurring on hadoop-0.19.2 version of hadoop, but when I
am doing it on hadoop-0.20.0 version , it is happening successfully.
*Please help me to solve this problem.
Thanking You
Mohan Agarwal
On Tue, Nov 3, 2009 at 10:24 PM, Eric Arenas <[email protected]> wrote:
> Hi Mohan,
>
> Can you please paste your create table statement?
>
> Also, have you checked that the target directory has data files that you
> want to load?
>
> regards,
> Eric Arenas
>
>
> ------------------------------
> *From:* Mohan Agarwal <[email protected]>
> *To:* [email protected]
> *Sent:* Tue, November 3, 2009 5:22:38 AM
> *Subject:* Problem regarding external table
>
> Hi,
> I am using hive over hadoop-0.19.0 , I have created a external table
> pointing its loaction at certain specified directory, and I have also
> copied the data file (macthing the table structure) using hadoop dfs -put
> command to that specified directory , but when I am printing the data of
> external table it is shows nothing. Even the count(1) on the external table
> is giving 0.
> Please help me solve this problem.
>
> Thanking You
> Mohan Agarwal
>
>
>