Engineering Questions with Answers - Multiple Choice Questions

MCQs on Querying Data with HiveQL – 1

1 - Question

Avro-backed tables can simply be created by using _________ in a DDL statement.
a) “STORED AS AVRO”
b) “STORED AS HIVE”
c) “STORED AS AVROHIVE”
d) “STORED AS SERDE”

View Answer

Answer: a
Explanation: AvroSerDe takes care of creating the appropriate Avro schema from the Hive table schema.




2 - Question

Point out the correct statement.
a) Avro Fixed type should be defined in Hive as lists of tiny ints
b) Avro Bytes type should be defined in Hive as lists of tiny ints
c) Avro Enum type should be defined in Hive as strings
d) All of the mentioned

View Answer

Answer: b
Explanation: The AvroSerde will convert these to Bytes during the saving process.




3 - Question

Types that may be null must be defined as a ______ of that type and Null within Avro.
a) Union
b) Intersection
c) Set
d) All of the mentioned

View Answer

Answer: a
Explanation: A null in a field that is not so defined will result in an exception during the save. No changes need be made to the Hive schema to support this, as all fields in Hive can be null.




4 - Question

The files that are written by the _______ job are valid Avro files.
a) Avro
b) Map Reduce
c) Hive
d) All of the mentioned

View Answer

Answer: c
Explanation: If you copy these files out, you’ll likely want to rename them with .avro.




5 - Question

Point out the wrong statement.
a) To create an Avro-backed table, specify the serde as org.apache.hadoop.hive.serde2.avro.AvroSerDe
b) Avro-backed tables can be created in Hive using AvroSerDe
c) The AvroSerde cannot serialize any Hive table to Avro files
d) None of the mentioned

View Answer

Answer: c
Explanation: The AvroSerde can serialize any Hive table to Avro files.




6 - Question

Use ________ and embed the schema in the create statement.
a) schema.literal
b) schema.lit
c) row.literal
d) all of the mentioned

View Answer

Answer: a
Explanation: You can embed the schema directly into the create statement.




7 - Question

_______ is interpolated into the quotes to correctly handle spaces within the schema.
a) $SCHEMA
b) $ROW
c) $SCHEMASPACES
d) $NAMESPACES

View Answer

Answer: a
Explanation: Use none to ignore either avro.schema.literal or avro.schema.url.




8 - Question

To force Hive to be more verbose, it can be started with ___________
a) *hive –hiveconf hive.root.logger=INFO,console*
b) *hive –hiveconf hive.subroot.logger=INFO,console*
c) *hive –hiveconf hive.root.logger=INFOVALUE,console*
d) All of the mentioned

View Answer

Answer: a
Explanation: This Statement will spit orders of magnitude more information to the console and will likely include any information the AvroSerde is trying to get you about what went wrong.




9 - Question

________ was designed to overcome limitations of the other Hive file formats.
a) ORC
b) OPC
c) ODC
d) None of the mentioned

View Answer

Answer: a
Explanation: The Optimized Row Columnar (ORC) file format provides a highly efficient way to store Hive data.




10 - Question

An ORC file contains groups of row data called __________
a) postscript
b) stripes
c) script
d) none of the mentioned

View Answer
Answer: b
Explanation: The default stripe size is 250 MB. Large stripe sizes enable large, efficient reads from HDFS.

 

 

Get weekly updates about new MCQs and other posts by joining 18000+ community of active learners