Class MappingRule (1.8.0)

MappingRule(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Definition of a transformation that is to be applied to a group of entities in the source schema. Several such transformations can be applied to an entity sequentially to define the corresponding entity in the target schema.

This message has oneof_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields

Attributes

NameDescription
name str
Full name of the mapping rule resource, in the form of: projects/{project}/locations/{location}/conversionWorkspaces/{set}/mappingRule/{rule}.
display_name str
Optional. A human readable name
state google.cloud.clouddms_v1.types.MappingRule.State
Optional. The mapping rule state
rule_scope google.cloud.clouddms_v1.types.DatabaseEntityType
Required. The rule scope
filter google.cloud.clouddms_v1.types.MappingRuleFilter
Required. The rule filter
rule_order int
Required. The order in which the rule is applied. Lower order rules are applied before higher value rules so they may end up being overridden.
revision_id str
Output only. The revision ID of the mapping rule. A new revision is committed whenever the mapping rule is changed in any way. The format is an 8-character hexadecimal string.
revision_create_time google.protobuf.timestamp_pb2.Timestamp
Output only. The timestamp that the revision was created.
single_entity_rename google.cloud.clouddms_v1.types.SingleEntityRename
Optional. Rule to specify how a single entity should be renamed. This field is a member of oneof_ details.
multi_entity_rename google.cloud.clouddms_v1.types.MultiEntityRename
Optional. Rule to specify how multiple entities should be renamed. This field is a member of oneof_ details.
entity_move google.cloud.clouddms_v1.types.EntityMove
Optional. Rule to specify how multiple entities should be relocated into a different schema. This field is a member of oneof_ details.
single_column_change google.cloud.clouddms_v1.types.SingleColumnChange
Optional. Rule to specify how a single column is converted. This field is a member of oneof_ details.
multi_column_data_type_change google.cloud.clouddms_v1.types.MultiColumnDatatypeChange
Optional. Rule to specify how multiple columns should be converted to a different data type. This field is a member of oneof_ details.
conditional_column_set_value google.cloud.clouddms_v1.types.ConditionalColumnSetValue
Optional. Rule to specify how the data contained in a column should be transformed (such as trimmed, rounded, etc) provided that the data meets certain criteria. This field is a member of oneof_ details.
convert_rowid_column google.cloud.clouddms_v1.types.ConvertRowIdToColumn
Optional. Rule to specify how multiple tables should be converted with an additional rowid column. This field is a member of oneof_ details.
set_table_primary_key google.cloud.clouddms_v1.types.SetTablePrimaryKey
Optional. Rule to specify the primary key for a table This field is a member of oneof_ details.
single_package_change google.cloud.clouddms_v1.types.SinglePackageChange
Optional. Rule to specify how a single package is converted. This field is a member of oneof_ details.
source_sql_change google.cloud.clouddms_v1.types.SourceSqlChange
Optional. Rule to change the sql code for an entity, for example, function, procedure. This field is a member of oneof_ details.
filter_table_columns google.cloud.clouddms_v1.types.FilterTableColumns
Optional. Rule to specify the list of columns to include or exclude from a table. This field is a member of oneof_ details.

Classes

State

State(value)

The current mapping rule state such as enabled, disabled or deleted.

Values: STATE_UNSPECIFIED (0): The state of the mapping rule is unknown. ENABLED (1): The rule is enabled. DISABLED (2): The rule is disabled. DELETED (3): The rule is logically deleted.