# 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.CreateEntityShapeFromSQL(
        model_type="SQL_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=129,
        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_iCbz1': {
                        'stringValue': 'EXAMPLE-stringValue-Value',
                        'intValue': 568,
                        '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=89,
            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=548,
                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=True,
                    object_status=942,
                    config_parameter_definitions={
                        'EXAMPLE_KEY_lLYzl': {
                            'parameterName': 'EXAMPLE-parameterName-Value',
                            'description': 'EXAMPLE-description-Value',
                            'defaultValue': 'EXAMPLE-defaultValue-Value',
                            'classFieldName': 'EXAMPLE-classFieldName-Value',
                            'isStatic': True,
                            'isClassFieldValue': True}}))),
        shape_id="ocid1.test.oc1..<unique_ID>EXAMPLE-shapeId-Value",
        entity_type="TABLE",
        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=467,
                        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_kDdad': {
                                        'stringValue': 'EXAMPLE-stringValue-Value',
                                        'intValue': 398,
                                        '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=940,
                            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_Uf21Z': {
                                            'stringValue': 'EXAMPLE-stringValue-Value',
                                            'intValue': 971,
                                            '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=378,
                                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_mOlSn': {
                                        'stringValue': 'EXAMPLE-stringValue-Value',
                                        'intValue': 907,
                                        '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=508,
                            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_eBG8v': {
                                            'stringValue': 'EXAMPLE-stringValue-Value',
                                            'intValue': 461,
                                            '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=212,
                                default_value_string="EXAMPLE-defaultValueString-Value",
                                is_mandatory=False)))],
                object_status=360)],
        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=638,
                        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_pdtgv': {
                                        'stringValue': 'EXAMPLE-stringValue-Value',
                                        'intValue': 323,
                                        '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=926,
                            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_3yTD6': {
                                            'stringValue': 'EXAMPLE-stringValue-Value',
                                            'intValue': 843,
                                            '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=340,
                                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_LbKeL': {
                                        'stringValue': 'EXAMPLE-stringValue-Value',
                                        'intValue': 634,
                                        '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=856,
                            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_qyjku': {
                                            'stringValue': 'EXAMPLE-stringValue-Value',
                                            'intValue': 898,
                                            '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=205,
                                default_value_string="EXAMPLE-defaultValueString-Value",
                                is_mandatory=False)))],
                update_rule=439,
                delete_rule=804,
                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=746,
                            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_yVicP': {
                                            'stringValue': 'EXAMPLE-stringValue-Value',
                                            'intValue': 939,
                                            '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=201,
                                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_EfNfx': {
                                                'stringValue': 'EXAMPLE-stringValue-Value',
                                                'intValue': 963,
                                                '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=816,
                                    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_cDTsa': {
                                            'stringValue': 'EXAMPLE-stringValue-Value',
                                            'intValue': 489,
                                            '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=239,
                                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_uY9at': {
                                                '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.data_integration.models.ParentReference(
                                            parent="EXAMPLE-parent-Value",
                                            root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")),
                                    position=457,
                                    default_value_string="EXAMPLE-defaultValueString-Value",
                                    is_mandatory=True)))],
                    object_status=822),
                object_status=154)],
        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="CSV",
            compression_config=oci.data_integration.models.Compression(
                codec="GZIP")),
        object_status=215,
        identifier="EXAMPLE-identifier-Value",
        sql_query="EXAMPLE-sqlQuery-Value"),
    opc_request_id="Q2RNHQJOGVEPFOHZPXPM<unique_ID>",
    opc_retry_token="EXAMPLE-opcRetryToken-Value",
    if_match="EXAMPLE-ifMatch-Value")

# Get the data from response
print(create_entity_shape_response.data)

Was this article helpful?