@google-cloud/bigtable

The default export of the @google-cloud/bigtable package is the Bigtable class.

See Bigtable and ClientConfig for client methods and configuration options.

Examples

Install the client library with <a href="https://www.npmjs.com/">npm</a>:
```
npm install --save @google-cloud/bigtable

```
Import the client library
```
const {Bigtable} = require('@google-cloud/bigtable');

```
Create a client that uses <a href="https://cloud.google.com/docs/authentication/production#providing_credentials_to_your_application">Application Default Credentials (ADC)</a>:
```
const bigtable = new Bigtable();

```
Create a client with <a href="https://cloud.google.com/docs/authentication/production#obtaining_and_providing_service_account_credentials_manually">explicit credentials</a>:
```
const bigtable = new Bigtable({
  projectId: 'your-project-id',
  keyFilename: '/path/to/keyfile.json'
});

```

Full quickstart example:

  // Imports the Google Cloud client library
  const {Bigtable} = require('@google-cloud/bigtable');

  const bigtable = new Bigtable();

  async function quickstart() {
    // Connect to an existing instance:my-bigtable-instance
    const instance = bigtable.instance(INSTANCE_ID);

    // Connect to an existing table:my-table
    const table = instance.table(TABLE_ID);

    // Read a row from my-table using a row key
    const [singleRow] = await table.row('r1').get();

    // Print the row key and data (column value, labels, timestamp)
    const rowData = JSON.stringify(singleRow.data, null, 4);
    console.log(`Row key: ${singleRow.id}\nData: ${rowData}`);
  }
  quickstart();

Members

AppProfile

Reference to the AppProfile class.

See:

Backup

Reference to the Backup class.

See:

Cluster

Reference to the Cluster class.

See:

Instance

Reference to the Instance class.

See: