- 3.61.0 (latest)
- 3.60.0
- 3.59.0
- 3.58.0
- 3.57.0
- 3.56.0
- 3.55.0
- 3.54.0
- 3.53.0
- 3.52.0
- 3.51.0
- 3.50.1
- 3.46.0
- 3.45.0
- 3.44.0
- 3.43.0
- 3.42.0
- 3.41.0
- 3.40.1
- 3.39.0
- 3.38.0
- 3.37.0
- 3.36.0
- 3.35.1
- 3.34.0
- 3.33.0
- 3.32.0
- 3.31.0
- 3.30.0
- 3.29.0
- 3.28.0
- 3.27.1
- 3.26.0
- 3.25.0
- 3.24.0
- 3.23.0
- 3.22.2
- 3.21.0
- 3.20.0
- 3.19.0
- 3.18.0
- 3.17.0
- 3.16.0
- 3.15.1
- 3.14.1
- 3.13.0
- 3.12.1
- 3.11.1
- 3.10.0
- 3.9.0
- 3.8.0
- 3.7.0
- 3.6.0
- 3.5.0
- 3.4.0
- 3.3.0
- 3.2.0
- 3.1.0
- 3.0.0
- 2.1.1
- 2.0.0
- 1.19.3
- 1.18.0
- 1.17.1
- 1.16.0
- 1.15.1
- 1.14.0
- 1.13.0
- 1.12.0
- 1.11.0
- 1.10.0
DataChangeRecord(mapping=None, *, ignore_unknown_fields=False, **kwargs)A data change record contains a set of changes to a table with the same modification type (insert, update, or delete) committed at the same commit timestamp in one change stream partition for the same transaction. Multiple data change records can be returned for the same transaction across multiple change stream partitions.
Attributes |
|
|---|---|
| Name | Description |
commit_timestamp |
google.protobuf.timestamp_pb2.Timestamp
Indicates the timestamp in which the change was committed. DataChangeRecord.commit_timestamps, PartitionStartRecord.start_timestamps, PartitionEventRecord.commit_timestamps, and PartitionEndRecord.end_timestamps can have the same value in the same partition. |
record_sequence |
str
Record sequence numbers are unique and monotonically increasing (but not necessarily contiguous) for a specific timestamp across record types in the same partition. To guarantee ordered processing, the reader should process records (of potentially different types) in record_sequence order for a specific timestamp in the same partition. The record sequence number ordering across partitions is only meaningful in the context of a specific transaction. Record sequence numbers are unique across partitions for a specific transaction. Sort the DataChangeRecords for the same server_transaction_id][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.server_transaction_id]
by
record_sequence][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.record_sequence]
to reconstruct the ordering of the changes within the
transaction.
|
server_transaction_id |
str
Provides a globally unique string that represents the transaction in which the change was committed. Multiple transactions can have the same commit timestamp, but each transaction has a unique server_transaction_id. |
is_last_record_in_transaction_in_partition |
bool
Indicates whether this is the last record for a transaction in the current partition. Clients can use this field to determine when all records for a transaction in the current partition have been received. |
table |
str
Name of the table affected by the change. |
column_metadata |
MutableSequence[google.cloud.spanner_v1.types.ChangeStreamRecord.DataChangeRecord.ColumnMetadata]
Provides metadata describing the columns associated with the mods][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.mods]
listed below.
|
mods |
MutableSequence[google.cloud.spanner_v1.types.ChangeStreamRecord.DataChangeRecord.Mod]
Describes the changes that were made. |
mod_type |
google.cloud.spanner_v1.types.ChangeStreamRecord.DataChangeRecord.ModType
Describes the type of change. |
value_capture_type |
google.cloud.spanner_v1.types.ChangeStreamRecord.DataChangeRecord.ValueCaptureType
Describes the value capture type that was specified in the change stream configuration when this change was captured. |
number_of_records_in_transaction |
int
Indicates the number of data change records that are part of this transaction across all change stream partitions. This value can be used to assemble all the records associated with a particular transaction. |
number_of_partitions_in_transaction |
int
Indicates the number of partitions that return data change records for this transaction. This value can be helpful in assembling all records associated with a particular transaction. |
transaction_tag |
str
Indicates the transaction tag associated with this transaction. |
is_system_transaction |
bool
Indicates whether the transaction is a system transaction. System transactions include those issued by time-to-live (TTL), column backfill, etc. |
Classes
ColumnMetadata
ColumnMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)Metadata for a column.
Mod
Mod(mapping=None, *, ignore_unknown_fields=False, **kwargs)A mod describes all data changes in a watched table row.
ModType
ModType(value)Mod type describes the type of change Spanner applied to the data. For example, if the client submits an INSERT_OR_UPDATE request, Spanner will perform an insert if there is no existing row and return ModType INSERT. Alternatively, if there is an existing row, Spanner will perform an update and return ModType UPDATE.
ModValue
ModValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)Returns the value and associated metadata for a particular field of
the
Mod][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod].
ValueCaptureType
ValueCaptureType(value)Value capture type describes which values are recorded in the data change record.