250+ TOP MCQs on HiveQL and Answers

Hadoop Multiple Choice Questions & Answers (MCQs) for quizzes focuses on “HiveQL – 2”.

1. Hive specific commands can be run from Beeline, when the Hive _______ driver is used.
a) ODBC
b) JDBC
c) ODBC-JDBC
d) All of the Mentioned

Answer: b
Clarification: Hive specific commands are same as Hive CLI commands.

2. Point out the correct statement.
a) –helpusage display a usage message
b) The JDBC connection URL format has the prefix jdbc:hive:
c) Starting with Hive 0.14, there are improved SV output formats
d) None of the mentioned

Answer: c
Clarification: Output formats available are namely DSV, CSV2 and TSV2.

3. _________ reduce the amount of informational messages displayed (true) or not (false).
a) –silent=[true/false]
b) –autosave=[true/false]
c) –force=[true/false]
d) All of the mentioned

Answer: a
Clarification: It also stops displaying the log messages for the query from HiveServer2.

4. Which of the following is used to set transaction isolation level?
a) –incremental=[true/false]
b) –isolation=LEVEL
c) –force=[true/false]
d) –truncateTable=[true/false]

Answer: b
Clarification: Set the transaction isolation level to TRANSACTION_READ_COMMITTED or TRANSACTION_SERIALIZABLE.

5. Point out the wrong statement.
a) HiveServer2 has a new JDBC driver
b) CSV and TSV output formats are maintained for forward compatibility
c) HiveServer2 supports both embedded and remote access to HiveServer2
d) None of the mentioned

Answer: b
Clarification: CSV and TSV output formats are maintained for backward compatibility.

6. The ________ allows users to read or write Avro data as Hive tables.
a) AvroSerde
b) HiveSerde
c) SqlSerde
d) None of the mentioned

Answer: a
Clarification: AvroSerde understands compressed Avro files.

  250+ TOP MCQs on Knox with Hadoop and Answers

7. Starting in Hive _______ the Avro schema can be inferred from the Hive table schema.
a) 0.14
b) 0.12
c) 0.13
d) 0.11

Answer: a
Clarification: Starting in Hive 0.14, columns can be added to an Avro backed Hive table using the Alter Table statement.

8. The AvroSerde has been built and tested against Hive 0.9.1 and later, and uses Avro _______ as of Hive 0.13 and 0.14.
a) 1.7.4
b) 1.7.2
c) 1.7.3
d) None of the mentioned

Answer: d
Clarification: The AvroSerde uses Avro 1.7.5.

9. Which of the following data type is supported by Hive?
a) map
b) record
c) string
d) enum

Answer: d
Clarification: Hive has no concept of enums.

10. Which of the following data type is converted to Array prior to Hive 0.12.0?
a) map
b) long
c) float
d) bytes

Answer: d
Clarification: Bytes are converted to Array[smallint] prior to Hive 0.12.0.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top