SubsettingPolicy

class oci.data_safe.models.SubsettingPolicy(**kwargs)

Bases: object

A subsetting policy defines the approach to subset data in a target database. It’s basically a collection of rules applied on tables or schemas, to reduce rows in them. A subsetting policy can be used to subset multiple databases provided that they have the same schema design.

Attributes:

LIFECYCLE_STATE_ACTIVE

A constant which can be used with the lifecycle_state property of a SubsettingPolicy.

LIFECYCLE_STATE_CREATING

A constant which can be used with the lifecycle_state property of a SubsettingPolicy.

LIFECYCLE_STATE_DELETED

A constant which can be used with the lifecycle_state property of a SubsettingPolicy.

LIFECYCLE_STATE_DELETING

A constant which can be used with the lifecycle_state property of a SubsettingPolicy.

LIFECYCLE_STATE_FAILED

A constant which can be used with the lifecycle_state property of a SubsettingPolicy.

LIFECYCLE_STATE_NEEDS_ATTENTION

A constant which can be used with the lifecycle_state property of a SubsettingPolicy.

LIFECYCLE_STATE_UPDATING

A constant which can be used with the lifecycle_state property of a SubsettingPolicy.

RECOMPILE_NONE

A constant which can be used with the recompile property of a SubsettingPolicy.

RECOMPILE_PARALLEL

A constant which can be used with the recompile property of a SubsettingPolicy.

RECOMPILE_SERIAL

A constant which can be used with the recompile property of a SubsettingPolicy.

UNRELATED_TABLES_ACTION_KEEP

A constant which can be used with the unrelated_tables_action property of a SubsettingPolicy.

UNRELATED_TABLES_ACTION_TRUNCATE

A constant which can be used with the unrelated_tables_action property of a SubsettingPolicy.

compartment_id

[Required] Gets the compartment_id of this SubsettingPolicy.

defined_tags

Gets the defined_tags of this SubsettingPolicy.

description

Gets the description of this SubsettingPolicy.

display_name

Gets the display_name of this SubsettingPolicy.

freeform_tags

Gets the freeform_tags of this SubsettingPolicy.

id

[Required] Gets the id of this SubsettingPolicy.

is_redo_logging_enabled

[Required] Gets the is_redo_logging_enabled of this SubsettingPolicy.

is_refresh_stats_enabled

[Required] Gets the is_refresh_stats_enabled of this SubsettingPolicy.

lifecycle_state

[Required] Gets the lifecycle_state of this SubsettingPolicy.

masking_policy_id

Gets the masking_policy_id of this SubsettingPolicy.

parallel_degree

[Required] Gets the parallel_degree of this SubsettingPolicy.

post_subsetting_script

Gets the post_subsetting_script of this SubsettingPolicy.

pre_subsetting_script

Gets the pre_subsetting_script of this SubsettingPolicy.

recompile

[Required] Gets the recompile of this SubsettingPolicy.

schema_source

Gets the schema_source of this SubsettingPolicy.

time_created

[Required] Gets the time_created of this SubsettingPolicy.

time_updated

[Required] Gets the time_updated of this SubsettingPolicy.

unrelated_tables_action

Gets the unrelated_tables_action of this SubsettingPolicy.

Methods:

__init__(**kwargs)

Initializes a new SubsettingPolicy object with values from keyword arguments.

LIFECYCLE_STATE_ACTIVE = 'ACTIVE'

A constant which can be used with the lifecycle_state property of a SubsettingPolicy. This constant has a value of “ACTIVE”

LIFECYCLE_STATE_CREATING = 'CREATING'

A constant which can be used with the lifecycle_state property of a SubsettingPolicy. This constant has a value of “CREATING”

LIFECYCLE_STATE_DELETED = 'DELETED'

A constant which can be used with the lifecycle_state property of a SubsettingPolicy. This constant has a value of “DELETED”

LIFECYCLE_STATE_DELETING = 'DELETING'

A constant which can be used with the lifecycle_state property of a SubsettingPolicy. This constant has a value of “DELETING”

LIFECYCLE_STATE_FAILED = 'FAILED'

A constant which can be used with the lifecycle_state property of a SubsettingPolicy. This constant has a value of “FAILED”

LIFECYCLE_STATE_NEEDS_ATTENTION = 'NEEDS_ATTENTION'

A constant which can be used with the lifecycle_state property of a SubsettingPolicy. This constant has a value of “NEEDS_ATTENTION”

LIFECYCLE_STATE_UPDATING = 'UPDATING'

A constant which can be used with the lifecycle_state property of a SubsettingPolicy. This constant has a value of “UPDATING”

RECOMPILE_NONE = 'NONE'

A constant which can be used with the recompile property of a SubsettingPolicy. This constant has a value of “NONE”

RECOMPILE_PARALLEL = 'PARALLEL'

A constant which can be used with the recompile property of a SubsettingPolicy. This constant has a value of “PARALLEL”

RECOMPILE_SERIAL = 'SERIAL'

A constant which can be used with the recompile property of a SubsettingPolicy. This constant has a value of “SERIAL”

UNRELATED_TABLES_ACTION_KEEP = 'KEEP'

A constant which can be used with the unrelated_tables_action property of a SubsettingPolicy. This constant has a value of “KEEP”

UNRELATED_TABLES_ACTION_TRUNCATE = 'TRUNCATE'

A constant which can be used with the unrelated_tables_action property of a SubsettingPolicy. This constant has a value of “TRUNCATE”

__init__(**kwargs)

Initializes a new SubsettingPolicy object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class):

Parameters
  • id (str) – The value to assign to the id property of this SubsettingPolicy.

  • compartment_id (str) – The value to assign to the compartment_id property of this SubsettingPolicy.

  • display_name (str) – The value to assign to the display_name property of this SubsettingPolicy.

  • time_created (datetime) – The value to assign to the time_created property of this SubsettingPolicy.

  • lifecycle_state (str) – The value to assign to the lifecycle_state property of this SubsettingPolicy. Allowed values for this property are: “CREATING”, “ACTIVE”, “UPDATING”, “DELETING”, “DELETED”, “NEEDS_ATTENTION”, “FAILED”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

  • time_updated (datetime) – The value to assign to the time_updated property of this SubsettingPolicy.

  • description (str) – The value to assign to the description property of this SubsettingPolicy.

  • is_redo_logging_enabled (bool) – The value to assign to the is_redo_logging_enabled property of this SubsettingPolicy.

  • is_refresh_stats_enabled (bool) – The value to assign to the is_refresh_stats_enabled property of this SubsettingPolicy.

  • parallel_degree (str) – The value to assign to the parallel_degree property of this SubsettingPolicy.

  • recompile (str) – The value to assign to the recompile property of this SubsettingPolicy. Allowed values for this property are: “SERIAL”, “PARALLEL”, “NONE”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

  • unrelated_tables_action (str) – The value to assign to the unrelated_tables_action property of this SubsettingPolicy. Allowed values for this property are: “TRUNCATE”, “KEEP”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

  • pre_subsetting_script (str) – The value to assign to the pre_subsetting_script property of this SubsettingPolicy.

  • post_subsetting_script (str) – The value to assign to the post_subsetting_script property of this SubsettingPolicy.

  • schema_source (oci.data_safe.models.SchemaSourceDetails) – The value to assign to the schema_source property of this SubsettingPolicy.

  • masking_policy_id (str) – The value to assign to the masking_policy_id property of this SubsettingPolicy.

  • freeform_tags (dict(str, str)) – The value to assign to the freeform_tags property of this SubsettingPolicy.

  • defined_tags (dict(str, dict(str, object))) – The value to assign to the defined_tags property of this SubsettingPolicy.

property compartment_id

[Required] Gets the compartment_id of this SubsettingPolicy. The OCID of the compartment that contains the subsetting policy

Returns

The compartment_id of this SubsettingPolicy.

Return type

str

property defined_tags

Gets the defined_tags of this SubsettingPolicy. Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags Example: {“Operations”: {“CostCenter”: “42”}}

Returns

The defined_tags of this SubsettingPolicy.

Return type

dict(str, dict(str, object))

property description

Gets the description of this SubsettingPolicy. The description of the subsetting policy

Returns

The description of this SubsettingPolicy.

Return type

str

property display_name

Gets the display_name of this SubsettingPolicy. The display name of the subsetting policy

Returns

The display_name of this SubsettingPolicy.

Return type

str

property freeform_tags

Gets the freeform_tags of this SubsettingPolicy. Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags

Example: {“Department”: “Finance”}

Returns

The freeform_tags of this SubsettingPolicy.

Return type

dict(str, str)

property id

[Required] Gets the id of this SubsettingPolicy. The OCID of the subsetting policy

Returns

The id of this SubsettingPolicy.

Return type

str

property is_redo_logging_enabled

[Required] Gets the is_redo_logging_enabled of this SubsettingPolicy. Indicates if redo logging is enabled during a subsetting operation. It’s disabled by default. Set this attribute to true to enable redo logging. By default, subsetting disables redo logging and flashback logging to purge any original data from logs. However, in certain circumstances when you only want to test subsetting, rollback changes, and retry subsetting, you could enable logging and use a flashback database to retrieve the original data after it has been subsetted.

Returns

The is_redo_logging_enabled of this SubsettingPolicy.

Return type

bool

property is_refresh_stats_enabled

[Required] Gets the is_refresh_stats_enabled of this SubsettingPolicy. Indicates if statistics gathering is enabled. It’s enabled by default. Set this attribute to false to disable statistics gathering. The subsetting process gathers statistics on database tables after subsetting completes

Returns

The is_refresh_stats_enabled of this SubsettingPolicy.

Return type

bool

property lifecycle_state

[Required] Gets the lifecycle_state of this SubsettingPolicy. The current state of the subsetting policy

Allowed values for this property are: “CREATING”, “ACTIVE”, “UPDATING”, “DELETING”, “DELETED”, “NEEDS_ATTENTION”, “FAILED”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

Returns

The lifecycle_state of this SubsettingPolicy.

Return type

str

property masking_policy_id

Gets the masking_policy_id of this SubsettingPolicy. The OCID of the masking policy associated with this subsetting policy

Returns

The masking_policy_id of this SubsettingPolicy.

Return type

str

property parallel_degree

[Required] Gets the parallel_degree of this SubsettingPolicy. Specifies options to enable parallel execution when running data subsetting. Allowed values are ‘NONE’ (no parallelism), ‘DEFAULT’ (the Oracle Database computes the optimum degree of parallelism) or an integer value to be used as the degree of parallelism. Parallel execution helps effectively use multiple CPUs and improve subsetting performance. Refer to the Oracle Database parallel execution framework when choosing an explicit degree of parallelism

Returns

The parallel_degree of this SubsettingPolicy.

Return type

str

property post_subsetting_script

Gets the post_subsetting_script of this SubsettingPolicy. A post-subsetting script, which can contain SQL and PL/SQL statements. It’s executed after the core subsetting script generated using the subsetting policy. It’s usually used to perform additional transformation or cleanup work after subsetting.

Returns

The post_subsetting_script of this SubsettingPolicy.

Return type

str

property pre_subsetting_script

Gets the pre_subsetting_script of this SubsettingPolicy. A pre-subsetting script, which can contain SQL and PL/SQL statements. It’s executed before the core subsetting script generated using the subsetting policy. It’s usually used to perform any preparation or prerequisite work before subsetting data

Returns

The pre_subsetting_script of this SubsettingPolicy.

Return type

str

property recompile

[Required] Gets the recompile of this SubsettingPolicy. Specifies how to recompile invalid objects post data subsetting. Allowed values are ‘SERIAL’ (recompile in serial), ‘PARALLEL’ (recompile in parallel), ‘NONE’ (do not recompile). If it’s set to PARALLEL, the value of parallelDegree attribute is used. Use the built-in UTL_RECOMP package to recompile any remaining invalid objects after subsetting completes

Allowed values for this property are: “SERIAL”, “PARALLEL”, “NONE”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

Returns

The recompile of this SubsettingPolicy.

Return type

str

property schema_source

Gets the schema_source of this SubsettingPolicy.

Returns

The schema_source of this SubsettingPolicy.

Return type

oci.data_safe.models.SchemaSourceDetails

property time_created

[Required] Gets the time_created of this SubsettingPolicy. The date and time the subsetting policy was created, in the format defined by RFC3339

Returns

The time_created of this SubsettingPolicy.

Return type

datetime

property time_updated

[Required] Gets the time_updated of this SubsettingPolicy. The date and time the subsetting policy was last updated, in the format defined by RFC3339

Returns

The time_updated of this SubsettingPolicy.

Return type

datetime

property unrelated_tables_action

Gets the unrelated_tables_action of this SubsettingPolicy. Strategy to be applied for tables which are not impacted by any of the subsetting rules

Allowed values for this property are: “TRUNCATE”, “KEEP”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

Returns

The unrelated_tables_action of this SubsettingPolicy.

Return type

str