项目作者: erikmafo

项目描述 :
Desktop application for querying Bigtable tables with sql
高级语言: Java
项目地址: git://github.com/erikmafo/BigtableViewer.git
创建时间: 2018-12-23T09:19:57Z
项目社区:https://github.com/erikmafo/BigtableViewer

开源协议:MIT License

下载


Big Table Viewer

Build Actions Status
Codacy Badge
Codacy Badge
CodeQL Analysis Actions Status

Big Table Viewer is an application that lets you query the contents of Google Bigtable tables with SQL.

Installation

Download and run the installer
for your operating system.

Basic Usage

To use different credentials than GOOGLE_APPLICATION_CREDENTIALS, click on ‘File’->’Set credentials’.

To add a Bigtable instance click on ‘Add instance’, enter the project and instance id and click ‘Ok’.
The application should display all the tables of the instance.

Click on the table that you would like to query. A default query, selecting the first 1000 rows of the selected table,
should appear in the query box. Click ‘Execute’ to execute the query.

Table schema

Big table viewer works best with tables where the data in each column corresponds to a standard data type. By clicking
on ‘Table settings’ you can configure how the application should interpret the columns in your table.

Query examples

Use ‘KEY’ to reference the row key:

  1. SELECT * FROM 'table-0' WHERE KEY LIKE 'row-.*' LIMIT 1000

Use . to reference a column in a column family:

  1. SELECT * FROM 'table-0' WHERE myFamily.myIntColumn > 0 LIMIT 1000

Filter rows based on the value of a column or row key by using standard operators ‘>’, ‘<’, ‘>=’, ‘<=’, ‘=’, ‘!=’, e.g.

  1. SELECT * FROM 'table-0' WHERE myFamily.myStringColumn = 'foo' LIMIT 1000

Use ‘AND’ to combine filters:

  1. SELECT * FROM 'table-0' WHERE KEY LIKE 'rowkey.*' AND myFamily.myStringColumn = 'foo' LIMIT 1000

Only select data from a specific column family:

  1. SELECT myFamily FROM 'table-0' LIMIT 1000

or a list of columns:

  1. SELECT myFamily.column1, myFamily.column2 FROM 'table-0' LIMIT 1000

Filter data based on the cell timestamp:

  1. SELECT * FROM 'table-0' WHERE TIMESTAMP < '2020-12-13 12:54' LIMIT 1000

Count the number of rows satisfying a condition:

  1. SELECT COUNT(*) FROM 'table-0' WHERE TIMESTAMP < '2020-12-13 12:54'

Count the number of rows within a column family satisfying a condition:

  1. SELECT COUNT(myFamily) FROM 'table-0' WHERE TIMESTAMP < '2020-12-13 12:54'

To work with reverse row keys, use the built-in REVERSE function:

  1. SELECT * FROM 'table-0' WHERE KEY LIKE REVERSE('yekwor') LIMIT 1000

in combination with CONCAT:

  1. SELECT * FROM 'table-0' WHERE KEY LIKE CONCAT(REVERSE('yekwor'), '#', '2020-12.*') LIMIT 1000

Licence

See licence file.