5.4.1 Steps to Analyze Energy Data
Following are the key steps to analyze the given energy data:
Step 1
Save the excel worksheet with .csv extension which stands for Comma Separated Values. The reason to save the excel file as .csv is, it’s a plain text format which uses commas to separate each entry in a row and the newline symbol to go to the next row. The given data file is named as Project.csv.
Step 2
Copy and paste this Project.csv file to Cloudera VMware Workstation training’s Home folder. The highlighted part among …show more content…
Firstly, go to the Hive by writing it in the command prompt and press enter as shown in figure 33. And create the table in it with following command: hive> create table Power (Category string, Element string, consumption string, year int, energytype string, Jan int, Feb int, Mar int, Apr int, May int, Jun int, Jul int, Aug int, Sep int, Oct int, Nov int, Dec int) row format delimited fields terminated by ','; Figure 33 - Entering HIVE
Step 7
To see the content of the file, exit from Hive prompt by writing exit; and press enter. The following command will show the complete file contents: hadoop fs –cat directoryname/filename.csv
In given scenario, the commands is given and execution is shown in figure 34. hadoop fs –cat Qut/Project.csv Figure 34 - File Contents
Step