# This is an automatically generated code sample.
# To make this code sample work in your Oracle Cloud tenancy,
# please replace the values for any parameters whose current values do not fit
# your use case (such as resource IDs, strings containing ‘EXAMPLE’ or ‘unique_id’, and
# boolean, number, and enum parameters with values not fitting your use case).
require 'oci'
# Create a default config using DEFAULT profile in default location
# Refer to https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/sdkconfig.htm#SDK_and_CLI_Configuration_File for more info
config = OCI::ConfigFileLoader.load_config
# Initialize service client with default config file
data_integration_client =
OCI::DataIntegration::DataIntegrationClient.new(config: config)
# Send the request to service, some parameters are not required, see API doc for more info
create_entity_shape_response =
data_integration_client.create_entity_shape(
'ocid1.test.oc1..<unique_ID>EXAMPLE-workspaceId-Value',
'EXAMPLE-connectionKey-Value',
'EXAMPLE-schemaResourceName-Value',
OCI::DataIntegration::Models::CreateEntityShapeFromObject.new(
model_type: 'OBJECT_ENTITY',
name: 'EXAMPLE-name-Value',
key: 'EXAMPLE-key-Value',
parent_ref:
OCI::DataIntegration::Models::ParentReference.new(
parent: 'EXAMPLE-parent-Value',
root_doc_id: 'ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value'
),
description: 'EXAMPLE-description-Value',
external_key: 'EXAMPLE-externalKey-Value',
shape:
OCI::DataIntegration::Models::Shape.new(
model_type: 'SHAPE',
key: 'EXAMPLE-key-Value',
model_version: 'EXAMPLE-modelVersion-Value',
parent_ref:
OCI::DataIntegration::Models::ParentReference.new(
parent: 'EXAMPLE-parent-Value',
root_doc_id: 'ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value'
),
config_values:
OCI::DataIntegration::Models::ConfigValues.new(
config_param_values: {
'EXAMPLE_KEY_R1dNu' => {
'stringValue' => 'EXAMPLE-stringValue-Value',
'intValue' => 873,
'objectValue' => 'EXAMPLE-objectValue-Value',
'refValue' => 'EXAMPLE-refValue-Value',
'parameterValue' => 'EXAMPLE-parameterValue-Value',
'rootObjectValue' => 'EXAMPLE-rootObjectValue-Value'
}
},
parent_ref:
OCI::DataIntegration::Models::ParentReference.new(
parent: 'EXAMPLE-parent-Value',
root_doc_id:
'ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value'
)
),
object_status: 98,
name: 'EXAMPLE-name-Value',
description: 'EXAMPLE-description-Value',
type:
OCI::DataIntegration::Models::MaterializedCompositeType.new(
model_type: 'MATERIALIZED_COMPOSITE_TYPE',
key: 'EXAMPLE-key-Value',
model_version: 'EXAMPLE-modelVersion-Value',
parent_ref:
OCI::DataIntegration::Models::ParentReference.new(
parent: 'EXAMPLE-parent-Value',
root_doc_id:
'ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value'
),
name: 'EXAMPLE-name-Value',
object_status: 239,
description: 'EXAMPLE-description-Value',
elements: %w[EXAMPLE--Value],
path_names: %w[EXAMPLE--Value],
config_definition:
OCI::DataIntegration::Models::ConfigDefinition.new(
key: 'EXAMPLE-key-Value',
model_type: 'EXAMPLE-modelType-Value',
model_version: 'EXAMPLE-modelVersion-Value',
parent_ref:
OCI::DataIntegration::Models::ParentReference.new(
parent: 'EXAMPLE-parent-Value',
root_doc_id:
'ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value'
),
name: 'EXAMPLE-name-Value',
is_contained: false,
object_status: 972,
config_parameter_definitions: {
'EXAMPLE_KEY_33RDJ' => {
'parameterName' => 'EXAMPLE-parameterName-Value',
'description' => 'EXAMPLE-description-Value',
'defaultValue' => 'EXAMPLE-defaultValue-Value',
'classFieldName' => 'EXAMPLE-classFieldName-Value',
'isStatic' => False,
'isClassFieldValue' => False
}
}
)
)
),
shape_id: 'ocid1.test.oc1..<unique_ID>EXAMPLE-shapeId-Value',
entity_type: 'VIEW',
other_type_label: 'EXAMPLE-otherTypeLabel-Value',
unique_keys: [
OCI::DataIntegration::Models::UniqueDataKey.new(
model_type: 'UNIQUE_KEY',
key: 'EXAMPLE-key-Value',
model_version: 'EXAMPLE-modelVersion-Value',
parent_ref:
OCI::DataIntegration::Models::ParentReference.new(
parent: 'EXAMPLE-parent-Value',
root_doc_id: 'ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value'
),
name: 'EXAMPLE-name-Value',
attribute_refs: [
OCI::DataIntegration::Models::KeyAttribute.new(
position: 568,
shape_field:
OCI::DataIntegration::Models::ShapeField.new(
model_type: 'SHAPE_FIELD',
key: 'EXAMPLE-key-Value',
model_version: 'EXAMPLE-modelVersion-Value',
parent_ref:
OCI::DataIntegration::Models::ParentReference.new(
parent: 'EXAMPLE-parent-Value',
root_doc_id:
'ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value'
),
config_values:
OCI::DataIntegration::Models::ConfigValues.new(
config_param_values: {
'EXAMPLE_KEY_MZmTR' => {
'stringValue' => 'EXAMPLE-stringValue-Value',
'intValue' => 858,
'objectValue' => 'EXAMPLE-objectValue-Value',
'refValue' => 'EXAMPLE-refValue-Value',
'parameterValue' => 'EXAMPLE-parameterValue-Value',
'rootObjectValue' => 'EXAMPLE-rootObjectValue-Value'
}
},
parent_ref:
OCI::DataIntegration::Models::ParentReference.new(
parent: 'EXAMPLE-parent-Value',
root_doc_id:
'ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value'
)
),
object_status: 45,
name: 'EXAMPLE-name-Value',
description: 'EXAMPLE-description-Value',
type: 'EXAMPLE-type-Value',
labels: %w[EXAMPLE--Value],
native_shape_field:
OCI::DataIntegration::Models::NativeShapeField.new(
name: 'EXAMPLE-name-Value',
model_type: 'EXAMPLE-modelType-Value',
type: 'EXAMPLE-type-Value',
config_values:
OCI::DataIntegration::Models::ConfigValues.new(
config_param_values: {
'EXAMPLE_KEY_VO2ZM' => {
'stringValue' => 'EXAMPLE-stringValue-Value',
'intValue' => 522,
'objectValue' => 'EXAMPLE-objectValue-Value',
'refValue' => 'EXAMPLE-refValue-Value',
'parameterValue' =>
'EXAMPLE-parameterValue-Value',
'rootObjectValue' =>
'EXAMPLE-rootObjectValue-Value'
}
},
parent_ref:
OCI::DataIntegration::Models::ParentReference.new(
parent: 'EXAMPLE-parent-Value',
root_doc_id:
'ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value'
)
),
position: 124,
default_value_string: 'EXAMPLE-defaultValueString-Value',
is_mandatory: true
)
),
attribute:
OCI::DataIntegration::Models::ShapeField.new(
model_type: 'SHAPE_FIELD',
key: 'EXAMPLE-key-Value',
model_version: 'EXAMPLE-modelVersion-Value',
parent_ref:
OCI::DataIntegration::Models::ParentReference.new(
parent: 'EXAMPLE-parent-Value',
root_doc_id:
'ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value'
),
config_values:
OCI::DataIntegration::Models::ConfigValues.new(
config_param_values: {
'EXAMPLE_KEY_iJV7j' => {
'stringValue' => 'EXAMPLE-stringValue-Value',
'intValue' => 161,
'objectValue' => 'EXAMPLE-objectValue-Value',
'refValue' => 'EXAMPLE-refValue-Value',
'parameterValue' => 'EXAMPLE-parameterValue-Value',
'rootObjectValue' => 'EXAMPLE-rootObjectValue-Value'
}
},
parent_ref:
OCI::DataIntegration::Models::ParentReference.new(
parent: 'EXAMPLE-parent-Value',
root_doc_id:
'ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value'
)
),
object_status: 330,
name: 'EXAMPLE-name-Value',
description: 'EXAMPLE-description-Value',
type: 'EXAMPLE-type-Value',
labels: %w[EXAMPLE--Value],
native_shape_field:
OCI::DataIntegration::Models::NativeShapeField.new(
name: 'EXAMPLE-name-Value',
model_type: 'EXAMPLE-modelType-Value',
type: 'EXAMPLE-type-Value',
config_values:
OCI::DataIntegration::Models::ConfigValues.new(
config_param_values: {
'EXAMPLE_KEY_tQoXR' => {
'stringValue' => 'EXAMPLE-stringValue-Value',
'intValue' => 791,
'objectValue' => 'EXAMPLE-objectValue-Value',
'refValue' => 'EXAMPLE-refValue-Value',
'parameterValue' =>
'EXAMPLE-parameterValue-Value',
'rootObjectValue' =>
'EXAMPLE-rootObjectValue-Value'
}
},
parent_ref:
OCI::DataIntegration::Models::ParentReference.new(
parent: 'EXAMPLE-parent-Value',
root_doc_id:
'ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value'
)
),
position: 374,
default_value_string: 'EXAMPLE-defaultValueString-Value',
is_mandatory: false
)
)
)
],
object_status: 4
)
],
foreign_keys: [
OCI::DataIntegration::Models::ForeignKey.new(
model_type: 'FOREIGN_KEY',
key: 'EXAMPLE-key-Value',
model_version: 'EXAMPLE-modelVersion-Value',
parent_ref:
OCI::DataIntegration::Models::ParentReference.new(
parent: 'EXAMPLE-parent-Value',
root_doc_id: 'ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value'
),
name: 'EXAMPLE-name-Value',
attribute_refs: [
OCI::DataIntegration::Models::KeyAttribute.new(
position: 173,
shape_field:
OCI::DataIntegration::Models::ShapeField.new(
model_type: 'SHAPE_FIELD',
key: 'EXAMPLE-key-Value',
model_version: 'EXAMPLE-modelVersion-Value',
parent_ref:
OCI::DataIntegration::Models::ParentReference.new(
parent: 'EXAMPLE-parent-Value',
root_doc_id:
'ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value'
),
config_values:
OCI::DataIntegration::Models::ConfigValues.new(
config_param_values: {
'EXAMPLE_KEY_tOJLg' => {
'stringValue' => 'EXAMPLE-stringValue-Value',
'intValue' => 491,
'objectValue' => 'EXAMPLE-objectValue-Value',
'refValue' => 'EXAMPLE-refValue-Value',
'parameterValue' => 'EXAMPLE-parameterValue-Value',
'rootObjectValue' => 'EXAMPLE-rootObjectValue-Value'
}
},
parent_ref:
OCI::DataIntegration::Models::ParentReference.new(
parent: 'EXAMPLE-parent-Value',
root_doc_id:
'ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value'
)
),
object_status: 626,
name: 'EXAMPLE-name-Value',
description: 'EXAMPLE-description-Value',
type: 'EXAMPLE-type-Value',
labels: %w[EXAMPLE--Value],
native_shape_field:
OCI::DataIntegration::Models::NativeShapeField.new(
name: 'EXAMPLE-name-Value',
model_type: 'EXAMPLE-modelType-Value',
type: 'EXAMPLE-type-Value',
config_values:
OCI::DataIntegration::Models::ConfigValues.new(
config_param_values: {
'EXAMPLE_KEY_AuBuc' => {
'stringValue' => 'EXAMPLE-stringValue-Value',
'intValue' => 456,
'objectValue' => 'EXAMPLE-objectValue-Value',
'refValue' => 'EXAMPLE-refValue-Value',
'parameterValue' =>
'EXAMPLE-parameterValue-Value',
'rootObjectValue' =>
'EXAMPLE-rootObjectValue-Value'
}
},
parent_ref:
OCI::DataIntegration::Models::ParentReference.new(
parent: 'EXAMPLE-parent-Value',
root_doc_id:
'ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value'
)
),
position: 280,
default_value_string: 'EXAMPLE-defaultValueString-Value',
is_mandatory: false
)
),
attribute:
OCI::DataIntegration::Models::ShapeField.new(
model_type: 'SHAPE_FIELD',
key: 'EXAMPLE-key-Value',
model_version: 'EXAMPLE-modelVersion-Value',
parent_ref:
OCI::DataIntegration::Models::ParentReference.new(
parent: 'EXAMPLE-parent-Value',
root_doc_id:
'ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value'
),
config_values:
OCI::DataIntegration::Models::ConfigValues.new(
config_param_values: {
'EXAMPLE_KEY_EIDnB' => {
'stringValue' => 'EXAMPLE-stringValue-Value',
'intValue' => 173,
'objectValue' => 'EXAMPLE-objectValue-Value',
'refValue' => 'EXAMPLE-refValue-Value',
'parameterValue' => 'EXAMPLE-parameterValue-Value',
'rootObjectValue' => 'EXAMPLE-rootObjectValue-Value'
}
},
parent_ref:
OCI::DataIntegration::Models::ParentReference.new(
parent: 'EXAMPLE-parent-Value',
root_doc_id:
'ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value'
)
),
object_status: 989,
name: 'EXAMPLE-name-Value',
description: 'EXAMPLE-description-Value',
type: 'EXAMPLE-type-Value',
labels: %w[EXAMPLE--Value],
native_shape_field:
OCI::DataIntegration::Models::NativeShapeField.new(
name: 'EXAMPLE-name-Value',
model_type: 'EXAMPLE-modelType-Value',
type: 'EXAMPLE-type-Value',
config_values:
OCI::DataIntegration::Models::ConfigValues.new(
config_param_values: {
'EXAMPLE_KEY_DOAwi' => {
'stringValue' => 'EXAMPLE-stringValue-Value',
'intValue' => 118,
'objectValue' => 'EXAMPLE-objectValue-Value',
'refValue' => 'EXAMPLE-refValue-Value',
'parameterValue' =>
'EXAMPLE-parameterValue-Value',
'rootObjectValue' =>
'EXAMPLE-rootObjectValue-Value'
}
},
parent_ref:
OCI::DataIntegration::Models::ParentReference.new(
parent: 'EXAMPLE-parent-Value',
root_doc_id:
'ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value'
)
),
position: 611,
default_value_string: 'EXAMPLE-defaultValueString-Value',
is_mandatory: false
)
)
)
],
update_rule: 843,
delete_rule: 9,
reference_unique_key:
OCI::DataIntegration::Models::PrimaryKey.new(
model_type: 'PRIMARY_KEY',
key: 'EXAMPLE-key-Value',
model_version: 'EXAMPLE-modelVersion-Value',
parent_ref:
OCI::DataIntegration::Models::ParentReference.new(
parent: 'EXAMPLE-parent-Value',
root_doc_id:
'ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value'
),
name: 'EXAMPLE-name-Value',
attribute_refs: [
OCI::DataIntegration::Models::KeyAttribute.new(
position: 340,
shape_field:
OCI::DataIntegration::Models::ShapeField.new(
model_type: 'SHAPE_FIELD',
key: 'EXAMPLE-key-Value',
model_version: 'EXAMPLE-modelVersion-Value',
parent_ref:
OCI::DataIntegration::Models::ParentReference.new(
parent: 'EXAMPLE-parent-Value',
root_doc_id:
'ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value'
),
config_values:
OCI::DataIntegration::Models::ConfigValues.new(
config_param_values: {
'EXAMPLE_KEY_KclCp' => {
'stringValue' => 'EXAMPLE-stringValue-Value',
'intValue' => 607,
'objectValue' => 'EXAMPLE-objectValue-Value',
'refValue' => 'EXAMPLE-refValue-Value',
'parameterValue' =>
'EXAMPLE-parameterValue-Value',
'rootObjectValue' =>
'EXAMPLE-rootObjectValue-Value'
}
},
parent_ref:
OCI::DataIntegration::Models::ParentReference.new(
parent: 'EXAMPLE-parent-Value',
root_doc_id:
'ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value'
)
),
object_status: 623,
name: 'EXAMPLE-name-Value',
description: 'EXAMPLE-description-Value',
type: 'EXAMPLE-type-Value',
labels: %w[EXAMPLE--Value],
native_shape_field:
OCI::DataIntegration::Models::NativeShapeField.new(
name: 'EXAMPLE-name-Value',
model_type: 'EXAMPLE-modelType-Value',
type: 'EXAMPLE-type-Value',
config_values:
OCI::DataIntegration::Models::ConfigValues.new(
config_param_values: {
'EXAMPLE_KEY_jp05i' => {
'stringValue' => 'EXAMPLE-stringValue-Value',
'intValue' => 267,
'objectValue' => 'EXAMPLE-objectValue-Value',
'refValue' => 'EXAMPLE-refValue-Value',
'parameterValue' =>
'EXAMPLE-parameterValue-Value',
'rootObjectValue' =>
'EXAMPLE-rootObjectValue-Value'
}
},
parent_ref:
OCI::DataIntegration::Models::ParentReference
.new(
parent: 'EXAMPLE-parent-Value',
root_doc_id:
'ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value'
)
),
position: 409,
default_value_string:
'EXAMPLE-defaultValueString-Value',
is_mandatory: true
)
),
attribute:
OCI::DataIntegration::Models::ShapeField.new(
model_type: 'SHAPE_FIELD',
key: 'EXAMPLE-key-Value',
model_version: 'EXAMPLE-modelVersion-Value',
parent_ref:
OCI::DataIntegration::Models::ParentReference.new(
parent: 'EXAMPLE-parent-Value',
root_doc_id:
'ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value'
),
config_values:
OCI::DataIntegration::Models::ConfigValues.new(
config_param_values: {
'EXAMPLE_KEY_ysa5W' => {
'stringValue' => 'EXAMPLE-stringValue-Value',
'intValue' => 686,
'objectValue' => 'EXAMPLE-objectValue-Value',
'refValue' => 'EXAMPLE-refValue-Value',
'parameterValue' =>
'EXAMPLE-parameterValue-Value',
'rootObjectValue' =>
'EXAMPLE-rootObjectValue-Value'
}
},
parent_ref:
OCI::DataIntegration::Models::ParentReference.new(
parent: 'EXAMPLE-parent-Value',
root_doc_id:
'ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value'
)
),
object_status: 460,
name: 'EXAMPLE-name-Value',
description: 'EXAMPLE-description-Value',
type: 'EXAMPLE-type-Value',
labels: %w[EXAMPLE--Value],
native_shape_field:
OCI::DataIntegration::Models::NativeShapeField.new(
name: 'EXAMPLE-name-Value',
model_type: 'EXAMPLE-modelType-Value',
type: 'EXAMPLE-type-Value',
config_values:
OCI::DataIntegration::Models::ConfigValues.new(
config_param_values: {
'EXAMPLE_KEY_Tbxmu' => {
'stringValue' => 'EXAMPLE-stringValue-Value',
'intValue' => 277,
'objectValue' => 'EXAMPLE-objectValue-Value',
'refValue' => 'EXAMPLE-refValue-Value',
'parameterValue' =>
'EXAMPLE-parameterValue-Value',
'rootObjectValue' =>
'EXAMPLE-rootObjectValue-Value'
}
},
parent_ref:
OCI::DataIntegration::Models::ParentReference
.new(
parent: 'EXAMPLE-parent-Value',
root_doc_id:
'ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value'
)
),
position: 495,
default_value_string:
'EXAMPLE-defaultValueString-Value',
is_mandatory: false
)
)
)
],
object_status: 260
),
object_status: 323
)
],
resource_name: 'EXAMPLE-resourceName-Value',
data_format:
OCI::DataIntegration::Models::DataFormat.new(
format_attribute:
OCI::DataIntegration::Models::ParquetFormatAttribute.new(
model_type: 'PARQUET_FORMAT',
is_file_pattern: true,
compression: 'EXAMPLE-compression-Value'
),
type: 'ORC',
compression_config:
OCI::DataIntegration::Models::Compression.new(codec: 'SNAPPY')
),
identifier: 'EXAMPLE-identifier-Value'
)
)
# Get the data from response
puts "#{create_entity_shape_response.data}"