17.00 - TeradataからHadoopへのRESTの例 - Teradata Data Mover

Teradata® Data Mover ユーザー ガイド

Product
Teradata Data Mover
Release Number
17.00
Published
2021年11月
Content Type
ユーザー ガイド
Publication ID
B035-4101-030K-JPN
Language
日本語 (日本)
次の例では、TeradataからHadoopへのジョブを作成するための構造を示します。
{  
   "jobName":"tdToHadoopJob",
   "sourceLogin":{  
      "teradata":{  
         "tdpid":"dmdev",
         "username":"dbc",
         "password":"dbc",
         "sessionCharset":"UTF8",
         "passwordEncrypted":"false"
      }
   },
   "targetLogin":{  
      "hadoop":{  
         "webhcatURL":"http://zircon1.labs.teradata.com:50111",
         "fileSystemURL":"http://zircon1.labs.teradata.com:50070",
         "oozieURL":"http://zircon1.labs.teradata.com: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",
                  "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"
                     }
                  ],
				  "partialTableParameters":{  
                     "sqlWhereClause":"WHERE id > 4"
                  }
               }
            ]
         }
      ],
      "view":[  
         {  
            "name":"sourceViewA",
            "database":"sourceDB",
            "viewDataTable":{  
               "targetTable":"targetTableToStoreViewData",
               "targetDatabase":"targetDB"
            },
            "validateRowCount":"PARTIAL",
            "useSourceStagingTable":false,
            "forceTargetStagingTable":false,
            "partialTable":{  
               "sqlWhereClause":"WHERE id>1"
            },
            "selection":"unselected",
            "copyData":true
         }
      ]
   }
 }