# 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=664,
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_SVobH': {
'stringValue': 'EXAMPLE-stringValue-Value',
'intValue': 436,
'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=636,
name="EXAMPLE-name-Value",
description="EXAMPLE-description-Value",
type=oci.data_integration.models.ArrayType(
model_type="ARRAY_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=109,
description="EXAMPLE-description-Value",
element_type="EXAMPLE-elementType-Value")),
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=159,
types={
'EXAMPLE_KEY_M3sh8': {
'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': 95,
'description': 'EXAMPLE-description-Value'}},
object_status=305,
identifier="EXAMPLE-identifier-Value"),
entity_type="STREAM",
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=235,
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_sbSyO': {
'stringValue': 'EXAMPLE-stringValue-Value',
'intValue': 381,
'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=179,
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_EQEPu': {
'stringValue': 'EXAMPLE-stringValue-Value',
'intValue': 695,
'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=702,
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_NiD9y': {
'stringValue': 'EXAMPLE-stringValue-Value',
'intValue': 78,
'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=961,
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_RRHKP': {
'stringValue': 'EXAMPLE-stringValue-Value',
'intValue': 443,
'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=1,
default_value_string="EXAMPLE-defaultValueString-Value",
is_mandatory=False)))],
object_status=799)],
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=496,
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_zYZsv': {
'stringValue': 'EXAMPLE-stringValue-Value',
'intValue': 510,
'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=736,
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_HSAjM': {
'stringValue': 'EXAMPLE-stringValue-Value',
'intValue': 571,
'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=422,
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_6ZOF1': {
'stringValue': 'EXAMPLE-stringValue-Value',
'intValue': 473,
'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=96,
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_b0tP7': {
'stringValue': 'EXAMPLE-stringValue-Value',
'intValue': 794,
'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=521,
default_value_string="EXAMPLE-defaultValueString-Value",
is_mandatory=False)))],
update_rule=85,
delete_rule=845,
reference_unique_key=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=266,
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_7GTvK': {
'stringValue': 'EXAMPLE-stringValue-Value',
'intValue': 980,
'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=101,
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_HtxoJ': {
'stringValue': 'EXAMPLE-stringValue-Value',
'intValue': 203,
'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=731,
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_F2CEY': {
'stringValue': 'EXAMPLE-stringValue-Value',
'intValue': 328,
'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=579,
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_MB5Jp': {
'stringValue': 'EXAMPLE-stringValue-Value',
'intValue': 446,
'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=239,
default_value_string="EXAMPLE-defaultValueString-Value",
is_mandatory=True)))],
object_status=938),
object_status=527)],
resource_name="EXAMPLE-resourceName-Value",
data_format=oci.data_integration.models.DataFormat(
format_attribute=oci.data_integration.models.AvroFormatAttribute(
model_type="AVRO_FORMAT",
is_file_pattern=True,
compression="EXAMPLE-compression-Value"),
type="PARQUET",
compression_config=oci.data_integration.models.Compression(
codec="AUTO")),
object_status=335,
identifier="EXAMPLE-identifier-Value"),
opc_request_id="H3LQLHOINAVBXVFFFI6G<unique_ID>",
opc_retry_token="EXAMPLE-opcRetryToken-Value",
if_match="EXAMPLE-ifMatch-Value")
# Get the data from response
print(create_entity_shape_response.data)