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.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年12月16日 UTC.