Skip to main content

Posts

Showing posts from 2018
Lab – More Hive Queries and Hive Built-In functions Objectives This lab builds on the last lab. We will analyse the data uploaded to Hive using some HQL queries Deliverable Screenshot of each query results. One for each query. Each query should be fully displayed. No need to show the entire query result. Partial display of the result is sufficient. Open the Hive query editor in Cloudera Select all column from the salesdata table Select orderdate, salesamount and rowid from salesdata table and show 100 records. Modify the above step to show orderdate column heading as OrderDate, salesamount as Sales, and rowed as RowNum Create a new hive query to find OrderMonth, the total number of orders, total sales, average sales, minimum sales and maximum sales for each month. Sort so that newer sales statistics are at the top.   Modify the query you created for question 5 to show breakdown for each category Use GROUPING SETS to modify the above query to show the stat
Lab - Working with Hive Tables Deliverable: 6 Screenshot in one word document. I have mentioned where these screenshot are to be taken. In the cloudera Quickstart vm. Download the SalesData.csv from Blackboard. Open the Hue UI.   Click Hue menu and select Files → Go to /user/hive/warehouse/ Click Upload button and select Files. Select the SalesData.csv file that you downloaded from Downloads folder. Click Hue menu and select Tables to create a new table We will create a table from a file. Click on the + button on top right side of the screen. We’ll use a file to create our table. Ensure that File is selected as Type. Select the path by selecting the ellipse button. Click Upload a file, and select the /user/hive/warehouse/SalesData.csv Click Next. Review Field Names and Field Types listed and click submit. Hive will create table using the file you uploaded. Take a look at the newly created table in Hive. Take screenshot 1 here. When uploading CSV fi
Lab : Hive Queries Objectives: To understand and be able to write simple HQL queries. Due date: Tuesday, Sep 18 at 8:30 pm (in class exercise). Tools for the assignment For this assignment, you will use your Cloudera Live Hive query engine. What to turn in: You need to turn in a word document containing the Screenshot of HQL query and the query result for steps 4 – 11 below. Lab Description In this lab you are asked to write some HQL queries. The data in this database is already in your Cloudera QuickStart VM that we installed last week.  The database consists of six tables as shown in the db schema – namely categories, customers, departments, order_items, orders and products. Launch Cloudera QuickStart VM. Open firefox browser and Launch Hue UI. Click on button on Hue → select Files → go to /user/hive/warehouse → you should see folders for each of the tables mentioned above. Click on button on Hue → select tables → select categories → Explore me