Skip to content

Latest commit

 

History

History
57 lines (40 loc) · 1.44 KB

README.md

File metadata and controls

57 lines (40 loc) · 1.44 KB

Bigtable emulator Docker image

This docker image contains Google Cloud SDK BigTable emulator and provides an easy setup using cbt tool.

Warning: This is not a production tool.

Installation

A pre-built Docker container is available for Docker Hub:

docker run -p 8086:8086 ssivart/bigtable-emulator

Usage

Use any client app to connect to emulator by setting the BIGTABLE_EMULATOR_HOST environment variable to the host and port where the Bigtable emulator is running.

env BIGTABLE_EMULATOR_HOST=localhost:8086 ./myapp

or

export BIGTABLE_EMULATOR_HOST=localhost:8086
./myapp

Automatic table and column family creation

Specifying the BIGTABLE_SCHEMA environment variable with a sequential number appended to it, the format should be:

BIGTABLE_SCHEMA=TABLE1:FAMILY1#FAMILY2,TABLE2:FAMILY3,TABLE3:FAMILY4

Specifying the BIGTABLE_PROJECT and BIGTABLE_INSTANCE environment variable to set the project and instance, the default value is dev:

BIGTABLE_PROJECT=my-project-123
BIGTABLE_INSTANCE=my-instance

Full command would look like:

docker run -p 8086:8086 \
           -e BIGTABLE_SCHEMA=user:metadata#profile,company:metadata#finance \
           -e BIGTABLE_PROJECT=my-project \
           -e BIGTABLE_INSTANCE=my-instance \
           ssivart/bigtable-emulator