Configuring Impala Query Results with impalarc

I routinely run Impala queries on a remote machine and want the results to save to a CSV file on that machine.

I recently realized that I should setup an Impala config file on that machine to configure the connection to the Impala cluster and the output file format.

So I created a text file at ~/.impalarc with the following settings:

1
2
3
4
5
6
7
8
[impala]
impalad=CLUSTER-ADDRESS:PORT
output_delimiter=,
verbose=true
ignore_query_failure=false
default_db=prd
write_delimited=true
print_header=true

Now when I run a query with impala-shell, I don’t have to specify the address of the cluster, or the various flags required to get a CSV with a header.

Other impala-shell config options are specified here

Last updated on Feb 12, 2024 09:29 -0500
Feedback
FOOTER