Write examples
This document shows code samples that illustrate the various types of write requests that you can send to Bigtable when you use the Cloud Bigtable client libraries.
Examples on this page use SetCell mutations to send write requests to
non-aggregate cells. For examples of how to send add requests to aggregate
cells, see Aggregate your data at write time.
Before you try these samples, make sure you understand when and when not to use each type of write request.
The Python client library for Bigtable offers two APIs, asyncio
and a synchronous API. If your application is asynchronous, use asyncio.
Code samples on this page refer to the sample table at Data for examples.
Perform a simple write
The following code samples demonstrate how to make simple write requests to Bigtable. This type of write makes a
MutateRow API request.
Go
To learn how to install and use the client library for Bigtable, see Bigtable client libraries.
To authenticate to Bigtable, set up Application Default Credentials. For more information, see Set up authentication for client libraries.
HBase
To learn how to install and use the client library for Bigtable, see Bigtable client libraries.
To authenticate to Bigtable, set up Application Default Credentials. For more information, see Set up authentication for client libraries.