Hive Aggregate Functions (UDAF) with Examples

Hive Aggregate Functions are the most used built-in functions that take a set of values and return a single value, when used with a group, it aggregates all values in each group and returns one value for each group. Like in SQL, Aggregate Functions in Hive can be used with…

Continue Reading Hive Aggregate Functions (UDAF) with Examples

Hive Relational | Arithmetic | Logical Operators

Like any other Database Hive also supports Relation, Arithmetic and Logical operators. Keeps an eye on return values as they changes if one of the operand is NULL. Hive Relational OperatorsHive Logical OperatorsHive Arithmetic Operators Hive Relational Operators Below are Hive relational operators. Relational OperatorsDescriptionA = BReturns TRUE when A…

Continue Reading Hive Relational | Arithmetic | Logical Operators

Hive Data Types – Primitive | Complex

Hive supports several date types like Hive Numeric TypesHive Date & Time TypesHive String TypesHive Misc Types (Boolean & Binary)Hive Complex Types (Array, Map, Struct) Hive Numeric Types Below are Numeric Types Hive support and their sizes. Numeric TypesDescriptionTINYINT1-byte signed integer, from -128 to 127SMALLINT2-byte signed integer, from -32,768 to 32,767INT/INTEGER4-byte signed integer, from -2,147,483,648 to…

Continue Reading Hive Data Types – Primitive | Complex

Hive Collection Functions with Examples

Hive comes with a set of collection functions to work with Map and Array data types. These functions are used to find the size of the array, map types, get all map keys, values, sort array, and finding if an element exists in an array. Related: Hive Date & Timestamp…

Continue Reading Hive Collection Functions with Examples

How to replace NULL values with Default in Hive

Use nvl() function in Hive to replace all NULL values of a column with a default value, In this article, I will explain with an example. You can use this function to Replace all NULL values with -1 or 0 or any number for the integer column.Replace all NULL values…

Continue Reading How to replace NULL values with Default in Hive

Hive Conditional Functions with Examples

Hive conditional functions are used to apply a conditions on one or more columns and the conditions are executed for every row on a table. In this article you will learn Hive conditional functions with examples. Hive Conditional Functions List Select the link to know more about the function along…

Continue Reading Hive Conditional Functions with Examples

Hive Date and Timestamp Functions | Examples

Hive Date and Timestamp functions are used to manipulate Date and Time on HiveQL queries over Hive CLI, Beeline, Spark, Java, Python, and many more applications. The default date format of Hive is yyyy-MM-dd, and for Timestamp yyyy-MM-dd HH:mm:ss. When using Date and Timestamp in string formats, hive assumes these…

Continue Reading Hive Date and Timestamp Functions | Examples

Hive Built-in String Functions with Examples

Hive supports several built-in string functions similar to SQL functions to manipulate the strings. These Hive string functions come in handy when you are doing transformations without bringing data into Spark and using String functions or any equivalent frameworks. In this article let's learn the most used String Functions syntax,…

Continue Reading Hive Built-in String Functions with Examples

Hive Cast Function to Convert Data Type

Hive CAST(from_datatype as to_datatype) function is used to convert from one data type to another for example to cast String to Integer(int), String to Bigint, String to Decimal, Decimal to Int data types, and many more. This cast() function is referred to as the type conversion function which is used…

Continue Reading Hive Cast Function to Convert Data Type

Apache Hive Installation on Ubuntu

This section of the Apache Hive Tutorial explains step-by-step Apache Hive Installation and configuring on Ubuntu. Apache Hive needs Apache Hadoop Installation to be set up and running HDFS as Hive required HDFS to store the data files. Download and Install Apache Hive Download the Apache Hive from hive.apache.org, I…

Continue Reading Apache Hive Installation on Ubuntu