You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Sai Sai <sa...@yahoo.in> on 2013/05/24 13:09:44 UTC

Re: Where can we see the results of Select * from states

I have created an external table called states under a database called test,
Then loaded the table successfully;
The i have tried:

Select * from states;

It successfully executes MR and displays the results in the console but wondering where to look in hdfs to see these results.

I have looked under all the dirs in filesystem for the below url but cannot see the results part file.

http://localhost.localdomain:50070/dfshealth.jsp


Also if i would like the results to save to a specific file from a query how to do it?

For Ex: 
    Select * from states > myStates.txt ;
Is there something like this.
Thanks
Sai

Re: Where to find the external table file in HDFS

Posted by Sai Sai <sa...@yahoo.in>.
I have created an external table states and loaded it from a file under /tmp/states.txt

Then in the url: 

http://localhost.localdomain:50070/dfshealth.jsp

I have looked to see if this file states table exists and do not see it.
Just wondering if it is saved in hdfs or not.

How many days will the files exist under /tmp folder.
Thanks
Sai

Re: Where can we see the results of Select * from states

Posted by Jov <am...@amutu.com>.
you can write data into filesystem from query using "INSERT OVERWRITE
[LOCAL] DIRECTORY directory1 SELECT ... FROM ..."

more detail:
https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DML#LanguageManualDML-Writingdataintofilesystemfromqueries


2013/5/24 Sai Sai <sa...@yahoo.in>

> I have created an external table called states under a database called
> test,
> Then loaded the table successfully;
> The i have tried:
>
> Select * from states;
>
> It successfully executes MR and displays the results in the console but
> wondering where to look in hdfs to see these results.
>
> I have looked under all the dirs in filesystem for the below url but
> cannot see the results part file.
>
> http://localhost.localdomain:50070/dfshealth.jsp
>
> Also if i would like the results to save to a specific file from a query
> how to do it?
>
> For Ex:
>     Select * from states > myStates.txt ;
> Is there something like this.
> Thanks
> Sai
>
>
>


-- 
Jov
blog: http:amutu.com/blog <http://amutu.com/blog>