# 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_task_response = data_integration_client.create_task(
workspace_id="ocid1.test.oc1..<unique_ID>EXAMPLE-workspaceId-Value",
create_task_details=oci.data_integration.models.CreateTaskFromOCIDataflowTask(
model_type="OCI_DATAFLOW_TASK",
name="EXAMPLE-name-Value",
identifier="EXAMPLE-identifier-Value",
registry_metadata=oci.data_integration.models.RegistryMetadata(
aggregator_key="EXAMPLE-aggregatorKey-Value",
labels=["EXAMPLE--Value"],
registry_version=31,
key="EXAMPLE-key-Value",
is_favorite=True),
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"),
description="EXAMPLE-description-Value",
object_status=770,
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_jNbko': {
'stringValue': 'EXAMPLE-stringValue-Value',
'intValue': 910,
'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=849,
name="EXAMPLE-name-Value",
description="EXAMPLE-description-Value",
port_type="CONTROL",
fields=[
oci.data_integration.models.InputField(
model_type="INPUT_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_YpSnd': {
'stringValue': 'EXAMPLE-stringValue-Value',
'intValue': 985,
'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=921,
name="EXAMPLE-name-Value",
description="EXAMPLE-description-Value",
type=oci.data_integration.models.DerivedType(
model_type="DERIVED_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=506,
description="EXAMPLE-description-Value"),
labels=["EXAMPLE--Value"])])],
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_3963g': {
'stringValue': 'EXAMPLE-stringValue-Value',
'intValue': 61,
'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=664,
name="EXAMPLE-name-Value",
description="EXAMPLE-description-Value",
port_type="DATA",
fields=[
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_AI6oN': {
'stringValue': 'EXAMPLE-stringValue-Value',
'intValue': 302,
'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=374,
name="EXAMPLE-name-Value",
description="EXAMPLE-description-Value",
type=oci.data_integration.models.MapType(
model_type="MAP_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=944,
description="EXAMPLE-description-Value",
key_element_type="EXAMPLE-keyElementType-Value",
value_element_type="EXAMPLE-valueElementType-Value",
contains_null=True))])],
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_zGDkx': {
'stringValue': 'EXAMPLE-stringValue-Value',
'intValue': 295,
'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=2,
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=False,
is_output=True,
output_aggregation_type="COUNT",
type_name="EXAMPLE-typeName-Value",
used_for="EXAMPLE-usedFor-Value")],
op_config_values=oci.data_integration.models.ConfigValues(
config_param_values={
'EXAMPLE_KEY_KTn4k': {
'stringValue': 'EXAMPLE-stringValue-Value',
'intValue': 307,
'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")),
config_provider_delegate=oci.data_integration.models.CreateConfigProvider(
bindings={
'EXAMPLE_KEY_xDfi7': {
'simpleValue': 'EXAMPLE-simpleValue-Value',
'rootObjectValue': 'EXAMPLE-rootObjectValue-Value'}}),
is_concurrent_allowed=False,
dataflow_application=oci.data_integration.models.DataflowApplication(
application_id="ocid1.test.oc1..<unique_ID>EXAMPLE-applicationId-Value",
compartment_id="ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value",
config_values=oci.data_integration.models.ConfigValues(
config_param_values={
'EXAMPLE_KEY_fZb4T': {
'stringValue': 'EXAMPLE-stringValue-Value',
'intValue': 382,
'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"))),
driver_shape_details=oci.data_integration.models.ShapeDetails(
config_values=oci.data_integration.models.ConfigValues(
config_param_values={
'EXAMPLE_KEY_LNUnY': {
'stringValue': 'EXAMPLE-stringValue-Value',
'intValue': 622,
'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"))),
executor_shape_details=oci.data_integration.models.ShapeDetails(
config_values=oci.data_integration.models.ConfigValues(
config_param_values={
'EXAMPLE_KEY_vlOBL': {
'stringValue': 'EXAMPLE-stringValue-Value',
'intValue': 129,
'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")))),
opc_retry_token="EXAMPLE-opcRetryToken-Value",
opc_request_id="YJAQVRJQJK4XHYF5JO0I<unique_ID>")
# Get the data from response
print(create_task_response.data)