SlideShare a Scribd company logo
1 of 17
BIG DATA ANALYSIS
USING HADOOP
SEMINAR: HIVE QL
BY:
SHREYA JAISWAL [ENG20CA0042]
NANDINI GARG [ENG20CA0023]
2022-2023
Content Overview
› Introduction
› Difference between HIVE and RDBMS
› Hive QL
› Difference between SQL and HIVE QL
› HIVE QL built in operators
2
INTRODUCTION
HIVE:
Hive is a data warehouse software system that provides
data query and analysis. Hive gives an interface like SQL
to query data stored in various databases and file
systems that integrate with Hadoop. Hive helps with
querying and managing large datasets real fast. It is an
ETL tool for Hadoop ecosystem.
3
Difference
4
RDBMS HIVE
It is used to maintain database It is used to maintain data
warehouse.
It uses SQL( structured query
language.
It uses HQL( Hive query language
Schema is fixed in RDBMS. Schema varies in it.
Normalized data is stored. Normalized and de-normalized both
type of data is stored.
Tables in RDMS are sparse. Tables in Hive are dense.
5
HIVE QUERY LANGUAGE( HIVE QL):
(HiveQL) is a query language in Apache Hive for
processing and analyzing structured data. It is a mixture
of SQL-92, MySQL, and Oracle’s SQL. It is very much
similar to SQL and highly scalable. It reuses familiar
concepts from the relational database world, such as
tables, rows, columns and schema, to ease learning.
› Hive provides a CLI for Hive query writing using
Hive Query Language (HiveQL).
› Data Definition Language (DDL) is used for creating, altering
and dropping databases, tables, views, functions and
indexes.
› DDL and DML are the parts of HIVE QL.
› Most interactions tend to take place over a command line
interface (CLI). Generally, HiveQL syntax is similar to
the SQL syntax that most data analysts are familiar with.
6
7
QL
Difference
8
ON THE BASIS OF SQL Hive SQL
Update-commands in
table structure.
Update, delete, insert. Update, delete, insert.
Manages Relational data Data structures.
Transaction Supported Limited support supported.
Indexes Supported Supported
Data types It contain a total of five data types i.e.,
Integral, floating-point, fixed-point, text
and binary strings, temporal
It contains Boolean, integral, floating-
point, fixed-point, timestamp (nanosecond
precision) , Date, text and binary strings,
temporal, array, map, struct, Union
Functions Hundreds of built-in functions Hundreds of built-in functions
Map reduce Not supported Supported
HiveQL Built-in Operators
› Hive provides Built-in operators for Data operations to be
implemented on the tables present inside Hive warehouse.
› These operators are used for mathematical operations on
operands, and it will return specific value as per the logic
applied.
› Below are the main types of Built-in Operators in HiveQL:
• Relational Operators
• Arithmetic Operators
• Logical Operators
• Operators on Complex types
9
10
RELATIONAL OPERATORS IN HIVE SQL
We use Relational operators for relationship comparisons
between two operands.
 Operators such as equals, Not equals, less than, greater
than …etc.
 The operand types are all number types in these Operators.
11
Built-in
Operator
Description Operand
X = Y TRUE: if expression X is equivalent to expression Y
Otherwise FALSE.
It takes all primitive types
X != Y TRUE: If expression X is not equivalent to expression Y
Otherwise FALSE.
It takes all primitive types
X < Y TRUE: if expression X is less than expression Y
Otherwise FALSE.
It takes all primitive types
X <= Y TRUE: if expression X is less than or equal to expression Y
Otherwise FALSE.
It takes all primitive types
X>Y TRUE: if expression X is greater than expression Y
Otherwise FALSE.
It takes all primitive types
X>= Y TRUE: if expression X is greater than or equal to expression Y
Otherwise FALSE.
It takes all primitive types
X IS NULL TRUE: if expression X evaluates to NULL otherwise FALSE. It takes all types
X IS NOT NULL FALSE: If expression X evaluates to NULL otherwise TRUE. It takes all types
X REGEXP Y Same as RLIKE. Takes only Strings
The following Table will give us details about Relational operators and its usage in
HiveQL:
12
HiveQL Arithmetic Operators
We use Arithmetic operators for performing arithmetic operations
on operands.
 Arithmetic operations such as addition, subtraction,
multiplication and division between operands we use these
Operators.
 The operand types all are number types in these Operators.
Sample Example:
2 + 3 gives result 5.
In this example, ‘+’ is theoperator and 2 and 3 are operands. The
return value is 5
13
The following Table will give us details about Arithmetic operators in
Hive Query Language:
Built-in
Operator
Description Operand
X + Y It will return the output of adding X and Y value. It takes all number types
X – Y It will return the output of subtracting Y from X value. It takes all number types
X * Y It will return the output of multiplying X and Y values. It takes all number types
X / Y It will return the output of dividing Y from X. It takes all number types
X % Y It will return the remainder resulting from dividing X by Y. It takes all number types
X & Y It will return the output of bitwise AND of X and Y. It takes all number types
X | Y It will return the output of bitwise OR of X and Y. It takes all number types
X ^ Y It will return the output of bitwise XOR of X and Y. It takes all number types
~X It will return the output of bitwise NOT of X. It takes all number types
14
HiveQL Logical Operators
We use Logical operators for performing Logical
operations on operands.
 Logical operations such as AND, OR, NOT
between operands we use these Operators.
 The operand types all are BOOLEAN type in these
Operators.
15
The following Table will give us details about Logical
operators in HiveSQL:
Operator
s
Description Operands
X AND Y TRUE if both X and Y are TRUE, otherwise FALSE. Boolean types only
X && Y Same as X AND Y but here we using && symbol Boolean types only
X OR Y TRUE if either X or Y or both are TRUE, otherwise FALSE. Boolean types only
X || Y Same as X OR Y but here we using || symbol Boolean types only
NOT X TRUE if X is FALSE, otherwise FALSE. Boolean types only
!X Same as NOT X but here we using! symbol Boolean types only
16
OPERATORS ON COMPLEX TYPES
The following Table will give us details about Complex Type
Operators.
These are operators which will provide a different mechanism to
access elements in complex types.
Operators Operands Description
A[n] A is an Array and n is an
integer type.
It will return nth element in
the array A. The first element
has index of 0.
M[key] M is a Map<K, V> and
key has type K.
It will return the values
belongs to the key in the
map.
THANK YOU.

More Related Content

Similar to HiveQL.pptx

data type.pptxddddswwyertr hai na ki extend kr de la
data type.pptxddddswwyertr hai na ki extend kr de ladata type.pptxddddswwyertr hai na ki extend kr de la
data type.pptxddddswwyertr hai na ki extend kr de laLEOFAKE
 
Shapeless- Generic programming for Scala
Shapeless- Generic programming for ScalaShapeless- Generic programming for Scala
Shapeless- Generic programming for ScalaKnoldus Inc.
 
chapter Two Server-side Script lang.pptx
chapter  Two Server-side Script lang.pptxchapter  Two Server-side Script lang.pptx
chapter Two Server-side Script lang.pptxalehegn9
 
Python For Data Science.pptx
Python For Data Science.pptxPython For Data Science.pptx
Python For Data Science.pptxrohithprabhas1
 
Lecture3 php by okello erick
Lecture3 php by okello erickLecture3 php by okello erick
Lecture3 php by okello erickokelloerick
 
1_Introduction.pptx
1_Introduction.pptx1_Introduction.pptx
1_Introduction.pptxranapoonam1
 
R basics for MBA Students[1].pptx
R basics for MBA Students[1].pptxR basics for MBA Students[1].pptx
R basics for MBA Students[1].pptxrajalakshmi5921
 
R Programming: Introduction to Vectors
R Programming: Introduction to VectorsR Programming: Introduction to Vectors
R Programming: Introduction to VectorsRsquared Academy
 
R hive tutorial - udf, udaf, udtf functions
R hive tutorial - udf, udaf, udtf functionsR hive tutorial - udf, udaf, udtf functions
R hive tutorial - udf, udaf, udtf functionsAiden Seonghak Hong
 
R Programming Language
R Programming LanguageR Programming Language
R Programming LanguageNareshKarela1
 
Mule soft meetup_charlotte_4__draft_v2.0
Mule soft meetup_charlotte_4__draft_v2.0Mule soft meetup_charlotte_4__draft_v2.0
Mule soft meetup_charlotte_4__draft_v2.0Subhash Patel
 
Sv data types and sv interface usage in uvm
Sv data types and sv interface usage in uvmSv data types and sv interface usage in uvm
Sv data types and sv interface usage in uvmHARINATH REDDY
 
Introduction of PHP.pdf
Introduction of PHP.pdfIntroduction of PHP.pdf
Introduction of PHP.pdfkarinaabyys
 

Similar to HiveQL.pptx (20)

Lisp
LispLisp
Lisp
 
Mbd dd
Mbd ddMbd dd
Mbd dd
 
Linq
LinqLinq
Linq
 
data type.pptxddddswwyertr hai na ki extend kr de la
data type.pptxddddswwyertr hai na ki extend kr de ladata type.pptxddddswwyertr hai na ki extend kr de la
data type.pptxddddswwyertr hai na ki extend kr de la
 
Shapeless- Generic programming for Scala
Shapeless- Generic programming for ScalaShapeless- Generic programming for Scala
Shapeless- Generic programming for Scala
 
chapter Two Server-side Script lang.pptx
chapter  Two Server-side Script lang.pptxchapter  Two Server-side Script lang.pptx
chapter Two Server-side Script lang.pptx
 
Hd4
Hd4Hd4
Hd4
 
Python For Data Science.pptx
Python For Data Science.pptxPython For Data Science.pptx
Python For Data Science.pptx
 
Lecture3 php by okello erick
Lecture3 php by okello erickLecture3 php by okello erick
Lecture3 php by okello erick
 
1_Introduction.pptx
1_Introduction.pptx1_Introduction.pptx
1_Introduction.pptx
 
R basics for MBA Students[1].pptx
R basics for MBA Students[1].pptxR basics for MBA Students[1].pptx
R basics for MBA Students[1].pptx
 
Types of Operators in C
Types of Operators in CTypes of Operators in C
Types of Operators in C
 
R Programming: Introduction to Vectors
R Programming: Introduction to VectorsR Programming: Introduction to Vectors
R Programming: Introduction to Vectors
 
R hive tutorial - udf, udaf, udtf functions
R hive tutorial - udf, udaf, udtf functionsR hive tutorial - udf, udaf, udtf functions
R hive tutorial - udf, udaf, udtf functions
 
R Programming Language
R Programming LanguageR Programming Language
R Programming Language
 
Operators and it's type
Operators and it's type Operators and it's type
Operators and it's type
 
Mule soft meetup_charlotte_4__draft_v2.0
Mule soft meetup_charlotte_4__draft_v2.0Mule soft meetup_charlotte_4__draft_v2.0
Mule soft meetup_charlotte_4__draft_v2.0
 
Sv data types and sv interface usage in uvm
Sv data types and sv interface usage in uvmSv data types and sv interface usage in uvm
Sv data types and sv interface usage in uvm
 
DBMS UNIT 3
DBMS UNIT 3DBMS UNIT 3
DBMS UNIT 3
 
Introduction of PHP.pdf
Introduction of PHP.pdfIntroduction of PHP.pdf
Introduction of PHP.pdf
 

Recently uploaded

专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改yuu sss
 
Predictive Analysis for Loan Default Presentation : Data Analysis Project PPT
Predictive Analysis for Loan Default  Presentation : Data Analysis Project PPTPredictive Analysis for Loan Default  Presentation : Data Analysis Project PPT
Predictive Analysis for Loan Default Presentation : Data Analysis Project PPTBoston Institute of Analytics
 
Identifying Appropriate Test Statistics Involving Population Mean
Identifying Appropriate Test Statistics Involving Population MeanIdentifying Appropriate Test Statistics Involving Population Mean
Identifying Appropriate Test Statistics Involving Population MeanMYRABACSAFRA2
 
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...Florian Roscheck
 
Customer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxCustomer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxEmmanuel Dauda
 
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfKantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfSocial Samosa
 
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样vhwb25kk
 
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)jennyeacort
 
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degreeyuu sss
 
Easter Eggs From Star Wars and in cars 1 and 2
Easter Eggs From Star Wars and in cars 1 and 2Easter Eggs From Star Wars and in cars 1 and 2
Easter Eggs From Star Wars and in cars 1 and 217djon017
 
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptxEMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptxthyngster
 
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Jack DiGiovanna
 
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...soniya singh
 
Predicting Salary Using Data Science: A Comprehensive Analysis.pdf
Predicting Salary Using Data Science: A Comprehensive Analysis.pdfPredicting Salary Using Data Science: A Comprehensive Analysis.pdf
Predicting Salary Using Data Science: A Comprehensive Analysis.pdfBoston Institute of Analytics
 
IMA MSN - Medical Students Network (2).pptx
IMA MSN - Medical Students Network (2).pptxIMA MSN - Medical Students Network (2).pptx
IMA MSN - Medical Students Network (2).pptxdolaknnilon
 
9654467111 Call Girls In Munirka Hotel And Home Service
9654467111 Call Girls In Munirka Hotel And Home Service9654467111 Call Girls In Munirka Hotel And Home Service
9654467111 Call Girls In Munirka Hotel And Home ServiceSapana Sha
 
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort servicejennyeacort
 
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝DelhiRS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhijennyeacort
 
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptdokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptSonatrach
 

Recently uploaded (20)

专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
 
Predictive Analysis for Loan Default Presentation : Data Analysis Project PPT
Predictive Analysis for Loan Default  Presentation : Data Analysis Project PPTPredictive Analysis for Loan Default  Presentation : Data Analysis Project PPT
Predictive Analysis for Loan Default Presentation : Data Analysis Project PPT
 
Identifying Appropriate Test Statistics Involving Population Mean
Identifying Appropriate Test Statistics Involving Population MeanIdentifying Appropriate Test Statistics Involving Population Mean
Identifying Appropriate Test Statistics Involving Population Mean
 
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
 
Customer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxCustomer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptx
 
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfKantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
 
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
 
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
 
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
 
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
 
Easter Eggs From Star Wars and in cars 1 and 2
Easter Eggs From Star Wars and in cars 1 and 2Easter Eggs From Star Wars and in cars 1 and 2
Easter Eggs From Star Wars and in cars 1 and 2
 
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptxEMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
 
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
 
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
 
Predicting Salary Using Data Science: A Comprehensive Analysis.pdf
Predicting Salary Using Data Science: A Comprehensive Analysis.pdfPredicting Salary Using Data Science: A Comprehensive Analysis.pdf
Predicting Salary Using Data Science: A Comprehensive Analysis.pdf
 
IMA MSN - Medical Students Network (2).pptx
IMA MSN - Medical Students Network (2).pptxIMA MSN - Medical Students Network (2).pptx
IMA MSN - Medical Students Network (2).pptx
 
9654467111 Call Girls In Munirka Hotel And Home Service
9654467111 Call Girls In Munirka Hotel And Home Service9654467111 Call Girls In Munirka Hotel And Home Service
9654467111 Call Girls In Munirka Hotel And Home Service
 
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
 
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝DelhiRS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
 
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptdokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
 

HiveQL.pptx

  • 1. BIG DATA ANALYSIS USING HADOOP SEMINAR: HIVE QL BY: SHREYA JAISWAL [ENG20CA0042] NANDINI GARG [ENG20CA0023] 2022-2023
  • 2. Content Overview › Introduction › Difference between HIVE and RDBMS › Hive QL › Difference between SQL and HIVE QL › HIVE QL built in operators 2
  • 3. INTRODUCTION HIVE: Hive is a data warehouse software system that provides data query and analysis. Hive gives an interface like SQL to query data stored in various databases and file systems that integrate with Hadoop. Hive helps with querying and managing large datasets real fast. It is an ETL tool for Hadoop ecosystem. 3
  • 4. Difference 4 RDBMS HIVE It is used to maintain database It is used to maintain data warehouse. It uses SQL( structured query language. It uses HQL( Hive query language Schema is fixed in RDBMS. Schema varies in it. Normalized data is stored. Normalized and de-normalized both type of data is stored. Tables in RDMS are sparse. Tables in Hive are dense.
  • 5. 5 HIVE QUERY LANGUAGE( HIVE QL): (HiveQL) is a query language in Apache Hive for processing and analyzing structured data. It is a mixture of SQL-92, MySQL, and Oracle’s SQL. It is very much similar to SQL and highly scalable. It reuses familiar concepts from the relational database world, such as tables, rows, columns and schema, to ease learning.
  • 6. › Hive provides a CLI for Hive query writing using Hive Query Language (HiveQL). › Data Definition Language (DDL) is used for creating, altering and dropping databases, tables, views, functions and indexes. › DDL and DML are the parts of HIVE QL. › Most interactions tend to take place over a command line interface (CLI). Generally, HiveQL syntax is similar to the SQL syntax that most data analysts are familiar with. 6
  • 8. Difference 8 ON THE BASIS OF SQL Hive SQL Update-commands in table structure. Update, delete, insert. Update, delete, insert. Manages Relational data Data structures. Transaction Supported Limited support supported. Indexes Supported Supported Data types It contain a total of five data types i.e., Integral, floating-point, fixed-point, text and binary strings, temporal It contains Boolean, integral, floating- point, fixed-point, timestamp (nanosecond precision) , Date, text and binary strings, temporal, array, map, struct, Union Functions Hundreds of built-in functions Hundreds of built-in functions Map reduce Not supported Supported
  • 9. HiveQL Built-in Operators › Hive provides Built-in operators for Data operations to be implemented on the tables present inside Hive warehouse. › These operators are used for mathematical operations on operands, and it will return specific value as per the logic applied. › Below are the main types of Built-in Operators in HiveQL: • Relational Operators • Arithmetic Operators • Logical Operators • Operators on Complex types 9
  • 10. 10 RELATIONAL OPERATORS IN HIVE SQL We use Relational operators for relationship comparisons between two operands.  Operators such as equals, Not equals, less than, greater than …etc.  The operand types are all number types in these Operators.
  • 11. 11 Built-in Operator Description Operand X = Y TRUE: if expression X is equivalent to expression Y Otherwise FALSE. It takes all primitive types X != Y TRUE: If expression X is not equivalent to expression Y Otherwise FALSE. It takes all primitive types X < Y TRUE: if expression X is less than expression Y Otherwise FALSE. It takes all primitive types X <= Y TRUE: if expression X is less than or equal to expression Y Otherwise FALSE. It takes all primitive types X>Y TRUE: if expression X is greater than expression Y Otherwise FALSE. It takes all primitive types X>= Y TRUE: if expression X is greater than or equal to expression Y Otherwise FALSE. It takes all primitive types X IS NULL TRUE: if expression X evaluates to NULL otherwise FALSE. It takes all types X IS NOT NULL FALSE: If expression X evaluates to NULL otherwise TRUE. It takes all types X REGEXP Y Same as RLIKE. Takes only Strings The following Table will give us details about Relational operators and its usage in HiveQL:
  • 12. 12 HiveQL Arithmetic Operators We use Arithmetic operators for performing arithmetic operations on operands.  Arithmetic operations such as addition, subtraction, multiplication and division between operands we use these Operators.  The operand types all are number types in these Operators. Sample Example: 2 + 3 gives result 5. In this example, ‘+’ is theoperator and 2 and 3 are operands. The return value is 5
  • 13. 13 The following Table will give us details about Arithmetic operators in Hive Query Language: Built-in Operator Description Operand X + Y It will return the output of adding X and Y value. It takes all number types X – Y It will return the output of subtracting Y from X value. It takes all number types X * Y It will return the output of multiplying X and Y values. It takes all number types X / Y It will return the output of dividing Y from X. It takes all number types X % Y It will return the remainder resulting from dividing X by Y. It takes all number types X & Y It will return the output of bitwise AND of X and Y. It takes all number types X | Y It will return the output of bitwise OR of X and Y. It takes all number types X ^ Y It will return the output of bitwise XOR of X and Y. It takes all number types ~X It will return the output of bitwise NOT of X. It takes all number types
  • 14. 14 HiveQL Logical Operators We use Logical operators for performing Logical operations on operands.  Logical operations such as AND, OR, NOT between operands we use these Operators.  The operand types all are BOOLEAN type in these Operators.
  • 15. 15 The following Table will give us details about Logical operators in HiveSQL: Operator s Description Operands X AND Y TRUE if both X and Y are TRUE, otherwise FALSE. Boolean types only X && Y Same as X AND Y but here we using && symbol Boolean types only X OR Y TRUE if either X or Y or both are TRUE, otherwise FALSE. Boolean types only X || Y Same as X OR Y but here we using || symbol Boolean types only NOT X TRUE if X is FALSE, otherwise FALSE. Boolean types only !X Same as NOT X but here we using! symbol Boolean types only
  • 16. 16 OPERATORS ON COMPLEX TYPES The following Table will give us details about Complex Type Operators. These are operators which will provide a different mechanism to access elements in complex types. Operators Operands Description A[n] A is an Array and n is an integer type. It will return nth element in the array A. The first element has index of 0. M[key] M is a Map<K, V> and key has type K. It will return the values belongs to the key in the map.

Editor's Notes

  1. nanu
  2. nanu
  3. Nanu RDBMS stands for Relational Database Management System. RDBMS is a such type of database management system which is specifically designed for relational databases. RDBMS is a subset of DBMS. A relational database refers to a database that stores data in a structured format using rows and columns and that structured form is known as table.
  4. Shreya SQL-92 was the third revision of the SQL database query language. MySQL is an open-source relational database management system. It is procedural language extension to SQL often called as PL/SQL.
  5. Shreya HIVEQL ia an query language for hive to process and analyze structured data in metastore. SQL is a domain-specific language used in programming and designed for managing data held in a relational database management system also known as RDBMS. It is also useful in handling structured data, i.e., data incorporating relations among entities and variables. SQL is a standard language for storing, manipulating, and retrieving data in databases. MapReduce is a programming paradigm that enables massive scalability across hundreds or thousands of servers in a Hadoop cluster.
  6. nanu
  7. nandini
  8. shreya