Back

Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in Big Data Hadoop & Spark by (11.4k 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 (32.3k 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:

 

Welcome to Intellipaat Community. Get your technical queries answered by top developers!

28.4k questions

29.7k answers

500 comments

94k users

Browse Categories

...