Skip to content

catkins/bt-emu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BigTable emulator

Little wrapper CLI around the bigtable emulator included in the GCP Go package.

Usage

go install ./...

Create a schema file and seeds file

# schema.yml
---
project: bt_test
instance: bt_test
tables:
  - name: users
    families:
      - meta
      - attributes

  - name: events
    families:
      - meta
      - attributes

# seeds.yml
---
users:
  "0001":
    meta:
      created_at: 2016-06-01
    attributes:
      first_name: 'David'
      last_name: 'Walsh'
  "0002":
    meta:
      created_at: 2016-07-02
    attributes:
      first_name: 'Gavin'
      last_name: 'Smith'

events:
  "0001#201606011101#page_view":
    meta:
      created_at: 2016-06-01 11:01
    attributes:
      url: "https://google.com"

Start the emulator

bt-emu -port 9999 -schema schema.yml -seeds seeds.yml

Usage with QBT

bt-emu was created on a flight from Sydney to San Francisco so that I could make some changes to qbt, my little CLI tool for interacting with BigTable via Lua scripts.

 qbt --emulator=localhost:9999 query users 'return row.attributes["attributes:first_name"] == "Gavin"' | jq

Releases

No releases published

Packages

No packages published

Languages