0 votes
1 view
in Big Data Hadoop & Spark by (11.5k points)

I run hive query by java code. Example:

"SELECT * FROM table WHERE id > 100"

How to export result to hdfs file.a

1 Answer

0 votes
by (25.6k points)
edited by

To directly insert the result of any hive query into HDFS file, try this command:

INSERT OVERWRITE DIRECTORY '/output/path/dir' SELECT * FROM table WHERE id > 100;

You can refer the following video tutorial which will clear all your doubts regarding Hadoop:

 

...