This section presents you various set of Mock Tests related to Hive. You can download these sample mock tests at your local machine and solve offline at your convenience. Every mock test is supplied with a mock test key to let you verify the final score and grade yourself.
Q 1 - To see the partitions keys present in a Hive table the command used is
The DESCRIBE EXTENDED command gives all the details
Q 2 - If the directory for a partition does not exist, and a query is executed for this partition then
The map reduce job is triggered but no result will be returned.
Q 3 - In Hive SerDe stands for
It is a program to read and write files using Java Input and Output formats.
Q 4 - SerDe
Converting records to columns is serializing and the reverse is Deerializing
Q 5 - Users can pass configuration information to the SerDe using
This feature of SrrDe is used to customize Hive for a wide range of file formats
Q 6 - If we change the partition location of a hive table using ALTER TABLE option then the data for that partition in the table
Data is independent of schema in Hive.
Q 7 - If the schema of the table does not match with the data types present in the file containing the table then HIve
Hive always tries to read the data as it is Schema on Read.
Q 8 - The position of a specific column in a Hive table
It is up to the user to ensure the synchronization between schema and data
Q 9 - When a partition is archived in Hive it
Archiving merges the files into one directory.
Q 10 - Partitioned can be prevented from being
using the ALTER TABLE…….. ENABLE NO_DROP & ENABLE OFFLINE clause.
Q 11 - While loading data into managed tables, If the LOCAL clause is mentioned, it
The LOCAL clause only copies without moving the files.
Q 12 - Creating a table an loading it with a select clause in one query applies to
Only a internal table can be created and loaded with data using one query.
Q 13 - While querying a hive table for a Array type column, if the array index is nonexistent then
Hive returns NULL while in java it would have returned index out of bound error
Q 14 - While querying a hive table for a column with MAP data type, the elements in the column are referenced by
The MAP data type is a key-value pair and not index based.
Q 15 - When the result of the STRING data type is returned by querying array data type using index, the result have
The STRINGS returned form ARRAYS will not contain the quotes.
STRUCT elements are key-value pairs and the elements are accessed by dot notation.
Q 17 - To select all columns starting with the word 'Sell' form the table GROSS_SELL the query is
Hive supports java based regular expression for querying its metadata.
Q 18 - The performance of an aggregate query is improved by setting which of the following property as true?
SET hive.map.aggr = true;
Q 19 - Consider the query SELECT explode(city_locality) from ALL_LOCALITIES , where city_locality is a ARRAY dat atype. This will return
The explode() function expands each element of ARRAY into a row.
Q 20 - The CONCAT string function in Hive can concatenate
CONCAT function accepts any number of arguments
Q 21 - The clause used to limit the number of rows returned by a query is
LIMIT restricts the number of rows returned by a query.
Q 22 - The property set to run hive in local mode as true so that it runs without creating a mapreduce job is
In local mode hive will not trigger a mapreduce job.
Q 23 - The below expression in the where clause
gives the result which match
Hive supports java based regular expression for querying.
Q 24 - When a Hive query joins 3 tables, How many mapreduce jobs will be started?
Hive cerates one mapreduce job for the first pair of tables and second pair of tables with one table common between both the pairs.
Q 25 - For optimizing join of three tables, the largest sized tables should be placed as
Hive reads the tables from left to right. Small tables should be read first and if possible cached into the memory.
|Question Number||Answer Key|