移动作业 (RESTful API) - Teradata Data Mover

Teradata® Data Mover 用户指南

Product
Teradata Data Mover
Release Number
17.11
Published
2021 年 10 月
Language
中文 (简体)
Last Update
2021-11-08
dita:mapPath
zh-CN/cai1626458602965.ditamap
dita:ditavalPath
zh-CN/mpm1591127278842.ditaval
dita:id
B035-4101
Product Category
Analytical Ecosystem

概览

move RESTful API 使用以下 URL 和方法移动指定的作业︰

说明
URL /datamover/executingJobs
方法 POST

请求参数

jobName
说明︰作业名称
JSON 数据类型︰字符串
必需:是
sync
说明:sync 使用规范
如果 sync 为 false(缺省值),start 命令将在生成作业执行名称时返回状态。如果 sync 为 truestart 命令将在作业完成时返回状态。
JSON 数据类型︰字符串
必需:布尔
必需:否
uowid
说明:工作单元 ID
JSON 数据类型︰字符串
必需:否
saveChanges
说明:使用指定参数更新原始作业定义
JSON 数据类型︰布尔
必需:否
sourceLogin
说明︰源系统属性
JSON 数据类型︰对象 (LoginType)
必需:否
targetLogin
说明︰目标系统属性
JSON 数据类型︰对象 (LoginType)
必需:否
settings
说明︰作业配置属性
JSON 数据类型︰对象 (SettingsType)
必需:否
jobSecurity
说明:作业安全性详细信息
JSON 数据类型︰对象 (JobSecurityType)
必需:否
objects
说明︰要复制的对象
JSON 数据类型︰对象 (DbObjectType)
必需:否

请求示例

{
    "jobName": "tdToTdJob",
    "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": "DSA",
            "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",
                            "forceTargetStagingTable": "true",
                            "selection": "included",
                            "exportWithoutSpool": "false",
                            "stagingToTarget":"DELETE_INSERT"
                        },
                        {
                            "name": "srcTableB",
                            "compareDDL": "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",
                    "forceTargetStagingTable": "true",
                    "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"
                }
            ]
         }
    ]
}