Class: Google::Apis::DatamigrationV1::MappingRule
- Inherits:
-
Object
- Object
- Google::Apis::DatamigrationV1::MappingRule
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/datamigration_v1/classes.rb,
lib/google/apis/datamigration_v1/representations.rb,
lib/google/apis/datamigration_v1/representations.rb
Overview
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.
Instance Attribute Summary collapse
-
#conditional_column_set_value ⇒ Google::Apis::DatamigrationV1::ConditionalColumnSetValue
Options to configure rule type ConditionalColumnSetValue.
-
#convert_rowid_column ⇒ Google::Apis::DatamigrationV1::ConvertRowIdToColumn
Options to configure rule type ConvertROWIDToColumn.
-
#display_name ⇒ String
Optional.
-
#entity_move ⇒ Google::Apis::DatamigrationV1::EntityMove
Options to configure rule type EntityMove.
-
#filter ⇒ Google::Apis::DatamigrationV1::MappingRuleFilter
A filter defining the entities that a mapping rule should be applied to.
-
#filter_table_columns ⇒ Google::Apis::DatamigrationV1::FilterTableColumns
Options to configure rule type FilterTableColumns.
-
#multi_column_data_type_change ⇒ Google::Apis::DatamigrationV1::MultiColumnDatatypeChange
Options to configure rule type MultiColumnDatatypeChange.
-
#multi_entity_rename ⇒ Google::Apis::DatamigrationV1::MultiEntityRename
Options to configure rule type MultiEntityRename.
-
#name ⇒ String
Full name of the mapping rule resource, in the form of: projects/
project
/ locations/location
/conversionWorkspaces/set
/mappingRule/rule
. -
#revision_create_time ⇒ String
Output only.
-
#revision_id ⇒ String
Output only.
-
#rule_order ⇒ Fixnum
Required.
-
#rule_scope ⇒ String
Required.
-
#set_table_primary_key ⇒ Google::Apis::DatamigrationV1::SetTablePrimaryKey
Options to configure rule type SetTablePrimaryKey.
-
#single_column_change ⇒ Google::Apis::DatamigrationV1::SingleColumnChange
Options to configure rule type SingleColumnChange.
-
#single_entity_rename ⇒ Google::Apis::DatamigrationV1::SingleEntityRename
Options to configure rule type SingleEntityRename.
-
#single_package_change ⇒ Google::Apis::DatamigrationV1::SinglePackageChange
Options to configure rule type SinglePackageChange.
-
#source_sql_change ⇒ Google::Apis::DatamigrationV1::SourceSqlChange
Options to configure rule type SourceSqlChange.
-
#state ⇒ String
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ MappingRule
constructor
A new instance of MappingRule.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ MappingRule
Returns a new instance of MappingRule.
2770 2771 2772 |
# File 'lib/google/apis/datamigration_v1/classes.rb', line 2770 def initialize(**args) update!(**args) end |
Instance Attribute Details
#conditional_column_set_value ⇒ Google::Apis::DatamigrationV1::ConditionalColumnSetValue
Options 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.
Corresponds to the JSON property conditionalColumnSetValue
2638 2639 2640 |
# File 'lib/google/apis/datamigration_v1/classes.rb', line 2638 def conditional_column_set_value @conditional_column_set_value end |
#convert_rowid_column ⇒ Google::Apis::DatamigrationV1::ConvertRowIdToColumn
Options 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.
Corresponds to the JSON property convertRowidColumn
2648 2649 2650 |
# File 'lib/google/apis/datamigration_v1/classes.rb', line 2648 def convert_rowid_column @convert_rowid_column end |
#display_name ⇒ String
Optional. A human readable name
Corresponds to the JSON property displayName
2653 2654 2655 |
# File 'lib/google/apis/datamigration_v1/classes.rb', line 2653 def display_name @display_name end |
#entity_move ⇒ Google::Apis::DatamigrationV1::EntityMove
Options 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
Corresponds to the JSON property entityMove
2661 2662 2663 |
# File 'lib/google/apis/datamigration_v1/classes.rb', line 2661 def entity_move @entity_move end |
#filter ⇒ Google::Apis::DatamigrationV1::MappingRuleFilter
A 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.
Corresponds to the JSON property filter
2668 2669 2670 |
# File 'lib/google/apis/datamigration_v1/classes.rb', line 2668 def filter @filter end |
#filter_table_columns ⇒ Google::Apis::DatamigrationV1::FilterTableColumns
Options 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.
Corresponds to the JSON property filterTableColumns
2676 2677 2678 |
# File 'lib/google/apis/datamigration_v1/classes.rb', line 2676 def filter_table_columns @filter_table_columns end |
#multi_column_data_type_change ⇒ Google::Apis::DatamigrationV1::MultiColumnDatatypeChange
Options 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).
Corresponds to the JSON property multiColumnDataTypeChange
2688 2689 2690 |
# File 'lib/google/apis/datamigration_v1/classes.rb', line 2688 def multi_column_data_type_change @multi_column_data_type_change end |
#multi_entity_rename ⇒ Google::Apis::DatamigrationV1::MultiEntityRename
Options 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
Corresponds to the JSON property multiEntityRename
2696 2697 2698 |
# File 'lib/google/apis/datamigration_v1/classes.rb', line 2696 def multi_entity_rename @multi_entity_rename end |
#name ⇒ String
Full name of the mapping rule resource, in the form of: projects/project
/
locations/location
/conversionWorkspaces/set
/mappingRule/rule
.
Corresponds to the JSON property name
2702 2703 2704 |
# File 'lib/google/apis/datamigration_v1/classes.rb', line 2702 def name @name end |
#revision_create_time ⇒ String
Output only. The timestamp that the revision was created.
Corresponds to the JSON property revisionCreateTime
2707 2708 2709 |
# File 'lib/google/apis/datamigration_v1/classes.rb', line 2707 def revision_create_time @revision_create_time end |
#revision_id ⇒ String
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.
Corresponds to the JSON property revisionId
2714 2715 2716 |
# File 'lib/google/apis/datamigration_v1/classes.rb', line 2714 def revision_id @revision_id end |
#rule_order ⇒ Fixnum
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.
Corresponds to the JSON property ruleOrder
2720 2721 2722 |
# File 'lib/google/apis/datamigration_v1/classes.rb', line 2720 def rule_order @rule_order end |
#rule_scope ⇒ String
Required. The rule scope
Corresponds to the JSON property ruleScope
2725 2726 2727 |
# File 'lib/google/apis/datamigration_v1/classes.rb', line 2725 def rule_scope @rule_scope end |
#set_table_primary_key ⇒ Google::Apis::DatamigrationV1::SetTablePrimaryKey
Options 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.
Corresponds to the JSON property setTablePrimaryKey
2732 2733 2734 |
# File 'lib/google/apis/datamigration_v1/classes.rb', line 2732 def set_table_primary_key @set_table_primary_key end |
#single_column_change ⇒ Google::Apis::DatamigrationV1::SingleColumnChange
Options 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..
Corresponds to the JSON property singleColumnChange
2741 2742 2743 |
# File 'lib/google/apis/datamigration_v1/classes.rb', line 2741 def single_column_change @single_column_change end |
#single_entity_rename ⇒ Google::Apis::DatamigrationV1::SingleEntityRename
Options 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
Corresponds to the JSON property singleEntityRename
2749 2750 2751 |
# File 'lib/google/apis/datamigration_v1/classes.rb', line 2749 def single_entity_rename @single_entity_rename end |
#single_package_change ⇒ Google::Apis::DatamigrationV1::SinglePackageChange
Options 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
Corresponds to the JSON property singlePackageChange
2756 2757 2758 |
# File 'lib/google/apis/datamigration_v1/classes.rb', line 2756 def single_package_change @single_package_change end |
#source_sql_change ⇒ Google::Apis::DatamigrationV1::SourceSqlChange
Options 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
Corresponds to the JSON property sourceSqlChange
2763 2764 2765 |
# File 'lib/google/apis/datamigration_v1/classes.rb', line 2763 def source_sql_change @source_sql_change end |
#state ⇒ String
Optional. The mapping rule state
Corresponds to the JSON property state
2768 2769 2770 |
# File 'lib/google/apis/datamigration_v1/classes.rb', line 2768 def state @state end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 |
# File 'lib/google/apis/datamigration_v1/classes.rb', line 2775 def update!(**args) @conditional_column_set_value = args[:conditional_column_set_value] if args.key?(:conditional_column_set_value) @convert_rowid_column = args[:convert_rowid_column] if args.key?(:convert_rowid_column) @display_name = args[:display_name] if args.key?(:display_name) @entity_move = args[:entity_move] if args.key?(:entity_move) @filter = args[:filter] if args.key?(:filter) @filter_table_columns = args[:filter_table_columns] if args.key?(:filter_table_columns) @multi_column_data_type_change = args[:multi_column_data_type_change] if args.key?(:multi_column_data_type_change) @multi_entity_rename = args[:multi_entity_rename] if args.key?(:multi_entity_rename) @name = args[:name] if args.key?(:name) @revision_create_time = args[:revision_create_time] if args.key?(:revision_create_time) @revision_id = args[:revision_id] if args.key?(:revision_id) @rule_order = args[:rule_order] if args.key?(:rule_order) @rule_scope = args[:rule_scope] if args.key?(:rule_scope) @set_table_primary_key = args[:set_table_primary_key] if args.key?(:set_table_primary_key) @single_column_change = args[:single_column_change] if args.key?(:single_column_change) @single_entity_rename = args[:single_entity_rename] if args.key?(:single_entity_rename) @single_package_change = args[:single_package_change] if args.key?(:single_package_change) @source_sql_change = args[:source_sql_change] if args.key?(:source_sql_change) @state = args[:state] if args.key?(:state) end |