Enrollments Open for Advanced Certification Courses on Data Science, ML & AI by E&ICT Academy IIT RoorkeeApply Now
Many relational databases such as MySQL and PostgreSQL can be used for metastore in Hive. To accommodate different data types in relational databases, hive provides an extensive list of data types.
Let's go through data types in Hive.
Hive provides STRING, VARCHAR, and CHAR as string data types. Hive provides Boolean and Binary data types to store boolean values. Arrays support list of values. Arrays in Hive are similar to list in Java. Maps in Hive are similar to Java Maps. We can store key, value pairs in maps. structs in Hive are similar to structs in C. It is used to store complex data. A struct is basically a predefined key-value pair along with datatypes of the values. Union is a collection of heterogeneous data types. Union types can hold only one of their specified data types at any point of time for a record.
Let's understand how we will use various data types in the
The name can be of varchar, char, or string data type. Salary is a float. Subordinates is an array having the list of subordinate names or ids. Deductions is a map. The address is of struct data type. A user can signup using social providers such as Facebook and google or using email id. So auth column is of union datatype. Please note that auth column can have only one data type from Facebook id, google id, and email at any point in time because users can signup using either Facebook, Google, or email.
No hints are availble for this assesment
Answer is not availble for this assesment