Stay organized with collections Save and categorize content based on your preferences.

Table API

User friendly container for Cloud Spanner Table.

class google.cloud.spanner_v1.table.Table(table_id, database)

Bases: object

Representation of a Cloud Spanner Table.

  • Parameters

    • table_id (str) – The ID of the table.

    • database (Database) – The database that owns the table.

exists()

Test whether this table exists.

  • Return type

    bool

  • Returns

    True if the table exists, else false.

reload()

Reload this table.

Refresh any configured schema into schema.

  • Raises

    NotFound – if the table does not exist

property schema()

The schema of this table.

  • Return type

    list of Field

  • Returns

    The table schema.

property table_id()

The ID of the table used in SQL.

  • Return type

    str

  • Returns

    The table ID.