Deleting records using Segments

This topic explains how to delete records from Oracle Unity using segments created in Oracle Unity.

Important: Please ensure that you validate the data you are configuring through a data deletion job. This data would be permanently deleted and cannot be recovered.

In this topic:

Introduction

If you need to delete records from Oracle Unity matching a segment criteria, you can create a delete job to process the deletion. To create a delete job using the UI, refer to Deleting records using segments. Then you need to publish the changes and run the delete job.

Workflow

Leveraging the Data Deletion Job API endpoints generally resembles this workflow:

Step Task
1 Create the delete job
2

Publish the changes

3 Run the delete job
4 Run the ID Resolution and Customer 360 jobs
5 Review the data deletion report

Creating Data Deletion Jobs

Configure the delete job that will delete all data from a segment.

Request URL

POST https://[accountUrl]/api/cx-unity-api/jobs

Request Body Parameters

Parameter Type Required? Description
job Object Yes Describes the details of job. See job below.
notifications Object No Describes the details of the email notification to be sent. See notifications below.

Nested schema: job

Parameter Type Required? Description
name String Yes Enter a name for the new data deletion job.
description String Yes Enter a description for the data deletion job.
active Boolean Yes Whether the data deletion job is active. A job must be active to start.
jobId String Yes Enter a unique string to identify the data deletion job.
jobData Object Yes Describes the type of data to delete. See jobData below.

Nested schema: notifications

Parameter Type Required? Description
only_failure Boolean Yes If true, notification is sent only in case of a failure.
list Array of Strings Yes List of email ids to which the notification needs to be send to.

Nested schema: job >jobData

Parameter Type Required? Description
ctype String Yes Must be set to .DataCleanJobData.
templateInfo Object Yes Instructs the data deletion job where to write the data deletion report. See templateInfo below.
workflowComponentConfig Object No

specifies more details related to the the destination configured under templateInfo > workflowComponents. See workflowComponentConfig below.

If the workflowComponentConfig is not specified , the Encryption Key and the File Name configured at the destination will be used for the report generation

tableOptions Object No Provides details about the data to delete. See tableOptions below.
idGraphOptions Object No

Removes all data from the Customer 360 dataset. After data is deleted, you must run the Customer 360 job to repopulate data. See idGraphOptions below.

If omitted, no truncation will happen.

cubeOptions Object No

Removes all data from data source views and cubes. After data is deleted, you must run the ID resolution job to repopulate data. See cubeOptions below.

If omitted, no truncation will happen.

Nested schema: jobData > templateInfo > workflowComponents

Parameter Type Required? Description
left String Yes Must be sink (this is the system's name for a destination).
right String Yes When a data deletion job completes successfully, a data deletion report is created. You can store this report in a destination. For this parameter, enter the ID of the destination to store the data deletion report.

Nested schema: jobData > workflowComponentConfigSFTPDestination

Parameter Type Required? Description
fileName String No

Name of the report that will be generated when we run the job.

If there is no fileName provided during the destination creation , provide it here or else the job will fail to run successfully.

encryptionKey String No The key used to encrypt data.

Nested schema: jobData > tableOptions

Parameter Type Required? Description
delete String No

Data deletion options for Raw(R), Raw Streaming(RS) and Data Warehouse(DW) tables.

Nested schema: tableOptions > delete

Parameter Type Required? Description Possible Values
tableTypes Array of Strings Yes

A list of locations to delete data from (it is recommended to include all three):

  • DW: Delete data from data warehouse data objects.

  • R: Delete data from raw data objects.

  • RS: Delete raw ingested data from the Stream API.

  • DW

  • R

  • RS

cascadeMode Array of Strings Yes

Determines whether the data deletion will cascade to other data objects. Only applicable to customer, account, and custom data objects:

  • SIMPLE: Deletes data records from the specified data object and data from any data objects related by foreign key. For example, the Customer data object has foreign keys with several other data objects, including Address and Order. Any data deleted from the Customer data object will also result in any related data to also be deleted from Address and Order, as well as other related data objects.

  • OFF: Deletes data records only from the specified data object.

  • SIMPLE

  • OFF

deleteRequestTables Array of Strings No

List of delete request tables. If omitted the default is to use DataDeletionRequests.

Example:

...
"tableOptions": {    
  "delete": {                       
    "deleteRequestTables": [
      "DataDeletionRequests",
      "DataCleanRequests"
    ],
  ...
  }
},
...

Note: You can specify one or more tables to be used for data deletion requests.

queryDeleteOptions Array of Strings No Provides data to be deleted as an outcome of executing the MCPS query.  

Nested schema: deletequeryDeleteOptions

Parameter Type Required? Description
mcpsQueryId String Yes

MCPS Query Id which will be executed to get the data to be deleted.

queryObjectIdColumn String Yes ID Column of table (mostly the primary key).
object String Yes Table from which data needs to be deleted.

Nested schema: jobData > idGraphOptions

Parameter Type Required? Description
truncate Object No

If present, all customer 360 data will be truncated when data clean job run. You need to re-run Customer 360 job to re-populate customer 360 data.

Nested schema: idGraphOptions > truncate

Parameter Type Required? Description
N/A    

No attributes for truncate.

Nested schema: jobData > cubeOptions

Parameter Type Required? Description
truncate Object No

If present, cubes will be truncated when data clean job run. You need to re-run ID Resolution job to re-populate the cubes after truncation.

Nested schema: cubeOptions > truncate

Parameter Type Required? Description
N/A    

No attributes for truncate.

Examples

Creating a Data Deletion Job

Create a data deletion job to delete data from your activation snapshot.

Request URL

POST https://[accountUrl]/api/cx-unity-api/jobs

Request Body

    {
    "tenantId": 100588,
    "name": "TestDeleteViaSegments",
    "versionTS": 1651635450838,
    "description": "demo segmemts",
    "active": true,
    "lastModifiedBy": "6fe22de0e2934d3a86b4cae68b4734f1",
    "createdBy": "6fe22de0e2934d3a86b4cae68b4734f1",
    "createdTS": 1651635276394,
    "jobId": "TestDeleteViaSegments",
    "jobData": {
      "ctype": ".DataCleanJobData",
      "tableOptions": {
        "delete": {
          "tableTypes": [
            "DW",
            "R",
            "RS"
          ],
          "cascadeMode": "SIMPLE",
          "queryDeleteOptions": [
            {
              "mcpsQueryId": "cxu_oNMxL7fkRum3uk7ynKdwFQ",
              "queryObjectIdColumn": "Customer_ID",
              "object": "Customer"
            }
          ]
        }
      },
      "idGraphOptions": {
        "truncate": {}
      },
      "cubeOptions": {
        "truncate": {}
      },
      "templateInfo": {
        "workflowComponents": [
          {
            "left": "SINK",
            "right": "SFTPDestination"
          }
        ],
        "workflowComponentConfig": {
          "SFTPDestination": {
            "fileName": "ss",
            "fileCompressionFormat": "gzip"
          }
        }
      }
    },
    "schedule": {
      "cronExpression": "1 0 0 ? * *"
    },
    "notifications": [
      {
        "left": "HTTP",
        "right": "15e6b4abb92c4cd69094d2227b02098a"
      }
    ]
  }

Updating a Data Deletion Job

Use this endpoint to update an existing data deletion job.

Request URL

PUT https://[accountUrl]/api/cx-unity-api/jobs/DATACLEAN/{jobId}

Request Body

{
    "tenantId": 100588,
    "name": "TestDeleteViaSegments",
    "versionTS": 1651635450838,
    "description": "demo segmemtsx",
    "active": true,
    "lastModifiedBy": "6fe22de0e2934d3a86b4cae68b4734f1",
    "createdBy": "6fe22de0e2934d3a86b4cae68b4734f1",
    "createdTS": 1651635276394,
    "jobId": "TestDeleteViaSegments",
    "jobData": {
      "ctype": ".DataCleanJobData",
      "tableOptions": {
        "delete": {
          "tableTypes": [
            "DW",
            "R",
            "RS"
          ],
          "cascadeMode": "SIMPLE",
          "queryDeleteOptions": [
            {
              "mcpsQueryId": "cxu_oNMxL7fkRum3uk7ynKdwFQ",
              "queryObjectIdColumn": "Customer_ID",
              "object": "Customer"
            }
          ]
        }
      },
      "idGraphOptions": {
        "truncate": {}
      },
      "cubeOptions": {
        "truncate": {}
      },
      "templateInfo": {
        "workflowComponents": [
          {
            "left": "SINK",
            "right": "SFTPDestination"
          }
        ],
        "workflowComponentConfig": {
          "SFTPDestination": {
            "fileName": "ss",
            "fileCompressionFormat": "gzip"
          }
        }
      }
    },
    "schedule": {
      "cronExpression": "1 0 0 ? * *"
    },
    "notifications": [
      {
        "left": "HTTP",
        "right": "15e6b4abb92c4cd69094d2227b02098a"
      }
    ]
  }

Retrieving a List of Data Deletion Jobs

Use this endpoint to retrieve a list of data deletion jobs in your instance.

Request URL

GET https://[accountUrl]/api/cx-unity-api/jobs/DATACLEAN

Response

A successful response returns a list of data deletion jobs in your instance.

[
  {
      "tenantId": 100588,
      "name": "TestDeleteViaSegments",
      "versionTS": 1651635450838,
      "description": "demo segmemtsx",
      "active": true,
      "lastModifiedBy": "6fe22de0e2934d3a86b4cae68b4734f1",
      "createdBy": "6fe22de0e2934d3a86b4cae68b4734f1",
      "createdTS": 1651635276394,
      "jobId": "TestDeleteViaSegments",
      "jobData": {
         "ctype": ".DataCleanJobData",
         "tableOptions": {
            "delete": {
               "tableTypes": [
                  "DW",
                  "R",
                  "RS"
               ],
               "cascadeMode": "SIMPLE",
               "queryDeleteOptions": [
                  {
                     "mcpsQueryId": "cxu_oNMxL7fkRum3uk7ynKdwFQ",
                     "queryObjectIdColumn": "Customer_ID",
                     "object": "Customer"
                  }
               ]
            }
         },
         "idGraphOptions": {
            "truncate": {}
         },
         "cubeOptions": {
            "truncate": {}
         },
         "templateInfo": {
            "workflowComponents": [
               {
                  "left": "SINK",
                  "right": "SFTPDestination"
               }
            ],
            "workflowComponentConfig": {
               "SFTPDestination": {
                  "fileName": "ss",
                  "fileCompressionFormat": "gzip"
               }
            }
         }
      },
      "schedule": {
         "cronExpression": "1 0 0 ? * *"
      },
      "notifications": [
         {
            "left": "HTTP",
            "right": "15e6b4abb92c4cd69094d2227b02098a"
         }
      ]
   },
   {
      "tenantId": 100588,
      "name": "Delsegment 1",
      "versionTS": 1651681867139,
      "description": "validate - segment directly",
      "active": true,
      "lastModifiedBy": "28de4239abcc4de796dd2445b8b3c40a",
      "createdBy": "28de4239abcc4de796dd2445b8b3c40a",
      "createdTS": 1651681537291,
      "jobId": "Delsegment_1",
      "jobData": {
         "ctype": ".DataCleanJobData",
         "tableOptions": {
            "delete": {
               "tableTypes": [
                  "DW",
                  "R",
                  "RS"
               ],
               "cascadeMode": "OFF",
               "queryDeleteOptions": [
                  {
                     "mcpsQueryId": "cxu_ILeSXxMTR1692NsryAfnVQ",
                     "queryObjectIdColumn": "Customer_ID",
                     "object": "Customer"
                  }
               ]
            }
         },
         "templateInfo": {
            "workflowComponents": [
               {
                  "left": "SINK",
                  "right": "Destination22_4"
               }
            ],
            "workflowComponentConfig": {
               "Destination22_4": {
                  "fileName": "Delsegment 1",
                  "fileCompressionFormat": "gzip"
               }
            }
         }
      },
      "notifications": [
         {
            "left": "HTTP",
            "right": "7b23e7ce64fb428cbad14643e706a725"
         }
      ]
   }
]

Retrieving a Data Deletion Job

Use this endpoint to retrieve a specific data deletion job, specified using the Job ID.

Request URL

GET https://[accountUrl]/api/cx-unity-api/jobs/DATACLEAN/{jobId}

Response

A successful response returns details about the specified data deletion job.

[
  {
    "tenantId": 100588,
    "name": "TestDeleteViaSegments",
    "versionTS": 1651635450838,
    "description": "demo segmemtsx",
    "active": true,
    "lastModifiedBy": "6fe22de0e2934d3a86b4cae68b4734f1",
    "createdBy": "6fe22de0e2934d3a86b4cae68b4734f1",
    "createdTS": 1651635276394,
    "jobId": "TestDeleteViaSegments",
    "jobData": {
      "ctype": ".DataCleanJobData",
      "tableOptions": {
        "delete": {
          "tableTypes": [
            "DW",
            "R",
            "RS"
          ],
          "cascadeMode": "SIMPLE",
          "queryDeleteOptions": [
            {
              "mcpsQueryId": "cxu_oNMxL7fkRum3uk7ynKdwFQ",
              "queryObjectIdColumn": "Customer_ID",
              "object": "Customer"
            }
          ]
        }
      },
      "idGraphOptions": {
        "truncate": {}
      },
      "cubeOptions": {
        "truncate": {}
      },
      "templateInfo": {
        "workflowComponents": [
          {
            "left": "SINK",
            "right": "SFTPDestination"
          }
        ],
        "workflowComponentConfig": {
          "SFTPDestination": {
            "fileName": "ss",
            "fileCompressionFormat": "gzip"
          }
        }
      }
    },
    "schedule": {
      "cronExpression": "1 0 0 ? * *"
    },
    "notifications": [
      {
        "left": "HTTP",
        "right": "15e6b4abb92c4cd69094d2227b02098a"
      }
    ]
  }
]

Deleting a Data Deletion Job

Use this endpoint to delete existing Data Deletion Jobs, specified by the Job ID.

Request URL

DELETE https://[accountUrl]/api/cx-unity-api/jobs/DATACLEAN/{jobId}/delete

Request Body

{
    "jobType":"DATACLEAN",
    "jobId":"jobId"
}

Response

A successful response returns a 200 OK status.

{
    "jobStatus": "deleted",
    "message": "deleted"
}

Starting Data Deletion Jobs

Use this endpoint to start running a data deletion job. Remember to publish your changes before starting jobs.

Request URL

POST https://[accountUrl]/api/cx-unity-api/jobs/DATACLEAN/{jobId}/restart

Request Body

{
    "jobType":"DATACLEAN",
    "jobId":"jobId"
}

Response

{
    "jobStatus": "STARTING",
    "message": "OK"
}

Stopping Data Deletion Jobs

Use this endpoint to stop a running data deletion job.

Important: Stopping a data deletion job will not recover the data records already deleted.

Request URL

POST https://[accountUrl]/api/cx-unity-api/jobs/DATACLEAN/{jobId}/stop

Request Body

{
    "jobType":"DATACLEAN",
    "jobId":"jobId"
}

Response

{
    "jobStatus": "KILLED",
    "message": "OK"
}

Retrieving a List of Job Runs

Use this endpoint to retrieve a list of data deletion job runs. After jobs are started, it can take up to a minute before the job run details can be retrieved.

Request URL

GET https://[accountUrl]/api-admin/v1/{access-key}/admin/job/DATACLEAN/{jobId}/runs

Response

A successful response returns a list of data deletion job runs.

[
  {
    "runId": "55ed528ec4aa11ec97af0200170bef42",
    "startTs": 1650899640000,
    "status": "RUNNING",
    "properties": {
      "runtimeArgs": "{\"logical.start.time\":\"1650899640674\",\"task.mapper.system.resources.memory\":\"4096\",\"mcps.api.admin.job.audit.id\":\"f3e8aadcc513464199409542474c000d\",\"mcps.api.admin.job.started.by.user.flag\":\"true\",\"task.executor.system.resources.cores\":\"1\",\"mcps.api.admin.job.admin.action.type\":\"JOB_START\",\"task.executor.system.resources.memory\":\"4096\",\"mcps.api.admin.job.started.username\":\"6fe22de0e2934d3a86b4cae68b4734f1\"}",
      "phase-4": "04e63451-c4ab-11ec-b69a-02001705b0a3"
    }
  },
  {
    "runId": "3c188bfdb70a11ec828d0200170bef42",
    "startTs": 1649401512000,
    "endTs": 1649401909000,
    "status": "COMPLETED",
    "properties": {
      "runtimeArgs": "{\"logical.start.time\":\"1649401512744\",\"task.mapper.system.resources.memory\":\"4096\",\"mcps.api.admin.job.audit.id\":\"6b0f2accfe104f9082863f24ff495b06\",\"mcps.api.admin.job.started.by.user.flag\":\"true\",\"task.executor.system.resources.cores\":\"1\",\"mcps.api.admin.job.admin.action.type\":\"JOB_START\",\"task.executor.system.resources.memory\":\"4096\",\"mcps.api.admin.job.started.username\":\"6fe22de0e2934d3a86b4cae68b4734f1\"}",
      "phase-4": "ab796b61-b70a-11ec-95a4-02001705b0a3"
    }
  },
  {
    "runId": "85f36f6ab53c11eca75c020017066782",
    "startTs": 1649203209000,
    "endTs": 1649203521000,
    "status": "FAILED",
    "properties": {
      "runtimeArgs": "{\"scheduleName\":\"dataPipelineSchedule\",\"logical.start.time\":\"1649203209147\",\"task.mapper.system.resources.memory\":\"4096\",\"task.executor.system.resources.cores\":\"1\",\"task.executor.system.resources.memory\":\"4096\"}"
    }
  },
  {
    "runId": "5d7aa9afb47311ec9d5e020017066782",
    "startTs": 1649116812000,
    "endTs": 1649119362000,
    "status": "FAILED",
    "properties": {
      "runtimeArgs": "{\"scheduleName\":\"dataPipelineSchedule\",\"logical.start.time\":\"1649116812411\",\"task.mapper.system.resources.memory\":\"4096\",\"task.executor.system.resources.cores\":\"1\",\"task.executor.system.resources.memory\":\"4096\"}"
    }
  },
  {
    "runId": "331e2ee7b3aa11ecbde5020017066782",
    "startTs": 1649030412000,
    "endTs": 1649031805000,
    "status": "COMPLETED",
    "properties": {
      "runtimeArgs": "{\"scheduleName\":\"dataPipelineSchedule\",\"logical.start.time\":\"1649030412498\",\"task.mapper.system.resources.memory\":\"4096\",\"task.executor.system.resources.cores\":\"1\",\"task.executor.system.resources.memory\":\"4096\"}",
      "phase-4": "59a16921-b3ac-11ec-956e-020017067caf"
    }
  },
  {
    "runId": "082e26a1b2e111eca070020017066782",
    "startTs": 1648944011000,
    "endTs": 1648945853000,
    "status": "COMPLETED",
    "properties": {
      "runtimeArgs": "{\"scheduleName\":\"dataPipelineSchedule\",\"logical.start.time\":\"1648944011591\",\"task.mapper.system.resources.memory\":\"4096\",\"task.executor.system.resources.cores\":\"1\",\"task.executor.system.resources.memory\":\"4096\"}",
      "phase-4": "37fa2231-b2e4-11ec-b710-02001705b0a3"
    }
  },
  {
    "runId": "d971ad10b21711ecbb92020017066782",
    "startTs": 1648857604000,
    "endTs": 1648858465000,
    "status": "COMPLETED",
    "properties": {
      "runtimeArgs": "{\"scheduleName\":\"dataPipelineSchedule\",\"logical.start.time\":\"1648857604358\",\"task.mapper.system.resources.memory\":\"4096\",\"task.executor.system.resources.cores\":\"1\",\"task.executor.system.resources.memory\":\"4096\"}",
      "phase-4": "19fe1051-b219-11ec-9dc5-020017067caf"
    }
  },
  {
    "runId": "b0eb51e2b14e11ec97ff020017066782",
    "startTs": 1648771207000,
    "endTs": 1648772918000,
    "status": "COMPLETED",
    "properties": {
      "runtimeArgs": "{\"scheduleName\":\"dataPipelineSchedule\",\"logical.start.time\":\"1648771207527\",\"task.mapper.system.resources.memory\":\"4096\",\"task.executor.system.resources.cores\":\"1\",\"task.executor.system.resources.memory\":\"4096\"}",
      "phase-4": "5a64b721-b151-11ec-8167-0200170bef42"
    }
  },
  {
    "runId": "a8e5dd6fb0bb11ecb81d020017066782",
    "startTs": 1648708058000,
    "endTs": 1648708415000,
    "status": "COMPLETED",
    "properties": {
      "runtimeArgs": "{\"logical.start.time\":\"1648708058065\",\"task.mapper.system.resources.memory\":\"4096\",\"mcps.api.admin.job.audit.id\":\"b2cbf866f3834ac0b2dad7999b8d6b98\",\"mcps.api.admin.job.started.by.user.flag\":\"true\",\"task.executor.system.resources.cores\":\"1\",\"mcps.api.admin.job.admin.action.type\":\"JOB_START\",\"task.executor.system.resources.memory\":\"4096\",\"mcps.api.admin.job.started.username\":\"6fe22de0e2934d3a86b4cae68b4734f1\"}",
      "phase-4": "07b0f2e1-b0bc-11ec-ab52-02001705b0a3"
    }
  },
  {
    "runId": "882c6411b08511eca1b5020017066782",
    "startTs": 1648684810000,
    "endTs": 1648686223000,
    "status": "FAILED",
    "properties": {
      "runtimeArgs": "{\"scheduleName\":\"dataPipelineSchedule\",\"logical.start.time\":\"1648684810322\",\"task.mapper.system.resources.memory\":\"4096\",\"task.executor.system.resources.cores\":\"1\",\"task.executor.system.resources.memory\":\"4096\"}",
      "phase-4": "bd5858c1-b087-11ec-b854-02001705b0a3"
    }
  }
]

Retrieving a Detailed View of a Job Run

Use this endpoint to retrieve a detailed view of a job run.

Request URL

GET https://[accountUrl]/api-admin/v1/{tenentKey}/admin/job/{jobType}/{jobId}/runs/{runId}?versionTs={versionTs}

Path Parameters

Query Parameters

  • ?versionTS={timestamp}: The timestamp of the job run, retrieved using Retrieving a List of Job Runs endpoint (properties > runtimeArgs > logical.start.time).

Response

A successful response returns details about the job run.

[
   {
      "runId": "55ed528ec4aa11ec97af0200170bef42",
      "startTs": 1650899640000,
      "endTs": 1650900130000,
      "status": "COMPLETED",
      "properties": {
         "runtimeArgs": "{\"logical.start.time\":\"1650899640674\",\"task.mapper.system.resources.memory\":\"4096\",\"mcps.api.admin.job.audit.id\":\"f3e8aadcc513464199409542474c000d\",\"mcps.api.admin.job.started.by.user.flag\":\"true\",\"task.executor.system.resources.cores\":\"1\",\"mcps.api.admin.job.admin.action.type\":\"JOB_START\",\"task.executor.system.resources.memory\":\"4096\",\"mcps.api.admin.job.started.username\":\"6fe22de0e2934d3a86b4cae68b4734f1\"}",
         "phase-4": "04e63451-c4ab-11ec-b69a-02001705b0a3"
      },
      "metrics": [],
      "auditEntries": [
         {
            "tenantId": 100588,
            "versionTS": 1650900107729,
            "message": "CleanDeleteActionTestSnapshotTruncate: Script execution completed",
            "workflowId": "DATACLEAN_TestSnapshotTruncate",
            "identifier": "fcd1f27a-24e7-4e91-bdd9-ff5f4270912c",
            "runId": "1650899640674",
            "severity": "INFO",
            "details": null,
            "entries": null,
            "recordTimestamp": 1650900107729,
            "recordWorkflowTimestamp": 1650899640674,
            "startedBy": null
         },
         {
            "tenantId": 100588,
            "versionTS": 1650900094348,
            "message": "CleanDeleteActionTestSnapshotTruncate: Starting script execution",
            "workflowId": "DATACLEAN_TestSnapshotTruncate",
            "identifier": "30ba3ea1-6af0-45a0-97bc-62543c90adf7",
            "runId": "1650899640674",
            "severity": "INFO",
            "details": null,
            "entries": null,
            "recordTimestamp": 1650900094348,
            "recordWorkflowTimestamp": 1650899640674,
            "startedBy": null
         },
         {
            "tenantId": 100588,
            "versionTS": 1650899934168,
            "message": "TableTruncateActionTestSnapshotTruncate: Script execution completed",
            "workflowId": "DATACLEAN_TestSnapshotTruncate",
            "identifier": "42a705e0-ba02-49f9-9f97-48cfa7e60874",
            "runId": "1650899640674",
            "severity": "INFO",
            "details": null,
            "entries": null,
            "recordTimestamp": 1650899934168,
            "recordWorkflowTimestamp": 1650899640674,
            "startedBy": null
         },
         {
            "tenantId": 100588,
            "versionTS": 1650899923043,
            "message": "TableTruncateActionTestSnapshotTruncate: Starting script execution",
            "workflowId": "DATACLEAN_TestSnapshotTruncate",
            "identifier": "8b9ba468-0437-473b-a42e-ac9e40ff1a0d",
            "runId": "1650899640674",
            "severity": "INFO",
            "details": null,
            "entries": null,
            "recordTimestamp": 1650899923043,
            "recordWorkflowTimestamp": 1650899640674,
            "startedBy": null
         },
         {
            "tenantId": 100588,
            "versionTS": 1650899922000,
            "message": "StageDataDeleteActionTestSnapshotTruncate: Script execution completed",
            "workflowId": "DATACLEAN_TestSnapshotTruncate",
            "identifier": "327d50b4-53df-453f-822a-228a8dc9eea1",
            "runId": "1650899640674",
            "severity": "INFO",
            "details": null,
            "entries": null,
            "recordTimestamp": 1650899922000,
            "recordWorkflowTimestamp": 1650899640674,
            "startedBy": null
         },
         {
            "tenantId": 100588,
            "versionTS": 1650899912305,
            "message": "StageDataDeleteActionTestSnapshotTruncate: Starting script execution",
            "workflowId": "DATACLEAN_TestSnapshotTruncate",
            "identifier": "a638ef51-3ab6-40ae-9713-48b4c0b8efce",
            "runId": "1650899640674",
            "severity": "INFO",
            "details": null,
            "entries": null,
            "recordTimestamp": 1650899912305,
            "recordWorkflowTimestamp": 1650899640674,
            "startedBy": null
         },
         {
            "tenantId": 100588,
            "versionTS": 1650899889970,
            "message": "Job summary: {\"status\":\"RUNNING\",\"runId\":\"55ed528ec4aa11ec97af0200170bef42\",\"versionTS\":\"1650899640674\"}",
            "workflowId": "DATACLEAN_TestSnapshotTruncate",
            "identifier": "jobSummaryMessage",
            "runId": "1650899640674",
            "severity": "INFO",
            "details": null,
            "entries": null,
            "recordTimestamp": 1650899889970,
            "recordWorkflowTimestamp": 1650899640674,
            "startedBy": null
         },
         {
            "tenantId": 100588,
            "versionTS": 1650899889966,
            "message": "Workflow audit id: f3e8aadcc513464199409542474c000d",
            "workflowId": "DATACLEAN_TestSnapshotTruncate",
            "identifier": "workflowAuditId",
            "runId": "1650899640674",
            "severity": "INFO",
            "details": null,
            "entries": null,
            "recordTimestamp": 1650899889966,
            "recordWorkflowTimestamp": 1650899640674,
            "startedBy": null
         },
         {
            "tenantId": 100588,
            "versionTS": 1650899889587,
            "message": "Admin action type: JOB_START",
            "workflowId": "DATACLEAN_TestSnapshotTruncate",
            "identifier": "adminActionType",
            "runId": "1650899640674",
            "severity": "INFO",
            "details": null,
            "entries": null,
            "recordTimestamp": 1650899889587,
            "recordWorkflowTimestamp": 1650899640674,
            "startedBy": null
         }
      ]
   }
]

Note the following within the response:

  • The metrics property describes the type of data deleted. The metricName property describes the data deleted, where the metricValue describes the number of records deleted from the object. For example:

    "metrics": [
      {
        "metricName": "table.customer.dw.delete.Count",
        "metricValue": 1
      }
    ]

    In the example above, 1 record was deleted from the customer data object data warehouse objects.

Viewing Deletion Reports

After Data Deletion Job completes successfully, a report is generated in the destination folder that explains the data objects from which data was deleted, and the number of deleted records. The Deletion Report contains the following information:

Column Header Description
ObjectClass The class of data object where data was deleted. For example, Data objects are named "Table".
ObjectName The name of the data object where data was deleted.
ObjectType

The type of data deleted from data objects:

  • DW: Data from data warehouse data objects.

  • R: Data from raw data objects.

  • RS: Raw ingested data from the Stream API.

DeleteMode The mode of deletion specified for the job.
DeleteSourceType

Where the record deletion came from:

  • Table: Deletion came from a data deletion data object.

  • Query: Deletion came from a query.

DeleteSourceID

The source ID for the job. Will display one of the following values:

  • Table ID

  • Query ID

ObjectRecordID

The ID for the deletion source record. Will display one of the following values:

  • ID from data deletion record ID

  • Incremental row from query (1,2,3, ..n)

IsItemsDeleted Displays Y if record deleted or N if no records to delete.
AdditionalInfo Other details about the Data Deletion job.

Here's an example deletion report:

ObjectClass ObjectName ObjectType DeleteMode DeleteSourceType DeleteSourceID ObjectRecordID IsItemsDeleted AdditionalInfo
Table DataObject22_6 R DELETE query cxu_G_DufbygQSa_isi9sDhTvw 226056 Y  
Table DataObject22_6 RS DELETE query cxu_G_DufbygQSa_isi9sDhTvw 226056 N  
Table DataObject22_6 DW DELETE query cxu_G_DufbygQSa_isi9sDhTvw 226056 Y  

Learn more

Deleting data with a Data Deletion Request data object

Deleting data objects

Deleting Activation Snapshots

Jobs API