{"id":17499656,"url":"https://github.com/catkins/qbt","last_synced_at":"2025-08-20T07:04:08.975Z","repository":{"id":78340260,"uuid":"129607467","full_name":"catkins/qbt","owner":"catkins","description":"Query Google Cloud Bigtable using Lua snippets","archived":false,"fork":false,"pushed_at":"2018-07-03T04:32:47.000Z","size":3576,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-19T21:46:33.844Z","etag":null,"topics":["bigtable","cobra","gcp","go","golang","google-cloud-platform","gopher-lua","lua"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/catkins.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-15T12:21:55.000Z","updated_at":"2019-12-10T02:35:54.000Z","dependencies_parsed_at":"2023-03-10T14:01:08.572Z","dependency_job_id":null,"html_url":"https://github.com/catkins/qbt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catkins%2Fqbt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catkins%2Fqbt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catkins%2Fqbt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catkins%2Fqbt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/catkins","download_url":"https://codeload.github.com/catkins/qbt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248373069,"owners_count":21093138,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bigtable","cobra","gcp","go","golang","google-cloud-platform","gopher-lua","lua"],"created_at":"2024-10-19T17:44:00.517Z","updated_at":"2025-04-11T10:14:39.356Z","avatar_url":"https://github.com/catkins.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"QBT - Query BigTable\n--------------------\n\nQBT is a small CLI application for querying Google Cloud BigTable, using the Lua programming language to express queries.\n\n### Why\n\n[`cbt`](https://cloud.google.com/bigtable/docs/go/cbt-overview) is a great tool for managing BigTable tables and column familes, but it's `read` subcomand is somewhat limited in that it doesn't allow you to provide any filters or transformations to your data.\n\nThe other option for ad-hoc queries into BigTable is to write custom scripts in your language of choice, which is quite time-consuming for exploratory queries.\n\n### Installation\n\n#### Requirements\n\n- Go 1.9+\n- gcloud CLI\n\n```\ngo get -u github.com/catkins/qbt\ngcloud auth applicatiom-default login\n```\n\n### Usage\n\n```\nqbt [--project=\u003cproject id\u003e] [--instance=\u003cinstance id\u003e] [--prefix=\u003crow key prefix\u003e] query \u003ctable\u003e \u003cquery\u003e\n```\n\n### Example\n\n```sh\nqbt query my_table 'return row.my_cf[\"my_cf:haystack\"] == \"needle\"'\n\n# json decoding also included\nqbt query my_table '\n  json = require(\"json\")\n  decoded_value = json.decode(row.my_cf[\"my_cf:haystack\"])\n  return decoded_value[\"nested_field\"] == 123\n'\n```\n\n### Configuration\n\nConfiguration can also be provided from the environment by providing the `QBT_PROJECT`, `QBT_INSTANCE`, and `QBT_PREFIX` environment variables, or via CLI flags.\n\n### Libraries used\n\n- GCP client libraries for Go: cloud.google.com/go\n- Cobra for CLI: github.com/spf13/cobra\n- Viper for configuration: github.com/spf13/viper\n- Lua implementation gopher-lua: github.com/yuin/gopher-lua\n- JSON support for gopher-lua: layeh.com/gopher-json\n- Errors: github.com/pkg/errors\n\n### Todo / Ideas\n\n- [ ] Tests!\n- [ ] Add result transformations\n- [ ] Add other output types (eg. YAML, CSV, strings returned from scripts)\n- [ ] Add debug logging\n- [ ] Queries from file / STDIN\n- [ ] Pre-query scripts (eg. to define functions)\n- [x] Add CLI params for specifying range / prefix queries\n- [ ] Web server for submitting queries to\n- [ ] Other authentication methods\n\n### Licence\n\nCopyright 2018 Chris Atkins\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcatkins%2Fqbt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcatkins%2Fqbt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcatkins%2Fqbt/lists"}