hue_export_and_download
Export SQL query results from Hue to HDFS and download files to your local system for data analysis or storage.
Instructions
Execute an INSERT OVERWRITE DIRECTORY query and download the results.
This tool is for queries that write output to HDFS (like INSERT OVERWRITE DIRECTORY),
then downloads the resulting files to the local filesystem.
Args:
statement: SQL statement with INSERT OVERWRITE DIRECTORY
hdfs_directory: The HDFS directory where results are written
local_directory: Local directory to download files to (default: '.')
dialect: SQL dialect - 'hive', 'sparksql', or 'impala' (default: 'hive')
file_pattern: Optional regex pattern to filter files to download
timeout: Maximum wait time in seconds (default: 300)
Returns:
OperationResult with list of downloaded files in message
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| statement | Yes | ||
| hdfs_directory | Yes | ||
| local_directory | No | . | |
| dialect | No | hive | |
| file_pattern | No | ||
| timeout | No |