- Using the BT Emulator
- Bigtable Operations
Google's bigtable emulator can be used for easy local development and testing
gcloud components update
gcloud components install beta cbt
gcloud beta emulators bigtable start & $(gcloud beta emulators bigtable env-init)
cbt createtable ride && cbt createfamily ride ride
alias Bigtable.ReadRows
ReadRows.read()
alias Bigtable.ReadRows
ReadRows.read("projects/[project_id]/instances/[instance_id]/tables/[table_name]")
alias Bigtable.{ReadRows, RowSet}
RowSet.row_keys("Ride#123")
|> ReadRows.read()
alias Bigtable.{ReadRows, RowSet}
ReadRows.build("projects/[project_id]/instances/[instance_id]/tables/[table_name]")
|> RowSet.row_keys("Ride#123")
|> ReadRows.read()
alias Bigtable.{ReadRows, RowSet}
RowSet.row_keys(["Ride#123", "Ride#124"])
|> ReadRows.read()
alias Bigtable.{ReadRows, RowSet}
ReadRows.build("projects/[project_id]/instances/[instance_id]/tables/[table_name]")
|> RowSet.row_keys(["Ride#123", "Ride#124"])
|> ReadRows.read()
alias Bigtable.{ReadRows, RowSet}
RowSet.row_range("Ride#121", "Ride#124")
|> ReadRows.read()
alias Bigtable.{ReadRows, RowSet}
RowSet.row_range("Ride#121", "Ride#124", false)
|> ReadRows.read()
alias Bigtable.{ReadRows, RowSet}
ranges = [
{"Ride#121", "Ride#124"},
{"Ride#128", "Ride#131"}
]
RowSet.row_ranges(ranges)
|> ReadRows.read()
alias Bigtable.{ReadRows, RowSet}
ranges = [
{"Ride#121", "Ride#124"},
{"Ride#128", "Ride#131"}
]
RowSet.row_ranges(ranges, false)
|> ReadRows.read()
alias Bigtable.{ReadRows, RowSet}
ReadRows.build("projects/[project_id]/instances/[instance_id]/tables/[table_name]")
|> RowSet.row_range("Ride#121", "Ride#124")
|> ReadRows.read()
alias Bigtable.{ReadRows, RowSet}
alias ReadRows.Filter
RowSet.row_keys("Ride#123")
|> Filter.cells_per_column(5)
|> ReadRows.read()
alias Bigtable.{Mutations, MutateRow}
Mutations.build("Ride#123")
|> Mutations.set_cell("ride", "foo", "bar")
|> MutateRow.mutate
alias Bigtable.{Mutations, MutateRow}
Mutations.build("Ride#123")
|> Mutations.delete_from_column("ride", "foo")
|> MutateRow.mutate
alias Bigtable.{Mutations, MutateRow}
Mutations.build("Ride#123")
|> Mutations.delete_from_family("ride")
|> MutateRow.mutate
alias Bigtable.{Mutations, MutateRow}
Mutations.build("Ride#123")
|> Mutations.delete_from_row()
|> MutateRow.mutate