SlideShare a Scribd company logo
1 of 13
http://www.orienit.com/
Database Vs Data Warehouse
Historical Data is the back bone of any business for
mission critical business decisions. Data is stored in some
form of tables in the database.So why the Business
Intelligence systems are using Data Warehouse rather than
Database to pull historical data?
What is the difference between Database and DataWarehouse while
both of them have some tables with Data, Index and key etc.?
Here are Differences….
http://www.orienit.com/
 DATA BASE
• Used for Online Transactional Processing (OLTP). This
records the data from the user for history.
• The tables and joins are complex since they are
normalized. This is done to reduce redundant data and
to save storage space.
• Entity – Relational modeling techniques are used for
database design.
• Optimized for write operation.
• Performance is low for analysis queries.
http://www.orienit.com/
DATA WAREHOUSE
• Used for Online Analytical Processing (OLAP). This reads
the historical data for the Users for business decisions.
• The Tables and joins are simple since they are de-
normalized. This is done to reduce the response time for
analytical queries.
• Data – Modeling techniques are used for the Data Warehouse
design.
• Optimized for read operations.
• High performance for analytical queries.
http://www.orienit.com/
General Data Flow :
(Ex: Online Insurance Registration)
• Customer enters the details in the Online Registration
form.
• The details are saved into the Database when the
customer presses the Submit button in the form.
• Business Intelligence Team of the Insurance
Company uses an ETL tool to pull the data from
the Database tables to the Data Warehouse tables.
• Business Management uses Business Reporting
Tools to pull Data from Data Warehouse tables for
generating business reports.
http://www.orienit.com/
STRING FUNCTIONS IN HIVE
The string functions in Hive are listed below:
1.ASCII( string str ):
• The ASCII function converts the first character of the string into its
numeric ascii value.
Example1: ASCII('hadoop') returns 104
Example2: ASCII('A') returns 65
2.CONCAT( string str1, string str2... )
• The CONCAT function concatenates all the stings.
Example: CONCAT('hadoop','-','hive') returns 'hadoop-hive'
http://www.orienit.com/
3. CONCAT_WS( string delimiter, string str1, string str2... )
• The CONCAT_WS function is similar to the CONCAT function.
Here you can also provide the delimiter, which can be used in between
the strings to concat.
Example: CONCAT_WS('-','hadoop','hive') returns 'hadoop-hive'
4. FIND_IN_SET( string search string, string source_string_list )
• The FIND_IN_SET function searches for the search string in the
source_string_list and returns the position of the first occurrence in the
source string list. Here the source string list should be comma delimited
one. It returns 0 if the first argument contains comma.
Example: FIND_IN_SET('ha','hao,mn,hc,ha,hef') returns 4
http://www.orienit.com/
5. LENGTH( string str ) :
• The LENGTH function returns the number of characters in a
string.
Example: LENGTH('hive') returns 4
6. LOWER( string str ), LCASE( string str )
• The LOWER or LCASE function converts the string into lower case letters
Example: LOWER('HiVe') returns 'hive'
7. LPAD( string str, int len, string pad )
• The LPAD function returns the string with a length of len characters
left-padded with pad.
Example: LPAD('hive',6,'v') returns 'vvhive'
http://www.orienit.com/
8. LTRIM( string str ) :
• The LTRIM function removes all the trailing spaces from the string.
9. REPEAT( string str, int n ) :
10.RPAD( string str, int len, string pad ) :
• The RPAD function returns the string with a length of len characters right-
padded with pad.
• The REPEAT function repeats the specified string n times.
http://www.orienit.com/
Example: LTRIM(' hive') returns 'hive'
Example: REPEAT('hive',2) returns 'hivehive'
Example: RPAD('hive',6,'v') returns 'hivevv'
11. REVERSE( string str ) :
• The REVERSE function gives the reversed string.
12. RTRIM( string str ) :
• The RTRIM function removes all the leading spaces from the string.
13. SPACE( int number_of_spaces ) :
• The SPACE function returns the specified number of spaces.
14. SPLIT( string str, string pat ) :
• The SPLIT function splits the string around the pattern pat and returns an
array of strings. You can specify regular expressions as patterns.
http://www.orienit.com/
Example: REVERSE('hive') returns 'evih'
Example: LTRIM('hive ') returns 'hive'
Example: SPACE(4) returns ' '
Example: SPLIT('hive:hadoop',':') returns
["hive","hadoop"]
15. SUBSTR( string source_str, int start_position [,int
length] ), SUBSTRING( string source_str, int start_position
[,int length] ) :
• The SUBSTR or SUBSTRING function returns a part of the source string from
the start position with the specified length of characters. If the length is not given,
then it returns from the start position to the end of the string.
16.TRIM( string str ) :
• The TRIM function removes both the trailing and leading spaces from
the string.
Example: LTRIM(' hive ') returns 'hive'
http://www.orienit.com/
Example1: SUBSTR('hadoop',4) returns 'oop'
Example2: SUBSTR('hadoop',4,2) returns 'oo'
17.UPPER( string str ), UCASE( string str ) :
• The UPPER or LCASE function converts the string into upper case
letters.
For More Information :
http://www.kalyanhadooptraining.com/
http://www.orienit.com/
Example: UPPER('HiVe') returns 'HIVE'
http://www.orienit.com/
Address:
Flat no : 204, 2nd floor, Annapurna Block,
Aditya Enclave, Ameerpet, Hyderabad-16.
Contact us:
040 6514 2345, +91 970 320 2345
Email ID: info@OrienIT.com

More Related Content

What's hot

Import and Export Excel files using XLConnect in R Studio
Import and Export Excel files using XLConnect in R StudioImport and Export Excel files using XLConnect in R Studio
Import and Export Excel files using XLConnect in R StudioRupak Roy
 
Array in Java
Array in JavaArray in Java
Array in JavaAli shah
 
Advance xpath
Advance xpathAdvance xpath
Advance xpathSuresh G
 
Import and Export Excel Data using openxlsx in R Studio
Import and Export Excel Data using openxlsx in R StudioImport and Export Excel Data using openxlsx in R Studio
Import and Export Excel Data using openxlsx in R StudioRupak Roy
 
computer notes - Data Structures - 35
computer notes - Data Structures - 35computer notes - Data Structures - 35
computer notes - Data Structures - 35ecomputernotes
 
Computer Architecture
Computer ArchitectureComputer Architecture
Computer ArchitectureMohamed Essam
 
Useful JMeter functions for scripting
Useful JMeter functions for scriptingUseful JMeter functions for scripting
Useful JMeter functions for scriptingTharinda Liyanage
 

What's hot (12)

Array Of Pointers
Array Of PointersArray Of Pointers
Array Of Pointers
 
Python - Lecture 11
Python - Lecture 11Python - Lecture 11
Python - Lecture 11
 
Import and Export Excel files using XLConnect in R Studio
Import and Export Excel files using XLConnect in R StudioImport and Export Excel files using XLConnect in R Studio
Import and Export Excel files using XLConnect in R Studio
 
Array in Java
Array in JavaArray in Java
Array in Java
 
Advance xpath
Advance xpathAdvance xpath
Advance xpath
 
Arrays
ArraysArrays
Arrays
 
Stack and Queue
Stack and Queue Stack and Queue
Stack and Queue
 
Import and Export Excel Data using openxlsx in R Studio
Import and Export Excel Data using openxlsx in R StudioImport and Export Excel Data using openxlsx in R Studio
Import and Export Excel Data using openxlsx in R Studio
 
Pandas csv
Pandas csvPandas csv
Pandas csv
 
computer notes - Data Structures - 35
computer notes - Data Structures - 35computer notes - Data Structures - 35
computer notes - Data Structures - 35
 
Computer Architecture
Computer ArchitectureComputer Architecture
Computer Architecture
 
Useful JMeter functions for scripting
Useful JMeter functions for scriptingUseful JMeter functions for scripting
Useful JMeter functions for scripting
 

Similar to Hive - ORIEN IT

NOSQL and Cassandra
NOSQL and CassandraNOSQL and Cassandra
NOSQL and Cassandrarantav
 
Database Performance Tuning
Database Performance Tuning Database Performance Tuning
Database Performance Tuning Arno Huetter
 
CBStreams - Java Streams for ColdFusion (CFML)
CBStreams - Java Streams for ColdFusion (CFML)CBStreams - Java Streams for ColdFusion (CFML)
CBStreams - Java Streams for ColdFusion (CFML)Ortus Solutions, Corp
 
ITB2019 CBStreams : Accelerate your Functional Programming with the power of ...
ITB2019 CBStreams : Accelerate your Functional Programming with the power of ...ITB2019 CBStreams : Accelerate your Functional Programming with the power of ...
ITB2019 CBStreams : Accelerate your Functional Programming with the power of ...Ortus Solutions, Corp
 
Algorithms devised for a google interview
Algorithms devised for a google interviewAlgorithms devised for a google interview
Algorithms devised for a google interviewRussell Childs
 
C aptitude questions
C aptitude questionsC aptitude questions
C aptitude questionsSrikanth
 
C - aptitude3
C - aptitude3C - aptitude3
C - aptitude3Srikanth
 
Console I/o & basics of array and strings.pptx
Console I/o & basics of array and strings.pptxConsole I/o & basics of array and strings.pptx
Console I/o & basics of array and strings.pptxPRASENJITMORE2
 
Perly Parallel Processing of Fixed Width Data Records
Perly Parallel Processing of Fixed Width Data RecordsPerly Parallel Processing of Fixed Width Data Records
Perly Parallel Processing of Fixed Width Data RecordsWorkhorse Computing
 
introduction to server-side scripting
introduction to server-side scriptingintroduction to server-side scripting
introduction to server-side scriptingAmirul Shafeeq
 

Similar to Hive - ORIEN IT (20)

NOSQL and Cassandra
NOSQL and CassandraNOSQL and Cassandra
NOSQL and Cassandra
 
C
CC
C
 
04 pig data operations
04 pig data operations04 pig data operations
04 pig data operations
 
Modern C++
Modern C++Modern C++
Modern C++
 
Database Performance Tuning
Database Performance Tuning Database Performance Tuning
Database Performance Tuning
 
CBStreams - Java Streams for ColdFusion (CFML)
CBStreams - Java Streams for ColdFusion (CFML)CBStreams - Java Streams for ColdFusion (CFML)
CBStreams - Java Streams for ColdFusion (CFML)
 
ITB2019 CBStreams : Accelerate your Functional Programming with the power of ...
ITB2019 CBStreams : Accelerate your Functional Programming with the power of ...ITB2019 CBStreams : Accelerate your Functional Programming with the power of ...
ITB2019 CBStreams : Accelerate your Functional Programming with the power of ...
 
Algorithms devised for a google interview
Algorithms devised for a google interviewAlgorithms devised for a google interview
Algorithms devised for a google interview
 
Sql functions
Sql functionsSql functions
Sql functions
 
C aptitude questions
C aptitude questionsC aptitude questions
C aptitude questions
 
C - aptitude3
C - aptitude3C - aptitude3
C - aptitude3
 
Aggregate.pptx
Aggregate.pptxAggregate.pptx
Aggregate.pptx
 
Console I/o & basics of array and strings.pptx
Console I/o & basics of array and strings.pptxConsole I/o & basics of array and strings.pptx
Console I/o & basics of array and strings.pptx
 
Aspdot
AspdotAspdot
Aspdot
 
Should i Go there
Should i Go thereShould i Go there
Should i Go there
 
Perly Parallel Processing of Fixed Width Data Records
Perly Parallel Processing of Fixed Width Data RecordsPerly Parallel Processing of Fixed Width Data Records
Perly Parallel Processing of Fixed Width Data Records
 
Hive(ppt)
Hive(ppt)Hive(ppt)
Hive(ppt)
 
Hive(ppt)
Hive(ppt)Hive(ppt)
Hive(ppt)
 
introduction to server-side scripting
introduction to server-side scriptingintroduction to server-side scripting
introduction to server-side scripting
 
Python basics
Python basicsPython basics
Python basics
 

Recently uploaded

The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 

Recently uploaded (20)

The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 

Hive - ORIEN IT

  • 2. Database Vs Data Warehouse Historical Data is the back bone of any business for mission critical business decisions. Data is stored in some form of tables in the database.So why the Business Intelligence systems are using Data Warehouse rather than Database to pull historical data? What is the difference between Database and DataWarehouse while both of them have some tables with Data, Index and key etc.? Here are Differences…. http://www.orienit.com/
  • 3.  DATA BASE • Used for Online Transactional Processing (OLTP). This records the data from the user for history. • The tables and joins are complex since they are normalized. This is done to reduce redundant data and to save storage space. • Entity – Relational modeling techniques are used for database design. • Optimized for write operation. • Performance is low for analysis queries. http://www.orienit.com/
  • 4. DATA WAREHOUSE • Used for Online Analytical Processing (OLAP). This reads the historical data for the Users for business decisions. • The Tables and joins are simple since they are de- normalized. This is done to reduce the response time for analytical queries. • Data – Modeling techniques are used for the Data Warehouse design. • Optimized for read operations. • High performance for analytical queries. http://www.orienit.com/
  • 5. General Data Flow : (Ex: Online Insurance Registration) • Customer enters the details in the Online Registration form. • The details are saved into the Database when the customer presses the Submit button in the form. • Business Intelligence Team of the Insurance Company uses an ETL tool to pull the data from the Database tables to the Data Warehouse tables. • Business Management uses Business Reporting Tools to pull Data from Data Warehouse tables for generating business reports. http://www.orienit.com/
  • 6. STRING FUNCTIONS IN HIVE The string functions in Hive are listed below: 1.ASCII( string str ): • The ASCII function converts the first character of the string into its numeric ascii value. Example1: ASCII('hadoop') returns 104 Example2: ASCII('A') returns 65 2.CONCAT( string str1, string str2... ) • The CONCAT function concatenates all the stings. Example: CONCAT('hadoop','-','hive') returns 'hadoop-hive' http://www.orienit.com/
  • 7. 3. CONCAT_WS( string delimiter, string str1, string str2... ) • The CONCAT_WS function is similar to the CONCAT function. Here you can also provide the delimiter, which can be used in between the strings to concat. Example: CONCAT_WS('-','hadoop','hive') returns 'hadoop-hive' 4. FIND_IN_SET( string search string, string source_string_list ) • The FIND_IN_SET function searches for the search string in the source_string_list and returns the position of the first occurrence in the source string list. Here the source string list should be comma delimited one. It returns 0 if the first argument contains comma. Example: FIND_IN_SET('ha','hao,mn,hc,ha,hef') returns 4 http://www.orienit.com/
  • 8. 5. LENGTH( string str ) : • The LENGTH function returns the number of characters in a string. Example: LENGTH('hive') returns 4 6. LOWER( string str ), LCASE( string str ) • The LOWER or LCASE function converts the string into lower case letters Example: LOWER('HiVe') returns 'hive' 7. LPAD( string str, int len, string pad ) • The LPAD function returns the string with a length of len characters left-padded with pad. Example: LPAD('hive',6,'v') returns 'vvhive' http://www.orienit.com/
  • 9. 8. LTRIM( string str ) : • The LTRIM function removes all the trailing spaces from the string. 9. REPEAT( string str, int n ) : 10.RPAD( string str, int len, string pad ) : • The RPAD function returns the string with a length of len characters right- padded with pad. • The REPEAT function repeats the specified string n times. http://www.orienit.com/ Example: LTRIM(' hive') returns 'hive' Example: REPEAT('hive',2) returns 'hivehive' Example: RPAD('hive',6,'v') returns 'hivevv'
  • 10. 11. REVERSE( string str ) : • The REVERSE function gives the reversed string. 12. RTRIM( string str ) : • The RTRIM function removes all the leading spaces from the string. 13. SPACE( int number_of_spaces ) : • The SPACE function returns the specified number of spaces. 14. SPLIT( string str, string pat ) : • The SPLIT function splits the string around the pattern pat and returns an array of strings. You can specify regular expressions as patterns. http://www.orienit.com/ Example: REVERSE('hive') returns 'evih' Example: LTRIM('hive ') returns 'hive' Example: SPACE(4) returns ' ' Example: SPLIT('hive:hadoop',':') returns ["hive","hadoop"]
  • 11. 15. SUBSTR( string source_str, int start_position [,int length] ), SUBSTRING( string source_str, int start_position [,int length] ) : • The SUBSTR or SUBSTRING function returns a part of the source string from the start position with the specified length of characters. If the length is not given, then it returns from the start position to the end of the string. 16.TRIM( string str ) : • The TRIM function removes both the trailing and leading spaces from the string. Example: LTRIM(' hive ') returns 'hive' http://www.orienit.com/ Example1: SUBSTR('hadoop',4) returns 'oop' Example2: SUBSTR('hadoop',4,2) returns 'oo'
  • 12. 17.UPPER( string str ), UCASE( string str ) : • The UPPER or LCASE function converts the string into upper case letters. For More Information : http://www.kalyanhadooptraining.com/ http://www.orienit.com/ Example: UPPER('HiVe') returns 'HIVE'
  • 13. http://www.orienit.com/ Address: Flat no : 204, 2nd floor, Annapurna Block, Aditya Enclave, Ameerpet, Hyderabad-16. Contact us: 040 6514 2345, +91 970 320 2345 Email ID: info@OrienIT.com