Support Questions

Find answers, ask questions, and share your expertise
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

download 2To data from hadoop to local server

Expert Contributor

I have 2 To of data in My hadoop cluster through Hive and I would bring these data in my local server, So I use Hive to perform this task by using beeline CLI as below:

use db1;

for i in (T1 T2 T3 ...)do

export table $1 to '/tmp/$i';


(Notice: maybe you notice same errors in this query above, it's not what I'm looking for, this syntaxe isn't the same I've used, but it's close enough and it works for me, so don't care about this query).

this query is really slow to done this task, So what I'm looking for actually is to know if there is some other solution like using Scoop or (hadoop fs -get /user/hive/warehouse/database.db) or even hive to do this task as fast as possible.


Super Collaborator

For loops are not a syntax in Hive.

Sqoop "export" command or SparkSQL are alternative solutions to what you are doing, but all solutions will be slow, depending on the size of the database tables. There is only so fast a single CPU and network interface can process data.

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.