Teradata 到 Teradata REST 示例 - Teradata Data Mover

Teradata® Data Mover 用户指南

Product
Teradata Data Mover
Release Number
17.05
Published
2020 年 10 月
Language
中文 (简体)
Last Update
2020-12-18
dita:mapPath
zh-CN/xxl1591023586203.ditamap
dita:ditavalPath
zh-CN/xxl1591023586203.ditaval
dita:id
B035-4101
Product Category
Analytical Ecosystem
以下示例显示了用于创建 Teradata 到 Teradata 作业的结构:
{
    "jobName": "tdToTdJob",
    "sourceLogin":
    {
        "teradata":
        {
            "tdpid": "sourceSys",
        }
        "userPool": "poolA",
    },
    "targetLogin":
    {
        "teradata":
        {
            "tpid":"targetSys"
        },
        "userPool": "poolA"
    },
    "settings":
    {
        "priority": "MEDIUM",
        "overwriteExistingObjects": "true",
        "freezeJobSteps": "false",
        "targetDatabase": "targetDatabaseJobLevel",
        "compareDDL": "true",
        "logLevel": "99",
        "map" : "mapname1",
        "colocate" : "colocatename1",
        "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",
                    "map" : "mapname1",
                    "colocate" : "colocatename1",
                    "selection": "unselected",
                    "table":
                    [
                        {
                            "name": "srcTableA",
                            "stagingDatabase": "stagingDBA",
                            "stagingDatabaseForTable": "stagingDBAB",
                            "targetDatabase": "targetDBA",
                            "targetName": "tgtTableA",
                            "validateRowCount": "ALL",
                            "compareDDL": "false",
                            "forceTargetStagingTable": "true",
                            "selection": "included",
                            "exportWithoutSpool": "false",
                            "map" : "mapname1",
                            "colocate" : "colocatename1",
                            "stagingToTarget":"DELETE_INSERT"
                        },
                        {
                            "name": "srcTableB",
                            "compareDDL": "true",
                            "selection": "included",
                            "exportWithoutSpool": "true",
                            "map" : "mapname1",
                            "colocate" : "colocatename1",
                            "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",
                    "map" : "mapname1",
                    "colocate" : "colocatename1"

                },
                {
                    "name": "foreignServer2",
                    "selection": "included",
                    "map" : "mapname1",
                    "colocate" : "colocatename1"
                }
            ],
            "functionAliases":
            [
                {    
                    "name": "faObj",
                    "database": "dmguest",
                    "selection": "included"
                },
                {
                    "name": "FAObjForForeignSer",
                    "database": "myDB",
                    "selection": "included"
                }
            ]
            "indices":
            [
                {
                    "name": "OrdersHI",
                    "indexDatabase": "indexDB",
                    "indexType": "hash_index",
                    "map" : "mapname1",
                    "colocate" : "colocatename1",
                    "selection": "included"
                },
                {
                    "name": "sji",
                    "indexDatabase": "indexDB",
                    "indexType": "join_index",as
                    "copyStats": true,
                    "map" : "mapname1",
                    "colocate" : "colocatename1",
                    "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"
                }
            ]
         }
    ]
}
以下示例显示创建作业(Teradata 到 Teradata)时使用加密密码的目标登录信息和源登录信息:
{
    "jobName": "tdToTdJob",
    "sourceLogin":
    {
        "teradata":
        {
            "tdpid": "sourceSys",
            "username": "userA",
            "password": "76bd3f9e9c8a2a4e9f76ce57eac59ec97a33ef6157fc8aa730333513a53574c8",
            "sessionCharset": "UTF8",
            "passwordEncrypted": true
        }
    },
    "targetLogin":
    {
        "teradata":
        {
            "tdpid": "targetSys",
            "username": "userB",
            "password": "76bd3f9e9c8a2a4e9f76ce57eac59ec97a33ef6157fc8aa730333513a53574c8",
            "sessionCharset": "UTF8",
            "passwordEncrypted": true
        }
    },
...
以下示例显示创建作业(Teradata 到 Teradata)时使用纯文本的目标登录信息和源登录信息:
{
    "jobName": "tdToTdJob",    
    "sourceLogin":    
    {        
        "teradata":        
        {            
            "tdpid": "sourceSys",            
            "username": "userA",            
            "password": "passwordA",            
            "sessionCharset": "UTF8",            
            "passwordEncrypted": false        
        }    
    },    
    "targetLogin":    
    {        
        "teradata":        
        {            
            "tdpid": "targetSys",            
            "username": "userB",            
            "password": "passwordB",            
            "sessionCharset": "UTF8",
            "passwordEncrypted": false        
        }    
    },
...