# 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
from datetime import datetime
# 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_data_asset_response = data_integration_client.create_data_asset(
workspace_id="ocid1.test.oc1..<unique_ID>EXAMPLE-workspaceId-Value",
create_data_asset_details=oci.data_integration.models.CreateDataAssetFromFusionApp(
model_type="FUSION_APP_DATA_ASSET",
name="EXAMPLE-name-Value",
identifier="EXAMPLE-identifier-Value",
key="EXAMPLE-key-Value",
model_version="EXAMPLE-modelVersion-Value",
description="EXAMPLE-description-Value",
object_status=673,
external_key="EXAMPLE-externalKey-Value",
asset_properties={
'EXAMPLE_KEY_4eMsq': 'EXAMPLE_VALUE_Rdwy7nkGEiBC1S4Z9Wro'},
registry_metadata=oci.data_integration.models.RegistryMetadata(
aggregator_key="EXAMPLE-aggregatorKey-Value",
labels=["EXAMPLE--Value"],
registry_version=902,
key="EXAMPLE-key-Value",
is_favorite=False),
service_url="EXAMPLE-serviceUrl-Value",
default_connection=oci.data_integration.models.CreateConnectionFromJdbc(
model_type="GENERIC_JDBC_CONNECTION",
name="EXAMPLE-name-Value",
identifier="EXAMPLE-identifier-Value",
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=954,
connection_properties=[
oci.data_integration.models.ConnectionProperty(
name="EXAMPLE-name-Value",
value="EXAMPLE-value-Value")],
registry_metadata=oci.data_integration.models.RegistryMetadata(
aggregator_key="EXAMPLE-aggregatorKey-Value",
labels=["EXAMPLE--Value"],
registry_version=666,
key="EXAMPLE-key-Value",
is_favorite=True),
username="EXAMPLE-username-Value",
password="EXAMPLE-password-Value",
password_secret=oci.data_integration.models.SensitiveAttribute(
secret_config=oci.data_integration.models.OciVaultSecretConfig(
model_type="OCI_VAULT_SECRET_CONFIG",
secret_id="ocid1.test.oc1..<unique_ID>EXAMPLE-secretId-Value"),
value="EXAMPLE-value-Value")),
staging_data_asset=oci.data_integration.models.DataAssetSummaryFromObjectStorage(
model_type="ORACLE_OBJECT_STORAGE_DATA_ASSET",
key="EXAMPLE-key-Value",
model_version="EXAMPLE-modelVersion-Value",
name="EXAMPLE-name-Value",
description="EXAMPLE-description-Value",
object_status=363,
identifier="EXAMPLE-identifier-Value",
external_key="EXAMPLE-externalKey-Value",
asset_properties={
'EXAMPLE_KEY_wzZlZ': 'EXAMPLE_VALUE_dQYBklOFe6i1OIIsODu3'},
native_type_system=oci.data_integration.models.TypeSystem(
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=665,
type_mapping_to={
'EXAMPLE_KEY_4IlhM': 'EXAMPLE_VALUE_mSIjuide4sKj6nf5pUR2'},
type_mapping_from={
'EXAMPLE_KEY_YgTV5': 'EXAMPLE_VALUE_aLS3QugZxqZJRwya4eCB'},
object_status=710,
identifier="EXAMPLE-identifier-Value",
types=[
oci.data_integration.models.DataType(
model_type="DATA_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=25,
description="EXAMPLE-description-Value",
dt_type="PRIMITIVE",
type_system_name="EXAMPLE-typeSystemName-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=410,
config_parameter_definitions={
'EXAMPLE_KEY_Nh39E': {
'parameterType': {
'modelType': 'CONFIGURED_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': 865,
'description': 'EXAMPLE-description-Value',
'wrappedType': 'EXAMPLE-wrappedType-Value',
'configValues': {
'configParamValues': {
'EXAMPLE_KEY_NC3tw': {
'stringValue': 'EXAMPLE-stringValue-Value',
'intValue': 197,
'objectValue': 'EXAMPLE-objectValue-Value',
'refValue': 'EXAMPLE-refValue-Value',
'parameterValue': 'EXAMPLE-parameterValue-Value',
'rootObjectValue': 'EXAMPLE-rootObjectValue-Value'}},
'parentRef': {
'parent': 'EXAMPLE-parent-Value',
'rootDocId': 'ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value'}}},
'parameterName': 'EXAMPLE-parameterName-Value',
'description': 'EXAMPLE-description-Value',
'defaultValue': 'EXAMPLE-defaultValue-Value',
'classFieldName': 'EXAMPLE-classFieldName-Value',
'isStatic': False,
'isClassFieldValue': False}}))]),
object_version=313,
parent_ref=oci.data_integration.models.ParentReference(
parent="EXAMPLE-parent-Value",
root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
metadata=oci.data_integration.models.ObjectMetadata(
created_by="EXAMPLE-createdBy-Value",
created_by_name="EXAMPLE-createdByName-Value",
updated_by="EXAMPLE-updatedBy-Value",
updated_by_name="EXAMPLE-updatedByName-Value",
time_created=datetime.strptime(
"2012-10-31T06:02:25.877Z",
"%Y-%m-%dT%H:%M:%S.%fZ"),
time_updated=datetime.strptime(
"2033-02-04T05:32:19.604Z",
"%Y-%m-%dT%H:%M:%S.%fZ"),
aggregator_key="EXAMPLE-aggregatorKey-Value",
aggregator=oci.data_integration.models.AggregatorSummary(
type="EXAMPLE-type-Value",
key="EXAMPLE-key-Value",
name="EXAMPLE-name-Value",
identifier="EXAMPLE-identifier-Value",
description="EXAMPLE-description-Value"),
identifier_path="EXAMPLE-identifierPath-Value",
info_fields={
'EXAMPLE_KEY_7noXA': 'EXAMPLE_VALUE_gcXSNQzP2oa0b9Iw7D6D'},
registry_version=783,
labels=["EXAMPLE--Value"],
is_favorite=True,
count_statistics=oci.data_integration.models.CountStatistic(
object_type_count_list=[
oci.data_integration.models.CountStatisticSummary(
object_type="FUNCTION_LIBRARY",
object_count=103)])),
oci_region="EXAMPLE-ociRegion-Value",
url="EXAMPLE-url-Value",
tenancy_id="ocid1.test.oc1..<unique_ID>EXAMPLE-tenancyId-Value",
namespace="EXAMPLE-namespace-Value",
default_connection=oci.data_integration.models.ConnectionSummaryFromObjectStorage(
model_type="ORACLE_OBJECT_STORAGE_CONNECTION",
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=998,
object_status=901,
identifier="EXAMPLE-identifier-Value",
primary_schema=oci.data_integration.models.Schema(
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",
resource_name="EXAMPLE-resourceName-Value",
description="EXAMPLE-description-Value",
object_version=661,
external_key="EXAMPLE-externalKey-Value",
is_has_containers=False,
default_connection="EXAMPLE-defaultConnection-Value",
object_status=120,
identifier="EXAMPLE-identifier-Value",
metadata=oci.data_integration.models.ObjectMetadata(
created_by="EXAMPLE-createdBy-Value",
created_by_name="EXAMPLE-createdByName-Value",
updated_by="EXAMPLE-updatedBy-Value",
updated_by_name="EXAMPLE-updatedByName-Value",
time_created=datetime.strptime(
"2000-06-17T15:15:15.079Z",
"%Y-%m-%dT%H:%M:%S.%fZ"),
time_updated=datetime.strptime(
"2002-05-24T19:19:48.517Z",
"%Y-%m-%dT%H:%M:%S.%fZ"),
aggregator_key="EXAMPLE-aggregatorKey-Value",
aggregator=oci.data_integration.models.AggregatorSummary(
type="EXAMPLE-type-Value",
key="EXAMPLE-key-Value",
name="EXAMPLE-name-Value",
identifier="EXAMPLE-identifier-Value",
description="EXAMPLE-description-Value"),
identifier_path="EXAMPLE-identifierPath-Value",
info_fields={
'EXAMPLE_KEY_9liUr': 'EXAMPLE_VALUE_DLPjICJ6bZnCyGoLlJHv'},
registry_version=413,
labels=["EXAMPLE--Value"],
is_favorite=True,
count_statistics=oci.data_integration.models.CountStatistic(
object_type_count_list=[
oci.data_integration.models.CountStatisticSummary(
object_type="DATA_FLOW",
object_count=423)]))),
connection_properties=[
oci.data_integration.models.ConnectionProperty(
name="EXAMPLE-name-Value",
value="EXAMPLE-value-Value")],
is_default=True,
metadata=oci.data_integration.models.ObjectMetadata(
created_by="EXAMPLE-createdBy-Value",
created_by_name="EXAMPLE-createdByName-Value",
updated_by="EXAMPLE-updatedBy-Value",
updated_by_name="EXAMPLE-updatedByName-Value",
time_created=datetime.strptime(
"2045-05-01T18:41:25.554Z",
"%Y-%m-%dT%H:%M:%S.%fZ"),
time_updated=datetime.strptime(
"2008-08-01T22:05:46.973Z",
"%Y-%m-%dT%H:%M:%S.%fZ"),
aggregator_key="EXAMPLE-aggregatorKey-Value",
aggregator=oci.data_integration.models.AggregatorSummary(
type="EXAMPLE-type-Value",
key="EXAMPLE-key-Value",
name="EXAMPLE-name-Value",
identifier="EXAMPLE-identifier-Value",
description="EXAMPLE-description-Value"),
identifier_path="EXAMPLE-identifierPath-Value",
info_fields={
'EXAMPLE_KEY_udbtJ': 'EXAMPLE_VALUE_V3ldNA1dFU1CXKJGf7MQ'},
registry_version=3,
labels=["EXAMPLE--Value"],
is_favorite=True,
count_statistics=oci.data_integration.models.CountStatistic(
object_type_count_list=[
oci.data_integration.models.CountStatisticSummary(
object_type="DATA_ASSET",
object_count=396)])),
key_map={
'EXAMPLE_KEY_Eg2HU': 'EXAMPLE_VALUE_ERICL2Blf1XX8oWk0lL4'},
credential_file_content="EXAMPLE-credentialFileContent-Value",
user_id="ocid1.test.oc1..<unique_ID>EXAMPLE-userId-Value",
finger_print="EXAMPLE-fingerPrint-Value",
pass_phrase="EXAMPLE-passPhrase-Value")),
staging_connection=oci.data_integration.models.ConnectionSummaryFromObjectStorage(
model_type="ORACLE_OBJECT_STORAGE_CONNECTION",
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=79,
object_status=71,
identifier="EXAMPLE-identifier-Value",
primary_schema=oci.data_integration.models.Schema(
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",
resource_name="EXAMPLE-resourceName-Value",
description="EXAMPLE-description-Value",
object_version=772,
external_key="EXAMPLE-externalKey-Value",
is_has_containers=True,
default_connection="EXAMPLE-defaultConnection-Value",
object_status=984,
identifier="EXAMPLE-identifier-Value",
metadata=oci.data_integration.models.ObjectMetadata(
created_by="EXAMPLE-createdBy-Value",
created_by_name="EXAMPLE-createdByName-Value",
updated_by="EXAMPLE-updatedBy-Value",
updated_by_name="EXAMPLE-updatedByName-Value",
time_created=datetime.strptime(
"2037-07-01T23:03:54.152Z",
"%Y-%m-%dT%H:%M:%S.%fZ"),
time_updated=datetime.strptime(
"2031-04-25T14:24:02.646Z",
"%Y-%m-%dT%H:%M:%S.%fZ"),
aggregator_key="EXAMPLE-aggregatorKey-Value",
aggregator=oci.data_integration.models.AggregatorSummary(
type="EXAMPLE-type-Value",
key="EXAMPLE-key-Value",
name="EXAMPLE-name-Value",
identifier="EXAMPLE-identifier-Value",
description="EXAMPLE-description-Value"),
identifier_path="EXAMPLE-identifierPath-Value",
info_fields={
'EXAMPLE_KEY_RgVSS': 'EXAMPLE_VALUE_aclLhBml24Ec0WFpR4T9'},
registry_version=940,
labels=["EXAMPLE--Value"],
is_favorite=False,
count_statistics=oci.data_integration.models.CountStatistic(
object_type_count_list=[
oci.data_integration.models.CountStatisticSummary(
object_type="CONNECTION",
object_count=871)]))),
connection_properties=[
oci.data_integration.models.ConnectionProperty(
name="EXAMPLE-name-Value",
value="EXAMPLE-value-Value")],
is_default=True,
metadata=oci.data_integration.models.ObjectMetadata(
created_by="EXAMPLE-createdBy-Value",
created_by_name="EXAMPLE-createdByName-Value",
updated_by="EXAMPLE-updatedBy-Value",
updated_by_name="EXAMPLE-updatedByName-Value",
time_created=datetime.strptime(
"2009-01-12T06:14:33.712Z",
"%Y-%m-%dT%H:%M:%S.%fZ"),
time_updated=datetime.strptime(
"2008-12-06T13:02:00.035Z",
"%Y-%m-%dT%H:%M:%S.%fZ"),
aggregator_key="EXAMPLE-aggregatorKey-Value",
aggregator=oci.data_integration.models.AggregatorSummary(
type="EXAMPLE-type-Value",
key="EXAMPLE-key-Value",
name="EXAMPLE-name-Value",
identifier="EXAMPLE-identifier-Value",
description="EXAMPLE-description-Value"),
identifier_path="EXAMPLE-identifierPath-Value",
info_fields={
'EXAMPLE_KEY_JbwpL': 'EXAMPLE_VALUE_AqXLusgG9sWObFFiNcVQ'},
registry_version=882,
labels=["EXAMPLE--Value"],
is_favorite=True,
count_statistics=oci.data_integration.models.CountStatistic(
object_type_count_list=[
oci.data_integration.models.CountStatisticSummary(
object_type="FUNCTION_LIBRARY",
object_count=808)])),
key_map={
'EXAMPLE_KEY_qbR9k': 'EXAMPLE_VALUE_YPSRWkKFHxgG2rgDDL3G'},
credential_file_content="EXAMPLE-credentialFileContent-Value",
user_id="ocid1.test.oc1..<unique_ID>EXAMPLE-userId-Value",
finger_print="EXAMPLE-fingerPrint-Value",
pass_phrase="EXAMPLE-passPhrase-Value"),
bucket_schema=oci.data_integration.models.Schema(
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",
resource_name="EXAMPLE-resourceName-Value",
description="EXAMPLE-description-Value",
object_version=103,
external_key="EXAMPLE-externalKey-Value",
is_has_containers=False,
default_connection="EXAMPLE-defaultConnection-Value",
object_status=904,
identifier="EXAMPLE-identifier-Value",
metadata=oci.data_integration.models.ObjectMetadata(
created_by="EXAMPLE-createdBy-Value",
created_by_name="EXAMPLE-createdByName-Value",
updated_by="EXAMPLE-updatedBy-Value",
updated_by_name="EXAMPLE-updatedByName-Value",
time_created=datetime.strptime(
"2001-08-13T23:13:04.003Z",
"%Y-%m-%dT%H:%M:%S.%fZ"),
time_updated=datetime.strptime(
"2019-06-05T17:44:05.536Z",
"%Y-%m-%dT%H:%M:%S.%fZ"),
aggregator_key="EXAMPLE-aggregatorKey-Value",
aggregator=oci.data_integration.models.AggregatorSummary(
type="EXAMPLE-type-Value",
key="EXAMPLE-key-Value",
name="EXAMPLE-name-Value",
identifier="EXAMPLE-identifier-Value",
description="EXAMPLE-description-Value"),
identifier_path="EXAMPLE-identifierPath-Value",
info_fields={
'EXAMPLE_KEY_Fjm3n': 'EXAMPLE_VALUE_NuUu4S7LSKL21nt68Di5'},
registry_version=589,
labels=["EXAMPLE--Value"],
is_favorite=False,
count_statistics=oci.data_integration.models.CountStatistic(
object_type_count_list=[
oci.data_integration.models.CountStatisticSummary(
object_type="DATA_ASSET",
object_count=53)])))),
opc_request_id="DWZWT7AJ0QIRXLJ1OQCR<unique_ID>",
opc_retry_token="EXAMPLE-opcRetryToken-Value")
# Get the data from response
print(create_data_asset_response.data)