edit RESTful API - Teradata Data Mover

Teradata Data Mover User Guide

Product
Teradata Data Mover
Release Number
16.10
Published
June 2017
Language
English (United States)
Last Update
2018-03-29
dita:mapPath
kmo1482331935137.ditamap
dita:ditavalPath
ft:empty
dita:id
B035-4101
lifecycle
previous
Product Category
Analytical Ecosystem

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
JSON Data Type: String
Required: No
sourceLogin
Description: Source system properties
JSON Data Type: Object (LoginType)
Required: Yes
targetLogin
Description: Target system properties
JSON Data Type: Object (LoginType)
Required: Yes
settings
Description: Job configuration properties
JSON Data Type: Object (SettingsType)
Required: No
objects
Description: Objects to be copied
JSON Data Type: Array (DbObjectType)
Required: Yes

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"
                                }
                            ]
                        }
                    ]
                }
            ]
        }
    ]
}