代码拉取完成,页面将自动刷新
Greenplum 5及以上
"connection": [{
"jdbcUrl": ["jdbc:pivotal:greenplum://localhost:5432;DatabaseName=database"],
"table": ["table"],
"schema":"public"
}]
不支持浮点、字符串、日期等其他类型
。如果用户指定其他非支持类型,FlinkX将报错!"column":["*"]
2.指定字段名称:
"column":["id","name"]
3.指定具体信息:
"column": [{
"name": "col",
"type": "datetime",
"format": "yyyy-MM-dd hh:mm:ss",
"value": "value"
}]
pollingInterval
轮询间隔时间周期性的从数据库拉取数据。开启间隔轮询还需配置参数pollingInterval
,increColumn
,可以选择配置参数startLocation
。若不配置参数startLocation
,任务启动时将会从数据库中查询增量字段最大值作为轮询的开始位置。{
"job": {
"content": [{
"reader": {
"parameter" : {
"column" : [ {"name" : "id", "type": "int"}],
"username" : "username",
"password" : "password",
"connection" : [ {
"jdbcUrl" : [ "jdbc:pivotal:greenplum://localhost:5432;DatabaseName=database" ],
"table" : [ "table" ]
} ],
"where": "",
"customSql": "",
"requestAccumulatorInterval": 2
},
"name" : "greenplumreader"
},
"writer": {
"name": "streamwriter",
"parameter": {
"print": true
}
}
}],
"setting": {
"speed": {
"channel": 1,
"bytes": 0
},
"errorLimit": {
"record": 100
}
}
}
}
{
"job": {
"content": [{
"reader": {
"parameter" : {
"column" : [ {"name" : "id", "type": "int"}],
"username" : "username",
"password" : "password",
"connection" : [ {
"jdbcUrl" : [ "jdbc:pivotal:greenplum://localhost:5432;DatabaseName=database" ],
"table" : [ "table" ]
} ],
"where": "",
"splitPk":"id",
"customSql": "",
"requestAccumulatorInterval": 2
},
"name" : "greenplumreader"
},
"writer": {
"name": "streamwriter",
"parameter": {
"print": true
}
}
}],
"setting": {
"speed": {
"channel": 3,
"bytes": 0
},
"errorLimit": {
"record": 100
}
}
}
}
{
"job": {
"content": [{
"reader": {
"parameter" : {
"column" : [ {"name" : "id", "type": "int"}],
"username" : "username",
"password" : "password",
"connection" : [ {
"jdbcUrl" : [ "jdbc:pivotal:greenplum://localhost:5432;DatabaseName=database" ],
"table" : [ "table" ]
} ],
"where": "",
"customSql": "select id from table",
"requestAccumulatorInterval": 2
},
"name" : "greenplumreader"
},
"writer": {
"name": "streamwriter",
"parameter": {
"print": true
}
}
}],
"setting": {
"speed": {
"channel": 1,
"bytes": 0
},
"errorLimit": {
"record": 100
}
}
}
}
{
"job": {
"content": [{
"reader": {
"parameter" : {
"column" : [ {"name" : "id", "type": "int"}],
"username" : "username",
"password" : "password",
"connection" : [ {
"jdbcUrl" : [ "jdbc:pivotal:greenplum://localhost:5432;DatabaseName=database" ],
"table" : [ "table" ]
} ],
"increColumn": "id",
"startLocation": "20",
"where": "",
"customSql": "",
"requestAccumulatorInterval": 2
},
"name" : "greenplumreader"
},
"writer": {
"name": "streamwriter",
"parameter": {
"print": true
}
}
}],
"setting": {
"speed": {
"channel": 1,
"bytes": 0
},
"errorLimit": {
"record": 100
}
}
}
}
{
"job": {
"content": [{
"reader": {
"parameter" : {
"column" : [ {"name" : "id", "type": "int"}],
"username" : "username",
"password" : "password",
"connection" : [ {
"jdbcUrl" : [ "jdbc:pivotal:greenplum://localhost:5432;DatabaseName=database" ],
"table" : [ "performance" ]
} ],
"polling": true,
"pollingInterval": 3000,
"customSql": "",
"increColumn": "id",
"startLocation": "20",
"where": "",
"requestAccumulatorInterval": 2
},
"name" : "greenplumreader"
},
"writer": {
"name": "streamwriter",
"parameter": {
"print": true
}
}
}],
"setting": {
"speed": {
"channel": 1,
"bytes": 0
},
"errorLimit": {
"record": 100
}
}
}
}
说明:表名不应该有'.'号,否则会报如下错误:java.sql.SQLException: SQLException: [Pivotal][Greenplum JDBC Driver][Greenplum]cross-database references are not implemented: "public.public.test".
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。