You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Sanjay Subramanian <Sa...@wizecommerce.com> on 2013/08/08 23:46:02 UTC

Hive query hive_server_host A and write results to hadoop cluster B

Hi guys

Perhaps u know this already but very useful. This directly creates a file based on the output of this query  to name_node_host_2 HDFS cluster

Regards

Sanjay

hive -h hive_server_host1  -e "<hive_query_string>"| hdfs dfs -put - hdfs://<name_node_host_2>:<port>/path/to/ur/dir/your_file_name

CONFIDENTIALITY NOTICE
======================
This email message and any attachments are for the exclusive use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message along with any attachments, from your computer system. If you are the intended recipient, please be advised that the content of this message is subject to access, review and disclosure by the sender's Email System Administrator.