Step By Step
1、配置数据源 + 测试连通性
- 1.1 Table Store(OTS)参数获取
- 1.2、AccessKey、AccessSecret获取
阿里云常见参数获取位置 - 1.3 Dataworks数据集成配置OTS数据源
- 1.4 Maxcompute数据源配置
2、源数据准备及目标表创建
- 2.1 OTS 源数据表
- 2.2 odps数据表创建
CREATE TABLE otstoodps (id INT,name STRING);
3、创建数据集成任务(OTS数据源当前仅支持脚本模式)
- 3.1 脚本Sample
{
"type": "job",
"steps": [
{
"stepType": "ots",
"parameter": {
"datasource": "otsdemo",
"column": [
{
"name": "id"
},
{
"name": "name"
}
],
"range": {
"end": [
{
"type": "INF_MAX"
}
],
"begin": [
{
"type": "INF_MIN"
}
]
},
"table": "otsreader2"
},
"name": "Reader",
"category": "reader"
},
{
"stepType": "odps",
"parameter": {
"partition": "",
"truncate": true,
"datasource": "odps_first",
"column": [
"id",
"name"
],
"emptyAsNull": false,
"table": "otstoodps"
},
"name": "Writer",
"category": "writer"
}
],
"version": "2.0",
"order": {
"hops": [
{
"from": "Reader",
"to": "Writer"
}
]
},
"setting": {
"errorLimit": {
"record": ""
},
"speed": {
"concurrent": 2,
"throttle": false
}
}
}
- 3.2 注意事项
a、ots Reader 表示将主键名也放在column中;
b、reader column的顺序和writer column的顺序要一致。
4、测试运行 + 调度配置
- 4.1 测试运行
- 4.2 目标表结果查看
- 4.3 调度配置(测试运行成功后,可以配置周期调度,将任务提交到运维中心周期运行)