Notice: Due to an ongoing migration of our storage and publishing system, material requested since last month will not be uploaded for the time being, and new requests are paused. All existing notes remain available.

Unit 4 MCQs Introduction to Apache Hive

INT312 — Big Data Fundamentals 60 questions. Pick an option to check it.

Read the notes Subjective questions

0 of 60 answered 0 right 0 wrong , 60 left

  1. Question 1 of 60 Hive installation Easy

    Which software framework is commonly required for installing and running Apache Hive?

  2. Question 2 of 60 Hive installation Easy

    Which environment variable usually points to the Apache Hive installation directory?

  3. Question 3 of 60 Hive installation Easy

    Which file is commonly used to configure Apache Hive settings?

  4. Question 4 of 60 Hive data types Easy

    Which Hive data type is used to store whole numbers?

  5. Question 5 of 60 Hive data types Easy

    Which Hive data type is used to store text?

  6. Question 6 of 60 Hive data types Easy

    Which of the following is a complex data type in Hive?

  7. Question 7 of 60 Hive bucketing Easy

    What does Hive bucketing primarily do?

  8. Question 8 of 60 Hive bucketing Easy

    Which clause is used to define bucket columns in a Hive table?

  9. Question 9 of 60 Hive bucketing Easy

    Which phrase specifies the number of buckets in a Hive table definition?

  10. Question 10 of 60 Hive partitioning Easy

    What is the main purpose of partitioning a Hive table?

  11. Question 11 of 60 Hive partitioning Easy

    Which clause is used to define partition columns in Hive?

  12. Question 12 of 60 Hive partitioning Easy

    What is partition pruning in Hive?

  13. Question 13 of 60 HiveQL operations Easy

    Which HiveQL statement creates a new table?

  14. Question 14 of 60 HiveQL operations Easy

    Which HiveQL statement retrieves data from a table?

  15. Question 15 of 60 HiveQL operations Easy

    Which HiveQL statement adds query results to an existing table?

  16. Question 16 of 60 HiveQL operations Easy

    Which HiveQL statement removes both a table definition and its managed data?

  17. Question 17 of 60 Hive operators Easy

    Which operator tests whether two values are equal in HiveQL?

  18. Question 18 of 60 Hive operators Easy

    Which logical operator requires both conditions to be true?

  19. Question 19 of 60 Hive operators Easy

    Which arithmetic operator is used for addition in HiveQL?

  20. Question 20 of 60 Hive operators Easy

    In a HiveQL LIKE pattern, which symbol represents any sequence of characters?

  21. Question 21 of 60 Hive installation Medium

    After installing Hive with an external MySQL metastore, Hive fails because the metastore tables do not exist. Which command should be run before starting Hive?

  22. Question 22 of 60 Hive installation Medium

    A team uses Hive's default embedded Derby metastore. Why might two developers be unable to run separate Hive sessions simultaneously from the same installation directory?

  23. Question 23 of 60 Hive installation Medium

    Hive is installed successfully, but creating a managed table fails because Hive cannot write to its warehouse directory in HDFS. Which action most directly addresses the problem?

  24. Question 24 of 60 Hive data types Medium

    A table stores a variable-length list of product identifiers for each order. Which Hive data type is most appropriate for the product_ids column?

  25. Question 25 of 60 Hive data types Medium

    A customer column must contain name, email, and age as named fields within a single value. Which declaration best represents this requirement?

  26. Question 26 of 60 Hive data types Medium

    A financial table must store monetary amounts with exactly two fractional digits and up to ten total digits. Which Hive type is the best choice?

  27. Question 27 of 60 Hive bucketing Medium

    A table is declared with CLUSTERED BY (customer_id) INTO 16 BUCKETS. How is a row normally assigned to a bucket?

  28. Question 28 of 60 Hive bucketing Medium

    Two large tables are bucketed on customer_id using compatible bucket counts and bucketing rules. Which workload is most likely to benefit?

  29. Question 29 of 60 Hive bucketing Medium

    A bucketed table contains 32 buckets. An analyst needs a repeatable sample based on the bucketing column. Which clause is designed for this purpose?

  30. Question 30 of 60 Hive bucketing Medium

    A table is declared as bucketed into eight buckets, but data files are copied directly into its directory without applying the bucketing logic. What is the main consequence?

  31. Question 31 of 60 Hive partitioning Medium

    A sales table is partitioned by sale_date. Which query is most likely to benefit from partition pruning?

  32. Question 32 of 60 Hive partitioning Medium

    Data for a new static partition must be loaded into a table partitioned by year and month. Which statement correctly targets March 2025?

  33. Question 33 of 60 Hive partitioning Medium

    A table is partitioned by the exact event_timestamp, producing thousands of tiny partitions each day. Which redesign is generally more practical?

  34. Question 34 of 60 Hive partitioning Medium

    Partition directories already exist in HDFS, but their metadata was not added to the Hive metastore. Which command can discover and register them?

  35. Question 35 of 60 HiveQL operations Medium

    A query must return each department and its average salary, but only for departments whose average exceeds 60000. Which clause should contain the aggregate condition?

  36. Question 36 of 60 HiveQL operations Medium

    A query needs a globally ordered result by total_sales across all output rows. Which HiveQL clause should be used?

  37. Question 37 of 60 HiveQL operations Medium

    A developer wants to replace the existing data in a target table with the result of a query. Which HiveQL form is appropriate?

  38. Question 38 of 60 Hive operators Medium

    Which condition selects employees whose salary is between 40000 and 60000, including both boundary values?

  39. Question 39 of 60 Hive operators Medium

    A query must find rows where middle_name has no value. Which predicate correctly handles Hive's null semantics?

  40. Question 40 of 60 Hive operators Medium

    A tags column has type ARRAY<STRING>. Which expression accesses the first tag in the array?

  41. Question 41 of 60 Hive installation Hard

    A development team starts HiveServer2 with the default embedded Derby metastore. The first session works, but a second concurrent Hive process fails to access metadata. What is the most appropriate production fix?

  42. Question 42 of 60 Hive installation Hard

    HiveServer2 must use a remote metastore available at thrift://meta1:9083. Which client-side setting establishes this connection?

  43. Question 43 of 60 Hive installation Hard

    After upgrading Hive binaries, startup reports that the PostgreSQL metastore schema version is older than the Hive software version. Assuming the database is backed up, which action directly addresses the mismatch?

  44. Question 44 of 60 Hive installation Hard

    HiveServer2 can connect to the metastore, but queries fail with permission errors while creating managed tables under /user/hive/warehouse. Which installation issue is most directly implicated?

  45. Question 45 of 60 Hive data types Hard

    A value stored as DECIMAL(5,2) is rounded from 999.995 to two fractional digits. What is the smallest decimal type that can represent the rounded result without overflow?

  46. Question 46 of 60 Hive data types Hard

    Two columns contain CHAR(5) value ab and VARCHAR(5) value ab , respectively. Which statement correctly describes Hive's trailing-space semantics?

  47. Question 47 of 60 Hive data types Hard

    Given a ARRAY<INT> and m MAP<STRING,INT>, what does Hive return for a[0] and m['missing'] when a = array(7,8) and the map has no missing key?

  48. Question 48 of 60 Hive data types Hard

    For a column declared UNIONTYPE<INT,STRING,DOUBLE>, which expression constructs the string alternative containing high?

  49. Question 49 of 60 Hive bucketing Hard

    A table is declared CLUSTERED BY (customer_id) INTO 32 BUCKETS, but existing files were copied into its directory without being written by a bucketing-aware Hive operation. Which conclusion is valid?

  50. Question 50 of 60 Hive bucketing Hard

    Table L has 8 buckets on id, and table R has 24 buckets on id. Ignoring other optimizer constraints, which property supports a bucket map join on L.id = R.id?

  51. Question 51 of 60 Hive bucketing Hard

    Assume an integer bucket key uses bucket number (hash(key) & 0x7fffffff) % 4, with hash(key) = key. Into which bucket is key -3 placed?

  52. Question 52 of 60 Hive partitioning Hard

    A table is partitioned by (dt STRING, region STRING). For INSERT ... PARTITION (dt, region) with both partitions dynamic, how must the source projection be arranged?

  53. Question 53 of 60 Hive partitioning Hard

    With hive.exec.dynamic.partition.mode=strict, which insertion into a table partitioned by (dt, country) is permitted?

  54. Question 54 of 60 Hive partitioning Hard

    A table is partitioned by string column dt in ISO format. A query filters with year(to_date(dt)) = 2025, but the optimizer cannot infer a direct partition constraint from that function. Which rewrite most directly enables partition pruning for 2025?

  55. Question 55 of 60 HiveQL operations Hard

    A source table feeds three aggregate tables with different filters. Which HiveQL structure is designed to express the work while sharing a single source scan?

  56. Question 56 of 60 HiveQL operations Hard

    A query must retain every row from customers, including customers with no qualifying order. Which placement of o.status = 'PAID' preserves that requirement?

  57. Question 57 of 60 HiveQL operations Hard

    A partitioned table contains data for many dates. What is the effect of INSERT OVERWRITE TABLE sales PARTITION (dt='2025-03-01') SELECT ...?

  58. Question 58 of 60 Hive operators Hard

    For nullable columns a and b, which predicate evaluates to TRUE when both values are NULL and to FALSE when exactly one is NULL?

  59. Question 59 of 60 Hive operators Hard

    For a non-null value x = 1, a subquery used by x NOT IN (...) returns the set {2, NULL}. Under SQL three-valued logic, what is the predicate's result?

  60. Question 60 of 60 Hive operators Hard

    Given Boolean values a = TRUE, b = FALSE, and c = FALSE, what is the result of a OR b AND c under Hive operator precedence?

That's unit 4

Answer a few questions and your score shows up here.