golang_bigtable_example

command module
v0.0.0-...-c28f687 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 23, 2024 License: GPL-3.0 Imports: 14 Imported by: 0

README

Golang Bigtable Example

Exemplo de integração com Bigtable usando Go

Dependências

Como usar

  1. Inicie o emulador do Bigtable:

$ gcloud beta emulators bigtable start

  1. Exporte as variáveis de ambiente

$ export BIGTABLE_EMULATOR_HOST="localhost:8086" BIGTABLE_PROJECT_ID="local" BIGTABLE_INSTANCE_ID="local-instance"

  1. Configure o banco

$ make setup-db

  1. Rode os exemplos
$ make insert-one
$ make insert-conditional
$ make insert-batch
$ make read-one
$ make read-multiple
$ make read-partialKey
$ make delete

CBT

CBT é a interface em linha de comando para fazer algumas operações no Bigtable

https://cloud.google.com/bigtable/docs/cbt-overview

Comandos úteis

  • Listar tabelas:
$ cbt -project local -instance local-instance -admin-endpoint localhost:8086 -data-endpoint localhost:8086 ls
  • Ler uma tabela específica
$ cbt -project local -instance local-instance -admin-endpoint localhost:8086 -data-endpoint localhost:8086 read media_progress

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL