- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Saving output of impala query to hdfs
- Labels:
-
Apache Impala
-
HDFS
Created on 02-23-2018 12:23 PM - edited 09-16-2022 05:53 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is it possible to save the output of an impala query to hdfs .
Sample query
impala-shell --ssl -i "${load_balancer}" -f "${2}" -o "${3}"
Would like to have it saved not to local but to hdfs.
Thanks
Created on 02-27-2018 04:42 AM - edited 02-27-2018 04:43 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @gimp077
I think there is two ways to do it:
1- You can put the output of impala-query in HDFS after you get it in a system file with PUT HDFS command:
sudo -u hdfs hdfs dfs -put "${3}" hdfs_path
2- You can use a directe insert into a result_table (stored in HDFS) just before your select statement:
INSERT INTO result_tables YOUR_QUERY
Created on 02-27-2018 04:42 AM - edited 02-27-2018 04:43 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @gimp077
I think there is two ways to do it:
1- You can put the output of impala-query in HDFS after you get it in a system file with PUT HDFS command:
sudo -u hdfs hdfs dfs -put "${3}" hdfs_path
2- You can use a directe insert into a result_table (stored in HDFS) just before your select statement:
INSERT INTO result_tables YOUR_QUERY
