# 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).
import 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.config.from_file()
# Initialize service client with default config file
data_integration_client = oci.data_integration.DataIntegrationClient(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(
workspace_id="ocid1.test.oc1..<unique_ID>EXAMPLE-workspaceId-Value",
connection_key="EXAMPLE-connectionKey-Value",
schema_resource_name="EXAMPLE-schemaResourceName-Value",
create_entity_shape_details=oci.data_integration.models.CreateEntityShapeFromFile(
model_type="FILE_ENTITY",
key="EXAMPLE-key-Value",
model_version="EXAMPLE-modelVersion-Value",
parent_ref=oci.data_integration.models.ParentReference(
parent="EXAMPLE-parent-Value",
root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
name="EXAMPLE-name-Value",
description="EXAMPLE-description-Value",
object_version=81,
external_key="EXAMPLE-externalKey-Value",
shape=oci.data_integration.models.Shape(
model_type="SHAPE",
key="EXAMPLE-key-Value",
model_version="EXAMPLE-modelVersion-Value",
parent_ref=oci.data_integration.models.ParentReference(
parent="EXAMPLE-parent-Value",
root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
config_values=oci.data_integration.models.ConfigValues(
config_param_values={
'EXAMPLE_KEY_ItUf7': {
'stringValue': 'EXAMPLE-stringValue-Value',
'intValue': 783,
'objectValue': 'EXAMPLE-objectValue-Value',
'refValue': 'EXAMPLE-refValue-Value',
'parameterValue': 'EXAMPLE-parameterValue-Value',
'rootObjectValue': 'EXAMPLE-rootObjectValue-Value'}},
parent_ref=oci.data_integration.models.ParentReference(
parent="EXAMPLE-parent-Value",
root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")),
object_status=265,
name="EXAMPLE-name-Value",
description="EXAMPLE-description-Value",
type=oci.data_integration.models.JavaType(
model_type="JAVA_TYPE",
key="EXAMPLE-key-Value",
model_version="EXAMPLE-modelVersion-Value",
parent_ref=oci.data_integration.models.ParentReference(
parent="EXAMPLE-parent-Value",
root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
name="EXAMPLE-name-Value",
object_status=89,
description="EXAMPLE-description-Value",
java_type_name="EXAMPLE-javaTypeName-Value",
config_definition=oci.data_integration.models.ConfigDefinition(
key="EXAMPLE-key-Value",
model_type="EXAMPLE-modelType-Value",
model_version="EXAMPLE-modelVersion-Value",
parent_ref=oci.data_integration.models.ParentReference(
parent="EXAMPLE-parent-Value",
root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
name="EXAMPLE-name-Value",
is_contained=False,
object_status=675,
config_parameter_definitions={
'EXAMPLE_KEY_YT397': {
'parameterName': 'EXAMPLE-parameterName-Value',
'description': 'EXAMPLE-description-Value',
'defaultValue': 'EXAMPLE-defaultValue-Value',
'classFieldName': 'EXAMPLE-classFieldName-Value',
'isStatic': False,
'isClassFieldValue': True}}))),
shape_id="ocid1.test.oc1..<unique_ID>EXAMPLE-shapeId-Value",
types=oci.data_integration.models.TypeLibrary(
key="EXAMPLE-key-Value",
model_type="EXAMPLE-modelType-Value",
model_version="EXAMPLE-modelVersion-Value",
parent_ref=oci.data_integration.models.ParentReference(
parent="EXAMPLE-parent-Value",
root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
name="EXAMPLE-name-Value",
description="EXAMPLE-description-Value",
object_version=773,
types={
'EXAMPLE_KEY_ERc1m': {
'modelType': 'DERIVED_TYPE',
'key': 'EXAMPLE-key-Value',
'modelVersion': 'EXAMPLE-modelVersion-Value',
'parentRef': {
'parent': 'EXAMPLE-parent-Value',
'rootDocId': 'ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value'},
'name': 'EXAMPLE-name-Value',
'objectStatus': 339,
'description': 'EXAMPLE-description-Value'}},
object_status=72,
identifier="EXAMPLE-identifier-Value"),
entity_type="VIEW",
other_type_label="EXAMPLE-otherTypeLabel-Value",
unique_keys=[
oci.data_integration.models.PrimaryKey(
model_type="PRIMARY_KEY",
key="EXAMPLE-key-Value",
model_version="EXAMPLE-modelVersion-Value",
parent_ref=oci.data_integration.models.ParentReference(
parent="EXAMPLE-parent-Value",
root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
name="EXAMPLE-name-Value",
attribute_refs=[
oci.data_integration.models.KeyAttribute(
position=998,
shape_field=oci.data_integration.models.ShapeField(
model_type="SHAPE_FIELD",
key="EXAMPLE-key-Value",
model_version="EXAMPLE-modelVersion-Value",
parent_ref=oci.data_integration.models.ParentReference(
parent="EXAMPLE-parent-Value",
root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
config_values=oci.data_integration.models.ConfigValues(
config_param_values={
'EXAMPLE_KEY_VtK1X': {
'stringValue': 'EXAMPLE-stringValue-Value',
'intValue': 521,
'objectValue': 'EXAMPLE-objectValue-Value',
'refValue': 'EXAMPLE-refValue-Value',
'parameterValue': 'EXAMPLE-parameterValue-Value',
'rootObjectValue': 'EXAMPLE-rootObjectValue-Value'}},
parent_ref=oci.data_integration.models.ParentReference(
parent="EXAMPLE-parent-Value",
root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")),
object_status=17,
name="EXAMPLE-name-Value",
description="EXAMPLE-description-Value",
type="EXAMPLE-type-Value",
labels=["EXAMPLE--Value"],
native_shape_field=oci.data_integration.models.NativeShapeField(
name="EXAMPLE-name-Value",
model_type="EXAMPLE-modelType-Value",
type="EXAMPLE-type-Value",
config_values=oci.data_integration.models.ConfigValues(
config_param_values={
'EXAMPLE_KEY_w36Fb': {
'stringValue': 'EXAMPLE-stringValue-Value',
'intValue': 253,
'objectValue': 'EXAMPLE-objectValue-Value',
'refValue': 'EXAMPLE-refValue-Value',
'parameterValue': 'EXAMPLE-parameterValue-Value',
'rootObjectValue': 'EXAMPLE-rootObjectValue-Value'}},
parent_ref=oci.data_integration.models.ParentReference(
parent="EXAMPLE-parent-Value",
root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")),
position=980,
default_value_string="EXAMPLE-defaultValueString-Value",
is_mandatory=True)),
attribute=oci.data_integration.models.ShapeField(
model_type="SHAPE_FIELD",
key="EXAMPLE-key-Value",
model_version="EXAMPLE-modelVersion-Value",
parent_ref=oci.data_integration.models.ParentReference(
parent="EXAMPLE-parent-Value",
root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
config_values=oci.data_integration.models.ConfigValues(
config_param_values={
'EXAMPLE_KEY_CI8aG': {
'stringValue': 'EXAMPLE-stringValue-Value',
'intValue': 917,
'objectValue': 'EXAMPLE-objectValue-Value',
'refValue': 'EXAMPLE-refValue-Value',
'parameterValue': 'EXAMPLE-parameterValue-Value',
'rootObjectValue': 'EXAMPLE-rootObjectValue-Value'}},
parent_ref=oci.data_integration.models.ParentReference(
parent="EXAMPLE-parent-Value",
root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")),
object_status=354,
name="EXAMPLE-name-Value",
description="EXAMPLE-description-Value",
type="EXAMPLE-type-Value",
labels=["EXAMPLE--Value"],
native_shape_field=oci.data_integration.models.NativeShapeField(
name="EXAMPLE-name-Value",
model_type="EXAMPLE-modelType-Value",
type="EXAMPLE-type-Value",
config_values=oci.data_integration.models.ConfigValues(
config_param_values={
'EXAMPLE_KEY_BVtMP': {
'stringValue': 'EXAMPLE-stringValue-Value',
'intValue': 241,
'objectValue': 'EXAMPLE-objectValue-Value',
'refValue': 'EXAMPLE-refValue-Value',
'parameterValue': 'EXAMPLE-parameterValue-Value',
'rootObjectValue': 'EXAMPLE-rootObjectValue-Value'}},
parent_ref=oci.data_integration.models.ParentReference(
parent="EXAMPLE-parent-Value",
root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")),
position=764,
default_value_string="EXAMPLE-defaultValueString-Value",
is_mandatory=False)))],
object_status=81)],
foreign_keys=[
oci.data_integration.models.ForeignKey(
model_type="FOREIGN_KEY",
key="EXAMPLE-key-Value",
model_version="EXAMPLE-modelVersion-Value",
parent_ref=oci.data_integration.models.ParentReference(
parent="EXAMPLE-parent-Value",
root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
name="EXAMPLE-name-Value",
attribute_refs=[
oci.data_integration.models.KeyAttribute(
position=914,
shape_field=oci.data_integration.models.ShapeField(
model_type="SHAPE_FIELD",
key="EXAMPLE-key-Value",
model_version="EXAMPLE-modelVersion-Value",
parent_ref=oci.data_integration.models.ParentReference(
parent="EXAMPLE-parent-Value",
root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
config_values=oci.data_integration.models.ConfigValues(
config_param_values={
'EXAMPLE_KEY_uRBhL': {
'stringValue': 'EXAMPLE-stringValue-Value',
'intValue': 618,
'objectValue': 'EXAMPLE-objectValue-Value',
'refValue': 'EXAMPLE-refValue-Value',
'parameterValue': 'EXAMPLE-parameterValue-Value',
'rootObjectValue': 'EXAMPLE-rootObjectValue-Value'}},
parent_ref=oci.data_integration.models.ParentReference(
parent="EXAMPLE-parent-Value",
root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")),
object_status=339,
name="EXAMPLE-name-Value",
description="EXAMPLE-description-Value",
type="EXAMPLE-type-Value",
labels=["EXAMPLE--Value"],
native_shape_field=oci.data_integration.models.NativeShapeField(
name="EXAMPLE-name-Value",
model_type="EXAMPLE-modelType-Value",
type="EXAMPLE-type-Value",
config_values=oci.data_integration.models.ConfigValues(
config_param_values={
'EXAMPLE_KEY_3caMH': {
'stringValue': 'EXAMPLE-stringValue-Value',
'intValue': 835,
'objectValue': 'EXAMPLE-objectValue-Value',
'refValue': 'EXAMPLE-refValue-Value',
'parameterValue': 'EXAMPLE-parameterValue-Value',
'rootObjectValue': 'EXAMPLE-rootObjectValue-Value'}},
parent_ref=oci.data_integration.models.ParentReference(
parent="EXAMPLE-parent-Value",
root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")),
position=748,
default_value_string="EXAMPLE-defaultValueString-Value",
is_mandatory=False)),
attribute=oci.data_integration.models.ShapeField(
model_type="SHAPE_FIELD",
key="EXAMPLE-key-Value",
model_version="EXAMPLE-modelVersion-Value",
parent_ref=oci.data_integration.models.ParentReference(
parent="EXAMPLE-parent-Value",
root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
config_values=oci.data_integration.models.ConfigValues(
config_param_values={
'EXAMPLE_KEY_WGGoy': {
'stringValue': 'EXAMPLE-stringValue-Value',
'intValue': 266,
'objectValue': 'EXAMPLE-objectValue-Value',
'refValue': 'EXAMPLE-refValue-Value',
'parameterValue': 'EXAMPLE-parameterValue-Value',
'rootObjectValue': 'EXAMPLE-rootObjectValue-Value'}},
parent_ref=oci.data_integration.models.ParentReference(
parent="EXAMPLE-parent-Value",
root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")),
object_status=85,
name="EXAMPLE-name-Value",
description="EXAMPLE-description-Value",
type="EXAMPLE-type-Value",
labels=["EXAMPLE--Value"],
native_shape_field=oci.data_integration.models.NativeShapeField(
name="EXAMPLE-name-Value",
model_type="EXAMPLE-modelType-Value",
type="EXAMPLE-type-Value",
config_values=oci.data_integration.models.ConfigValues(
config_param_values={
'EXAMPLE_KEY_hfPn5': {
'stringValue': 'EXAMPLE-stringValue-Value',
'intValue': 334,
'objectValue': 'EXAMPLE-objectValue-Value',
'refValue': 'EXAMPLE-refValue-Value',
'parameterValue': 'EXAMPLE-parameterValue-Value',
'rootObjectValue': 'EXAMPLE-rootObjectValue-Value'}},
parent_ref=oci.data_integration.models.ParentReference(
parent="EXAMPLE-parent-Value",
root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")),
position=954,
default_value_string="EXAMPLE-defaultValueString-Value",
is_mandatory=True)))],
update_rule=725,
delete_rule=6,
reference_unique_key=oci.data_integration.models.UniqueDataKey(
model_type="UNIQUE_KEY",
key="EXAMPLE-key-Value",
model_version="EXAMPLE-modelVersion-Value",
parent_ref=oci.data_integration.models.ParentReference(
parent="EXAMPLE-parent-Value",
root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
name="EXAMPLE-name-Value",
attribute_refs=[
oci.data_integration.models.KeyAttribute(
position=230,
shape_field=oci.data_integration.models.ShapeField(
model_type="SHAPE_FIELD",
key="EXAMPLE-key-Value",
model_version="EXAMPLE-modelVersion-Value",
parent_ref=oci.data_integration.models.ParentReference(
parent="EXAMPLE-parent-Value",
root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
config_values=oci.data_integration.models.ConfigValues(
config_param_values={
'EXAMPLE_KEY_dmom3': {
'stringValue': 'EXAMPLE-stringValue-Value',
'intValue': 275,
'objectValue': 'EXAMPLE-objectValue-Value',
'refValue': 'EXAMPLE-refValue-Value',
'parameterValue': 'EXAMPLE-parameterValue-Value',
'rootObjectValue': 'EXAMPLE-rootObjectValue-Value'}},
parent_ref=oci.data_integration.models.ParentReference(
parent="EXAMPLE-parent-Value",
root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")),
object_status=702,
name="EXAMPLE-name-Value",
description="EXAMPLE-description-Value",
type="EXAMPLE-type-Value",
labels=["EXAMPLE--Value"],
native_shape_field=oci.data_integration.models.NativeShapeField(
name="EXAMPLE-name-Value",
model_type="EXAMPLE-modelType-Value",
type="EXAMPLE-type-Value",
config_values=oci.data_integration.models.ConfigValues(
config_param_values={
'EXAMPLE_KEY_bfiFj': {
'stringValue': 'EXAMPLE-stringValue-Value',
'intValue': 730,
'objectValue': 'EXAMPLE-objectValue-Value',
'refValue': 'EXAMPLE-refValue-Value',
'parameterValue': 'EXAMPLE-parameterValue-Value',
'rootObjectValue': 'EXAMPLE-rootObjectValue-Value'}},
parent_ref=oci.data_integration.models.ParentReference(
parent="EXAMPLE-parent-Value",
root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")),
position=500,
default_value_string="EXAMPLE-defaultValueString-Value",
is_mandatory=False)),
attribute=oci.data_integration.models.ShapeField(
model_type="SHAPE_FIELD",
key="EXAMPLE-key-Value",
model_version="EXAMPLE-modelVersion-Value",
parent_ref=oci.data_integration.models.ParentReference(
parent="EXAMPLE-parent-Value",
root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
config_values=oci.data_integration.models.ConfigValues(
config_param_values={
'EXAMPLE_KEY_AcdLh': {
'stringValue': 'EXAMPLE-stringValue-Value',
'intValue': 339,
'objectValue': 'EXAMPLE-objectValue-Value',
'refValue': 'EXAMPLE-refValue-Value',
'parameterValue': 'EXAMPLE-parameterValue-Value',
'rootObjectValue': 'EXAMPLE-rootObjectValue-Value'}},
parent_ref=oci.data_integration.models.ParentReference(
parent="EXAMPLE-parent-Value",
root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")),
object_status=509,
name="EXAMPLE-name-Value",
description="EXAMPLE-description-Value",
type="EXAMPLE-type-Value",
labels=["EXAMPLE--Value"],
native_shape_field=oci.data_integration.models.NativeShapeField(
name="EXAMPLE-name-Value",
model_type="EXAMPLE-modelType-Value",
type="EXAMPLE-type-Value",
config_values=oci.data_integration.models.ConfigValues(
config_param_values={
'EXAMPLE_KEY_fc06y': {
'stringValue': 'EXAMPLE-stringValue-Value',
'intValue': 70,
'objectValue': 'EXAMPLE-objectValue-Value',
'refValue': 'EXAMPLE-refValue-Value',
'parameterValue': 'EXAMPLE-parameterValue-Value',
'rootObjectValue': 'EXAMPLE-rootObjectValue-Value'}},
parent_ref=oci.data_integration.models.ParentReference(
parent="EXAMPLE-parent-Value",
root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")),
position=263,
default_value_string="EXAMPLE-defaultValueString-Value",
is_mandatory=False)))],
object_status=888),
object_status=656)],
resource_name="EXAMPLE-resourceName-Value",
data_format=oci.data_integration.models.DataFormat(
format_attribute=oci.data_integration.models.ParquetFormatAttribute(
model_type="PARQUET_FORMAT",
is_file_pattern=False,
compression="EXAMPLE-compression-Value"),
type="AVRO",
compression_config=oci.data_integration.models.Compression(
codec="SNAPPY")),
object_status=808,
identifier="EXAMPLE-identifier-Value"),
opc_request_id="RZOYLL8EQ6XH6XRHBRHY<unique_ID>",
opc_retry_token="EXAMPLE-opcRetryToken-Value",
if_match="EXAMPLE-ifMatch-Value")
# Get the data from response
print(create_entity_shape_response.data)