Loading Data
Function Description
This section describes how to use Impala SQL to load data to the existing employees_info table. You can learn how to load data from a cluster.
Sample Code
--Load the employee_info.txt file from the /opt/impala_examples_data/ directory of the local file system to the employees_info table. LOAD DATA LOCAL INPATH '/opt/impala_examples_data/employee_info.txt' OVERWRITE INTO TABLE employees_info; -- Load /user/impala_examples_data/employee_info.txt from HDFS to the employees_info table. LOAD DATA INPATH '/user/impala_examples_data/employee_info.txt' OVERWRITE INTO TABLE employees_info;
The essence of loading data is to copy the data to the specified table directory in HDFS.
The LOAD DATA LOCAL INPATH command can be used to load files from a local file system to Impala. If LOCAL is specified, the path refers to the path of the local file system of the currently connected Impalad.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot