# 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
update_task_response = data_integration_client.update_task(
workspace_id="ocid1.test.oc1..<unique_ID>EXAMPLE-workspaceId-Value",
task_key="EXAMPLE-taskKey-Value",
update_task_details=oci.data_integration.models.UpdateTaskFromSQLTask(
model_type="SQL_TASK",
key="EXAMPLE-key-Value",
object_version=544,
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_status=859,
identifier="EXAMPLE-identifier-Value",
input_ports=[
oci.data_integration.models.InputPort(
model_type="INPUT_PORT",
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_R3QX0': {
'stringValue': 'EXAMPLE-stringValue-Value',
'intValue': 308,
'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=41,
name="EXAMPLE-name-Value",
description="EXAMPLE-description-Value",
port_type="CONTROL",
fields=[
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_1dIPE': {
'stringValue': 'EXAMPLE-stringValue-Value',
'intValue': 694,
'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=58,
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_DzQT7': {
'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.data_integration.models.ParentReference(
parent="EXAMPLE-parent-Value",
root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")),
position=612,
default_value_string="EXAMPLE-defaultValueString-Value",
is_mandatory=False))])],
output_ports=[
oci.data_integration.models.OutputPort(
model_type="OUTPUT_PORT",
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_c45tH': {
'stringValue': 'EXAMPLE-stringValue-Value',
'intValue': 7,
'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=513,
name="EXAMPLE-name-Value",
description="EXAMPLE-description-Value",
port_type="MODEL",
fields=[
oci.data_integration.models.ConditionalOutputPort(
model_type="CONDITIONAL_OUTPUT_PORT",
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_15xbs': {
'stringValue': 'EXAMPLE-stringValue-Value',
'intValue': 312,
'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=912,
name="EXAMPLE-name-Value",
description="EXAMPLE-description-Value",
port_type="CONTROL",
split_condition=oci.data_integration.models.Expression(
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"),
expr_string="EXAMPLE-exprString-Value",
config_values=oci.data_integration.models.ConfigValues(
config_param_values={
'EXAMPLE_KEY_ci7i6': {
'stringValue': 'EXAMPLE-stringValue-Value',
'intValue': 46,
'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=744))])],
parameters=[
oci.data_integration.models.Parameter(
model_type="PARAMETER",
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_Dd1Ne': {
'stringValue': 'EXAMPLE-stringValue-Value',
'intValue': 799,
'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=979,
name="EXAMPLE-name-Value",
description="EXAMPLE-description-Value",
type="EXAMPLE-type-Value",
default_value="EXAMPLE-defaultValue-Value",
root_object_default_value="EXAMPLE-rootObjectDefaultValue-Value",
is_input=True,
is_output=False,
output_aggregation_type="SUM",
type_name="EXAMPLE-typeName-Value",
used_for="EXAMPLE-usedFor-Value")],
op_config_values=oci.data_integration.models.ConfigValues(
config_param_values={
'EXAMPLE_KEY_T42RP': {
'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")),
is_concurrent_allowed=True,
registry_metadata=oci.data_integration.models.RegistryMetadata(
aggregator_key="EXAMPLE-aggregatorKey-Value",
labels=["EXAMPLE--Value"],
registry_version=615,
key="EXAMPLE-key-Value",
is_favorite=True),
script=oci.data_integration.models.Script(
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"),
object_status=293),
sql_script_type="STORED_PROCEDURE",
operation="EXAMPLE-operation-Value"),
opc_request_id="HPIDHNIA4V1PFL1G3PGV<unique_ID>",
if_match="EXAMPLE-ifMatch-Value")
# Get the data from response
print(update_task_response.data)