Skip to main content

mapping_rules

Overview

Namemapping_rules
TypeResource
Idgoogle.datamigration.mapping_rules

Fields

NameDatatypeDescription
namestringFull name of the mapping rule resource, in the form of: projects/{project}/locations/{location}/conversionWorkspaces/{set}/mappingRule/{rule}.
displayNamestringOptional. A human readable name
setTablePrimaryKeyobjectOptions to configure rule type SetTablePrimaryKey. The rule is used to specify the columns and name to configure/alter the primary key of a table. The rule filter field can refer to one entity. The rule scope can be one of: Table.
revisionIdstringOutput 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.
singlePackageChangeobjectOptions to configure rule type SinglePackageChange. The rule is used to alter the sql code for a package entities. The rule filter field can refer to one entity. The rule scope can be: Package
conditionalColumnSetValueobjectOptions to configure rule type ConditionalColumnSetValue. The rule is used to transform the data which is being replicated/migrated. The rule filter field can refer to one or more entities. The rule scope can be one of: Column.
ruleOrderstringRequired. The order in which the rule is applied. Lower order rules are applied before higher value rules so they may end up being overridden.
ruleScopestringRequired. The rule scope
multiColumnDataTypeChangeobjectOptions to configure rule type MultiColumnDatatypeChange. The rule is used to change the data type and associated properties of multiple columns at once. The rule filter field can refer to one or more entities. The rule scope can be one of:Column. This rule requires additional filters to be specified beyond the basic rule filter field, which is the source data type, but the rule supports additional filtering capabilities such as the minimum and maximum field length. All additional filters which are specified are required to be met in order for the rule to be applied (logical AND between the fields).
convertRowidColumnobjectOptions to configure rule type ConvertROWIDToColumn. The rule is used to add column rowid to destination tables based on an Oracle rowid function/property. The rule filter field can refer to one or more entities. The rule scope can be one of: Table. This rule requires additional filter to be specified beyond the basic rule filter field, which is whether or not to work on tables which already have a primary key defined.
statestringOptional. The mapping rule state
singleColumnChangeobjectOptions to configure rule type SingleColumnChange. The rule is used to change the properties of a column. The rule filter field can refer to one entity. The rule scope can be one of: Column. When using this rule, if a field is not specified than the destination column's configuration will be the same as the one in the source column..
revisionCreateTimestringOutput only. The timestamp that the revision was created.
filterTableColumnsobjectOptions to configure rule type FilterTableColumns. The rule is used to filter the list of columns to include or exclude from a table. The rule filter field can refer to one entity. The rule scope can be: Table Only one of the two lists can be specified for the rule.
sourceSqlChangeobjectOptions to configure rule type SourceSqlChange. The rule is used to alter the sql code for database entities. The rule filter field can refer to one entity. The rule scope can be: StoredProcedure, Function, Trigger, View
multiEntityRenameobjectOptions to configure rule type MultiEntityRename. The rule is used to rename multiple entities. The rule filter field can refer to one or more entities. The rule scope can be one of: Database, Schema, Table, Column, Constraint, Index, View, Function, Stored Procedure, Materialized View, Sequence, UDT
singleEntityRenameobjectOptions to configure rule type SingleEntityRename. The rule is used to rename an entity. The rule filter field can refer to only one entity. The rule scope can be one of: Database, Schema, Table, Column, Constraint, Index, View, Function, Stored Procedure, Materialized View, Sequence, UDT, Synonym
entityMoveobjectOptions to configure rule type EntityMove. The rule is used to move an entity to a new schema. The rule filter field can refer to one or more entities. The rule scope can be one of: Table, Column, Constraint, Index, View, Function, Stored Procedure, Materialized View, Sequence, UDT
filterobjectA filter defining the entities that a mapping rule should be applied to. When more than one field is specified, the rule is applied only to entities which match all the fields.

Methods

NameAccessible byRequired ParamsDescription
getSELECTconversionWorkspacesId, locationsId, mappingRulesId, projectsIdGets the details of a mapping rule.
listSELECTconversionWorkspacesId, locationsId, projectsIdLists the mapping rules for a specific conversion workspace.
createINSERTconversionWorkspacesId, locationsId, projectsIdCreates a new mapping rule for a given conversion workspace.
deleteDELETEconversionWorkspacesId, locationsId, mappingRulesId, projectsIdDeletes a single mapping rule.
_listEXECconversionWorkspacesId, locationsId, projectsIdLists the mapping rules for a specific conversion workspace.
importEXECconversionWorkspacesId, locationsId, projectsIdImports the mapping rules for a given conversion workspace. Supports various formats of external rules files.