用途
使用以下 URL 和方法编辑作业︰
项 | 说明 | ||
---|---|---|---|
URL | /datamover/jobs/job-name | ||
方法 | PUT |
请求参数
- uowid
- 说明:工作单元 ID
- sourceLogin
- 说明︰源系统属性
- targetLogin
- 说明︰目标系统属性
- settings
- 说明︰作业配置属性
- jobSecurity
- 说明:作业安全性详细信息
- objects
- 说明︰要复制的对象
响应参数
无需响应参数。
响应示例
{ "message" : "Job definition not found: failed-multi-table" }
edit RESTful API 示例(Teradata 到 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" } }, "jobSecurity": { "ownerName": "user10", "readPermission": { "users" : [ "user1", "user2", "user3" ], "roles" : [ "role1", "role2", "role3" ] }, "writePermission": { "users" : [ "user1", "user2", "user3" ], "roles" : [ ] }, "executePermission": { "users" : [ "user1", "user3" ], "roles" : [ "role1"] } }, "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", "forceTargetStagingTable": "true", "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", "forceTargetStagingTable": "true", "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" } ], "functionAliases": [ { "name": "faObj", "database": "dmguest", "selection": "included" }, { "name": "FAObjForForeignSer", "database": "myDB", "selection": "included" } ] "indices": [ { "name": "OrdersHI", "indexDatabase": "indexDB", "indexType": "hash_index", "selection": "included" }, { "name": "sji", "indexDatabase": "indexDB", "indexType": "join_index",as "copyStats": true, "selection": "included" } ], "schema": [ { "name": "avroRecordSchema", "compareDDL": true, "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 示例(Teradata 到 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 } }, "jobSecurity": { "ownerName": "user10", "readPermission": { "users" : [ "user1", "user2", "user3" ], "roles" : [ "role1", "role2", "role3" ] }, "writePermission": { "users" : [ "user1", "user2", "user3" ], "roles" : [ ] }, "executePermission": { "users" : [ "user1", "user3" ], "roles" : [ "role1"] } }, "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", "column": [ { "name": "lastName", "targetName": "surname", "targetType": "String", "allowNull": "false", "allowDuplicate": "false", "primaryIndex": "false" }, { "name": "Street number", "targetType": "int", "allowNull": "false", "allowDuplicate": "false", "primaryIndex": "false" ] } ] } ], "view" : [ { "name" : "view2", "database" : "sr186049", "viewDataTable" : { "targetTable" : "table2", "targetDatabase" : "sr186049" }, "validateRowCount" : "ALL", "compareDDL" : true, "useSourceStagingTable" : false, "forceTargetStagingTable" : false, "selection" : "unselected", "copyData" : true }, { "name" : "view1", "database" : "sr186049", "viewDataTable" : { "targetTable" : "table1", "targetDatabase" : "sr186049" }, { "validateRowCount" : "PARTIAL", "compareDDL" : true, "useSourceStagingTable" : false, "forceTargetStagingTable" : false, "selection" : "unselected", "copyData" : true } ] } }