Skip to content

Commit

Permalink
add serverTimeZone option for mysql source (#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
daleiz authored Aug 19, 2024
1 parent 1ce4aa1 commit 3e1a7e1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ public void run(HRecord cfg, SourceTaskContext ctx) {
if (table.split("\\.").length == 1) {
props.setProperty("table.include.list", dbname + "." + table);
}
if(cfg.contains("serverTimeZone")){
props.setProperty("database.connectionTimeZone ", cfg.getString("serverTimeZone"));
}
super.run(cfg, ctx);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,14 @@
"description": "table name of the database",
"type": "string",
"examples": ["t1", "public.t1"]
},
"serverTimeZone": {
"title": "Server Time Zone",
"description": "configured server timezone",
"type": "string",
"examples": ["UTC"]
}
},
"required": [ "stream", "host", "port", "user", "password", "database", "table" ],
"ui:order": [ "stream", "host", "port", "user", "password", "database", "table" ]
"ui:order": [ "stream", "host", "port", "user", "password", "serverTimeZone", "database", "table" ]
}

0 comments on commit 3e1a7e1

Please sign in to comment.