H13-711_V3.5 · Question #312
Which way is the correct way to load data into the Hive table? (Multiple choice)
The correct answer is A. Load the file in the local path directly into the Hive table. C. Insert the result sets of other tables into the Hive table. D. Load the files on HDFS into the Hive table. Hive provides three valid ways to load data: using LOAD DATA LOCAL INPATH to copy a file from the local filesystem into the Hive table (A), using INSERT INTO TABLE ... SELECT ... to populate a table from query results of another table (C), and using LOAD DATA INPATH (without…
Question
Which way is the correct way to load data into the Hive table? (Multiple choice)
Options
- ALoad the file in the local path directly into the Hive table.
- BHive supports the method of insert into a single record, so you can insert a single record directly
- CInsert the result sets of other tables into the Hive table.
- DLoad the files on HDFS into the Hive table.
How the community answered
(31 responses)- A71% (22)
- B29% (9)
Explanation
Hive provides three valid ways to load data: using LOAD DATA LOCAL INPATH to copy a file from the local filesystem into the Hive table (A), using INSERT INTO TABLE ... SELECT ... to populate a table from query results of another table (C), and using LOAD DATA INPATH (without LOCAL) to move files directly from HDFS into the Hive table directory (D).
Why B is wrong: Hive is a batch-processing system built on top of Hadoop - it is fundamentally not designed for single-row inserts like a traditional RDBMS. While very modern Hive versions added limited INSERT INTO ... VALUES syntax, it is grossly inefficient and not a supported or intended loading method. The exam is testing this core architectural distinction.
Memory tip: Think of Hive as a file-and-batch system, not a row-by-row database. Ask yourself: "Does this load a file or a batch of data?" - if yes, it's valid (local file, HDFS file, or query results). If it sounds like something you'd do in MySQL one row at a time, Hive doesn't do that.
Topics
Community Discussion
No community discussion yet for this question.