At the end of this video the student will know how to use math functions in Hive to manipulate data.
- [Instructor] Here we're going to take a look…at some basic calculations and math in Hive.…Hive has some built-in methods and operators…for working with numeric data.…We're going to do some basic stuff.…We'll start with our simple addition-subtraction operations…and then we'll actually use a couple math functions…to generate some new data in Hive.…Here in my Cloudera environment…I'm going to open up the script 7-3.sql…and I'm just going to copy this over to our Hive editor.…
And the first thing I want to do…is just show how to use some basic math here.…So the star or the asterisks is the multiplication symbol…and it works exactly how you would expect.…In this query here we're pulling back our sales data…from the 2009 partition…and we have just a couple basic operations…where we take the quanity times the rate…minus the discount percent.…Then we can round that using the Round function…so we don't get this 15 decimal answer.…We get a rounded answer that's…just much easier when we pop it into an analytics chart.…
This course shows how to use Hive to process data. Instructor Ben Sullins starts by showing you how to structure and optimize your data. Next, he explains how to get Hue, the Hadoop user interface, to leverage HiveQL when analyzing data. Using the newly configured option, he then demonstrates how to load data, create aggregate tables for fast query access, and run advanced analytics. He also takes you through managing tables and putting functions to use. This course is designed to help you find new ways to work with datasets so you can answer the tough data science questions that come your way.
- Defining data structures in Hive
- Selecting data
- Joining tables
- Manipulating data
- Filtering results
- Aggregating data
- Using built-in aggregate functions
- Mastering built-in table-generating functions
- Using CUBE and ROLLUP
- Using clauses: WHERE and HAVING
- Using LIKE, JOIN, and SEMI JOIN
- Using functions: String, math, date, and conditional