Saturday, November 2, 2013

Hadoop Hands-On exercise with Hortonworks: HiveQL basics

This is second post in the Hadoop hands-on series. In last post we have,
  1. Hadoop instance running
  2. Data uploaded in HDFS and HCatalog
In this post we query the data using Hadoop. HiveQL is the query language similar to SQL. We will use it to query the data stored in Hadoop clusters.    

Go to Hue > Beeswax (User interface for HiveQL)



Now you should be able to see the query editor. You can enter one query at a time from list of queries below and get the results. Refer the following screenshots

As shown above, enter the query and click on "Execute".

Select all records
Query:  Select * from nyse_stocks

Save the results
You can see the option "Save" in screenshot above, which will save the results for corresponding query. We have two options, either we can save it as a new table or a file in HDFS directory as shown below.


Other than this we can get the file using "Download as" option, in comma separated (csv) or excel (xls) file.

Describe the database table
Query:  describe nyse_stocks


Get number of records
Query:  select count(*) from nyse_stocks


Display records with specific condition
Query:  select * from nyse_stocks where stock_symbol="IBM"

9 comments:

  1. There are lots of information about latest technology and how to get trained in them, like Hadoop Training Chennai have spread around the web, but this is a unique one according to me. The strategy you have updated here will make me to get trained in future technologies(Hadoop Training in Chennai). By the way you are running a great blog. Thanks for sharing this.

    Hadoop Training Chennai | Big Data Training Chennai

    ReplyDelete
    Replies
    1. Hibernate Online Training Hibernate Online Training Hibernate Training in Chennai Hibernate Training in Chennai Java Online Training Java Online Training

      Hibernate Training Institutes in ChennaiHibernate Training Institutes in Chennai Java Online Training Java Online Training Java Online Training Java Online Training

      Delete
  2. Cloud is one of the tremendous technology that any company in this world would rely on(Salesforce Training institutes in Chennai). Using this technology many tough tasks can be accomplished easily in no time. Your content are also explaining the same(Salesforce developer training in chennai). Thanks for sharing this in here. You are running a great blog, keep up this good work.

    ReplyDelete
  3. Welcome to Wiztech Automation - Embedded System Training in Chennai. We have knowledgeable Team for Embedded Courses handling and we also are after Job Placements offer provide once your Successful Completion of Course. We are Providing on Microcontrollers such as 8051, PIC, AVR, ARM7, ARM9, ARM11 and RTOS. Free Accommodation, Individual Focus, Best Lab facilities, 100% Practical Training and Job opportunities.

    Embedded System Training in chennai
    Embedded System Training Institute in chennai
    Embedded Training in chennai
    Embedded Course in chennai
    Best Embedded System Training in chennai
    Best Embedded System Training Institute in chennai
    Best Embedded System Training Institutes in chennai
    Embedded Training Institute in chennai
    Embedded System Course in chennai
    Best Embedded System Training in chennai

    ReplyDelete
  4. Wiztech Automation Solutions is the Best Training institute in Chennai,started in the year 2006 and it extended its circle through providing the best Education as per the Global Quality Standards. Hence our Training Center in Chennai was Recognized by IAO and ISO for its inspiring Education Quality Standards. Wiztech Automation Solution, the PLC SCADA Training Academy in Chennai offers both PLC, SCADA, DCS, VFD, Drives, Control Panels, HMI, Pneumatics, Embedded systems, VLSI, IT, Web Designing, AutoCad Training courses in chennai with latest various brands. Wiztech Automation Solutions offers Real Time Training Courses with 100% Placement support in chennai.

    PLC Training in chennai
    SCADA Training in chennai
    PLC Training Institute in chennai
    Embedded System Training in chennai
    VLSI Training in chennai
    Automation Training in chennai
    Industrial Automation Training in chennai
    Process Automation Training in chennai
    DCS Training in chennai
    Inplant Training in chennai
    Placement
    PLC Course in chennai
    Best PLC Training in chennai
    PLC Training in chennai
    Robotics Training in chennai
    Embedded Training in chennai
    IT Training in chennai
    Web designing Training in chennai
    AutoCad Training in chennai

    ReplyDelete