C.A
C.A

Reputation: 620

Export data into Hive from a node without Hadoop(HDFS) installed

Is it possible to export data from a node that has not hadoop(HDFS) or Sqoop installed to a Hive server? I would read the data from a source which could be Mysql or just files in some directory and then use the Hadoop core classes or something like Sqoop to export the data into my Hadoop cluster. I am programming in Java.

Upvotes: 0

Views: 836

Answers (1)

K S Nidhin
K S Nidhin

Reputation: 2650

Since you are final destination is a hive table. I would suggest the following :

  1. Create a hive final table.
  2. use the following command to load data from the other node

    LOAD DATA LOCAL INPATH '<full local path>/kv1.txt' OVERWRITE INTO TABLE table_name;
    

refer this

Using Java , You could use JSCH lib to invoke these shell commands or so .

Hope this helps.

Upvotes: 0

Related Questions