22. What is the need for custom Serde?
Depending on the nature of data the user has, the inbuilt SerDe may not satisfy the format of the data. So users need to write their own java code to satisfy their data format requirements. A SerDe allows Hive to read in data from a table, and write it back out to HDFS in any custom format
23. Why do we need Hive?
Hive is a tool in Hadoop ecosystem which provides an interface to organize and query data in a database like fashion and write SQL like queries. It is suitable for accessing and analyzing data in Hadoop using SQL syntax.
24. What is the default location where hive stores table data?
25. What are the three different modes in which hive can be run ?
26. Is there a date data type in Hive ?
Yes. The TIMESTAMP data types stores date in java.sql.timestamp format
Strings: JDBC compliant java.sql.Timestamp format “YYYY-MM-DD HH:MM:SS.fffffffff” (9 decimal place precision)
27. What are collection data types in Hive ?
There are three collection data types in Hive.
CREATE TABLE employees (
deductions MAP<STRING, FLOAT>,
address STRUCT<street:STRING, city:STRING, state:STRING, zip:INT>
ROW FORMAT DELIMITED
28. Can we run unix shell commands from hive ? Give example
Yes, using the ! mark just before the command.
For example !pwd at hive prompt will list the current directory.