Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/catkins/bt-emu
CLI wrapper around bigtable emulator
https://github.com/catkins/bt-emu
bigtable cli emulator golang testing
Last synced: 1 day ago
JSON representation
CLI wrapper around bigtable emulator
- Host: GitHub
- URL: https://github.com/catkins/bt-emu
- Owner: catkins
- License: mit
- Created: 2018-07-03T04:21:00.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-07-03T04:31:09.000Z (over 6 years ago)
- Last Synced: 2024-10-19T22:30:18.834Z (4 months ago)
- Topics: bigtable, cli, emulator, golang, testing
- Language: Go
- Size: 2.43 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# BigTable emulator
Little wrapper CLI around the bigtable emulator included in the GCP Go package.
### Usage
```sh
go install ./...
```Create a schema file and seeds file
```yml
# schema.yml
---
project: bt_test
instance: bt_test
tables:
- name: users
families:
- meta
- attributes- name: events
families:
- meta
- attributes```
```yml
# 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
```sh
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`](https://github.com/catkins/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
```