SQuirreL

Introduction

SQuirreL SQL is a multi platform Universal SQL Client (GNU License). You can use it to access HBase + Phoenix and Hive. This document introduces how to connect to Kylin from SQuirreL.

Used Software

Pre-requisites

  • Find the Kylin JDBC driver jar
    From Kylin Download, Choose Binary and the correct version of Kylin and HBase
    Download & Unpack: in ./lib:
    SQuirreL - 图1

  • Need an instance of Kylin, with a Cube; the Sample Cube is enough.

    SQuirreL - 图2

  • Dowload and install SquirreL

Add Kylin JDBC Driver

On left menu: alt text >alt text > alt text > alt text

And locate the JAR: alt text

Configure this parameters:

  • Put a name: alt text
  • Example URL alt text

    jdbc:kylin://172.17.0.2:7070/learn_kylin

  • Put Class Name: alt text
    Tip: If auto complete not work, type: org.apache.kylin.jdbc.Driver

Check the Driver List: alt text

Add Aliases

On left menu: alt text > alt text : (Login pass by default: ADMIN / KYLIN)

SQuirreL - 图14

And automatically launch conection:

SQuirreL - 图15

Connect and Execute

The startup window when connected:

SQuirreL - 图16

Choose Tab: and write a query (whe use Kylin’s example cube):

SQuirreL - 图17

  1. select part_dt, sum(price) as total_selled, count(distinct seller_id) as sellers
  2. from kylin_sales group by part_dt
  3. order by part_dt

Execute With: alt text

SQuirreL - 图19

And it’s works!

Tips:

SquirreL isn’t the most stable SQL Client, but it is very flexible and get a lot of info; It can be used for PoC and checking connectivity issues.

List of tables:

SQuirreL - 图20

List of columns of table:

SQuirreL - 图21

List of column of Querie:

SQuirreL - 图22

Export the result of queries:

SQuirreL - 图23

Info about time query execution:

SQuirreL - 图24