At the bottom of the Google Cloud console, a
Cloud Shell
session starts and displays a command-line prompt. Cloud Shell is a shell environment
with the Google Cloud CLI
already installed and with values already set for
your current project. It can take a few seconds for the session to initialize.
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["わかりにくい","hardToUnderstand","thumb-down"],["情報またはサンプルコードが不正確","incorrectInformationOrSampleCode","thumb-down"],["必要な情報 / サンプルがない","missingTheInformationSamplesINeed","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-09-04 UTC。"],[[["\u003cp\u003eThe Google Cloud Bigtable emulator is a local, in-memory tool for testing applications, but it does not persist data across runs and should not be used for production.\u003c/p\u003e\n"],["\u003cp\u003eThe emulator can be started using either the gcloud CLI command \u003ccode\u003egcloud beta emulators bigtable start\u003c/code\u003e or via Docker with the command \u003ccode\u003edocker run -p 127.0.0.1:8086:8086 --rm -ti google/cloud-sdk gcloud beta emulators bigtable start --host-port=0.0.0.0:8086\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eClient libraries connect to the emulator by setting the \u003ccode\u003eBIGTABLE_EMULATOR_HOST\u003c/code\u003e environment variable to the emulator's host and port, such as \u003ccode\u003elocalhost:8086\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe emulator supports most filters except the \u003ccode\u003eSink\u003c/code\u003e limiting filter, and issues can be tracked in the \u003ccode\u003egoogle-cloud-go\u003c/code\u003e GitHub repository.\u003c/p\u003e\n"],["\u003cp\u003eA Java wrapper is available for the emulator, providing a Java interface for writing tests, and its resources can be found in the GitHub repository \u003ccode\u003egoogleapis/java-bigtable\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Test using the emulator\n=======================\n\nThe [Google Cloud CLI](/sdk) provides a local, in-memory emulator for\nBigtable, which you can use to test your application. Because the\nemulator stores data only in memory, it won't persist data across runs. It is\nintended to help you use Bigtable for local development and\ntesting, not for production deployments.\n\nYou can use the emulator with all Cloud Bigtable client libraries.\n\nThe emulator does not provide administrative APIs to create or manage instances\nand clusters. After the emulator starts up, you can connect to it using any\nproject and instance name to create tables and read or write data. The emulator\ndoesn't support a secure connection.\n| **Note:** You can't use the emulator in the HBase shell.\n\nInstall and run the emulator\n----------------------------\n\nThe two most common ways to run the emulator are by using the\n[gcloud CLI](/sdk/gcloud/reference/beta/emulators/bigtable) and [Docker](https://www.docker.com).\nChoose the way that is appropriate for your application development and\ntest workflow.\n\n### Set up authentication\n\nIn the Google Cloud console, activate Cloud Shell.\n\n[Activate Cloud Shell](https://console.cloud.google.com/?cloudshell=true)\n\n\nAt the bottom of the Google Cloud console, a\n[Cloud Shell](/shell/docs/how-cloud-shell-works)\nsession starts and displays a command-line prompt. Cloud Shell is a shell environment\nwith the Google Cloud CLI\nalready installed and with values already set for\nyour current project. It can take a few seconds for the session to initialize.\n\n### gcloud CLI\n\n1. Update your gcloud CLI installation to get the latest\n features:\n\n gcloud components update beta\n\n2. Run the following command to start the emulator:\n\n gcloud beta emulators bigtable start\n\n If the emulator is not installed already, you will be prompted to download\n and install the binary for the emulator.\n\n The emulator prints the host and port number where it is running.\n\n \u003cbr /\u003e\n\n By default, the emulator chooses `localhost:8086`. To bind the emulator to a\n specific host and port, use the optional `--host-port` flag, replacing\n \u003cvar translate=\"no\"\u003eHOST\u003c/var\u003e and \u003cvar translate=\"no\"\u003ePORT\u003c/var\u003e: \n\n gcloud beta emulators bigtable start --host-port=\u003cvar translate=\"no\"\u003eHOST\u003c/var\u003e:\u003cvar translate=\"no\"\u003ePORT\u003c/var\u003e\n\n The following is an example: \n\n gcloud beta emulators bigtable start --host-port=localhost:8086\n\n | **Note:** If you want to run multiple emulators, make sure that when you are starting the emulator, you specify the host and port explicitly.\n3. Type Control-C to stop the emulator.\n\n \u003cbr /\u003e\n\n### Docker\n\n1. Make sure [Docker](https://www.docker.com/products/docker-desktop)\n is installed on your system and available on the system path.\n\n2. Start the emulator:\n\n docker run -p 127.0.0.1:8086:8086 --rm -ti google/cloud-sdk gcloud beta emulators bigtable start --host-port=0.0.0.0:8086\n\n This command runs the emulator and maps the ports in the container to the\n same ports on your local host.\n\nYou can also use the emulator as part of your existing Docker Compose configuration (`.yaml`) file.\nFor more information about Docker Compose, see [Docker Compose Overview](https://docs.docker.com/compose/).\n\nUse the client libraries with the emulator\n------------------------------------------\n\nSet the `BIGTABLE_EMULATOR_HOST` environment variable to use the client libraries with the emulator: \n\n### Linux / macOS\n\n export BIGTABLE_EMULATOR_HOST=localhost:8086\n\n### Windows\n\n set BIGTABLE_EMULATOR_HOST=localhost:8086\n\nWhen your application starts, the client library automatically checks for\n`BIGTABLE_EMULATOR_HOST` and connects to the emulator if it is running.\n\nOnce `BIGTABLE_EMULATOR_HOST` is set, you can test the emulator by following the\n[hello world samples](/bigtable/docs/samples-python-hello).\n\nTo stop the emulator, type Control-C, then unset `BIGTABLE_EMULATOR_HOST` with the following command: \n\n unset BIGTABLE_EMULATOR_HOST\n\n### Java wrapper for the emulator\n\nThe Java wrapper bundles the built-in Bigtable emulator and provides\na Java interface to write tests.\n\nFor more information about using the Java wrapper, see the [GitHub repository](https://github.com/googleapis/java-bigtable/tree/main/google-cloud-bigtable-emulator).\n\nThe following documentation provides more information about the emulator Java packages:\n\n- [com.google.cloud.bigtable.emulator.core](/java/docs/reference/google-cloud-bigtable/latest/com.google.cloud.bigtable.emulator.core)\n- [com.google.cloud.bigtable.emulator.v2](/java/docs/reference/google-cloud-bigtable/latest/com.google.cloud.bigtable.emulator.v2)\n\nFilters\n-------\n\nThe emulator supports all filters, except the [`Sink`](/bigtable/docs/using-filters#sink) limiting filter.\n\nIssues related to the Bigtable emulator are tracked in the\n[google-cloud-go](https://github.com/googleapis/google-cloud-go/labels/api%3A%20bigtable) GitHub repository, where you can file bug\nreports and feature requests or comment on existing issues."]]