Purpose
The edit RESTful API edits a job using the following URL and method:
Item | Description | ||
---|---|---|---|
URL | /datamover/jobs/[job-name] | ||
Method | PUT |
Request Parameters
- uowid
- Description: Unit of work id
- sourceLogin
- Description: Source system properties
- targetLogin
- Description: Target system properties
- settings
- Description: Job configuration properties
- objects
- Description: Objects to be copied
Response Parameters
The edit RESTful API does not include specific response parameters.
Status Codes
If the command executes without error, the API returns status code 200 in the response header and nothing in the response body.
If an error occurs during execution, the API returns a non-200 status code in the response header and an error message in JSON format in the response body.
Response Example
{ "message" : "Job definition not found: failed-multi-table" }
edit RESTful API Example (Teradata to Teradata)
{ "sourceLogin": { "teradata": { "tdpid": "sourceSystem", "username": "user", "password": "password", "sessionCharset": "UTF8", "passwordEncrypted": "false" } }, "targetLogin": { "userPool": "poolA" }, "settings": { "priority": "MEDIUM", "overwriteExistingObjects": "true", "freezeJobSteps": "false", "targetDatabase": "targetDatabaseJobLevel", "compareDDL": "true", "logLevel": "99", "tdTdSettings": { "forceUtility": "ARC", "dataStreams": 5, "sourceSessions": 10, "targetSessions": 10, "onlineArchive": "false" } }, "objects": [ { "database": [ { "name": "sourceDb", "compareDDL": "false", "journaling": "false", "replaceDatabase": "false", "selection": "unselected", "table": [ { "name": "srcTableA", "stagingDatabase": "stagingDBA", "stagingDatabaseForTable": "stagingDBAB", "targetDatabase": "targetDBA", "targetName": "tgtTableA", "validateRowCount": "ALL", "compareDDL": "false", "useExistingTargetTable": "false", "selection": "included", "exportWithoutSpool": "false" }, { "name": "srcTableB", "compareDDL": "true", "useExistingTargetTable": "true", "selection": "included", "exportWithoutSpool": "true", "partialTableParameters": { "sqlWhereClause": "where columnA < 100", "keyColumns": [ "columnA" ] }, "teradataParameters": { "copyStats": "false", "allowTPTLoadMultiset": "true", "journaling": "false", "overrideLockAccess": "false" } } ] } ], "trigger": [ { "database": "databaseA", "subjectTableDatabase": "subjectDatabaseA", "table": "tableA", "name": "triggerA", "actionTime": { "action": "AFTER", "enabled": "NO" }, "selection": "included" }, { "database": "databaseB", "subjectTableDatabase": "subjectDatabaseB", "table": "tableB", "name": "triggerB", "actionTime": { "action": "AFTER", "enabled": "YES" }, "selection": "included" } ], "view": [ { "name": "ViewA", "database": "ViewDatabase", "viewDataTable": { "targetTable": "tableA", "targetDatabase": "dbA" }, "compareDDL": "false", "selection": "included", "copyData": "false" }, { "name": "ViewB", "database": "ViewDatabaseB", "viewDataTable": { "targetTable": "tableA", "targetDatabase": "dbA" }, "compareDDL": "false", "selection": "included", "copyData": "false" } ], "foreignServer": [ { "name": "foreignServer1", "selection": "included" }, { "name": "foreignServer2", "selection": "included" } ], "journal": [ { "name": "journal", "database": "journalDB", "selection": "included" } ], "macro": [ { "name": "macroA", "database": "macroDB", "selection": "included" }, { "name": "macroB", "database": "macroDB", "selection": "included" } ], "storedProcedure": [ { "name": "storedProcedureA", "database": "storedProcedureDB", "selection": "included" }, { "name": "storedProcedureB", "database": "storedProcedureDB", "selection": "included" } ] } ] }
edit RESTful API Example (Teradata to Hadoop)
{ "sourceLogin": { "teradata": { "tdpid": "sourceSystem", "username": "user", "password": "password", "sessionCharset": "UTF8", "passwordEncrypted": "false" } }, "targetLogin": { "hadoop": { "webhcatURL": "http://hadoopSystem:50111", "fileSystemURL": "http://hadoopSystem:50070", "oozieURL": "http://hadoopSystem:11000", "username": "hive", "passwordEncrypted": "false" } }, "settings": { "priority": "MEDIUM", "overwriteExistingObjects": "true", "freezeJobSteps": "false", "compareDDL": "true", "tdHadoopSettings": { "forceUtility": "TDCH", "fileOptions": "text", "columnDelimiter": "|", "batchInsertSize": 0, "mappers": 10 } }, "objects": [ { "database": [ { "name": "sourceDb", "compareDDL": "false", "journaling": "false", "replaceDatabase": "false", "selection": "unselected", "table": [ { "name": "srcTableA", "targetName": "tgtHadoopTableA", "compareDDL": "false", "useExistingTargetTable": "false", "selection": "included", "exportWithoutSpool": "false", "columns": [ { "name": "lastName", "targetName": "surname", "targetType": "String", "allowNull": "false", "allowDuplicate": "false", "primaryIndex": "false" }, { "name": "Street number", "targetType": "int", "allowNull": "false", "allowDuplicate": "false", "primaryIndex": "false" } ] } ] } ] } ] }
edit RESTful API Example (Teradata to Aster)
{ "sourceLogin": { "teradata": { "tdpid": "sourceSystem", "username": "user", "password": "password", "sessionCharset": "UTF8", "passwordEncrypted": "false" } }, "targetLogin": { "hadoop": { "webhcatURL": "http://hadoopSystem:50111", "fileSystemURL": "http://hadoopSystem:50070", "oozieURL": "http://hadoopSystem:11000", "username": "hive", "passwordEncrypted": "false" } }, "settings": { "priority": "MEDIUM", "overwriteExistingObjects": "true", "freezeJobSteps": "false", "compareDDL": "true", "tdHadoopSettings": { "forceUtility": "TDCH", "fileOptions": "text", "columnDelimiter": "|", "batchInsertSize": 0, "mappers": 10 } }, "objects": [ { "database": [ { "name": "sourceDb", "compareDDL": "false", "journaling": "false", "replaceDatabase": "false", "selection": "unselected", "table": [ { "name": "srcTableA", "targetName": "tgtHadoopTableA", "compareDDL": "false", "useExistingTargetTable": "false", "selection": "included", "exportWithoutSpool": "false", "columns": [ { "name": "lastName", "targetName": "surname", "targetType": "String", "allowNull": "false", "allowDuplicate": "false", "primaryIndex": "false" }, { "name": "Street number", "targetType": "int", "allowNull": "false", "allowDuplicate": "false", "primaryIndex": "false" } ] } ] } ] } ] }