Repository: incubator-gobblin Updated Branches: refs/heads/master 1d0ec852c -> 9f69cd395
[GOBBLIN-362] Improve MySQL staging table to have properties from dest table Closes #2239 from jinhyukchang/jnchang-jdbc Project: http://git-wip-us.apache.org/repos/asf/incubator-gobblin/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-gobblin/commit/9f69cd39 Tree: http://git-wip-us.apache.org/repos/asf/incubator-gobblin/tree/9f69cd39 Diff: http://git-wip-us.apache.org/repos/asf/incubator-gobblin/diff/9f69cd39 Branch: refs/heads/master Commit: 9f69cd395a719a20698e7b395d4abdfbf1cfa8cc Parents: 1d0ec85 Author: Jin Hyuk Chang <[email protected]> Authored: Fri Jan 12 09:59:44 2018 -0800 Committer: Hung Tran <[email protected]> Committed: Fri Jan 12 09:59:44 2018 -0800 ---------------------------------------------------------------------- .../org/apache/gobblin/writer/commands/MySqlWriterCommands.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-gobblin/blob/9f69cd39/gobblin-modules/gobblin-sql/src/main/java/org/apache/gobblin/writer/commands/MySqlWriterCommands.java ---------------------------------------------------------------------- diff --git a/gobblin-modules/gobblin-sql/src/main/java/org/apache/gobblin/writer/commands/MySqlWriterCommands.java b/gobblin-modules/gobblin-sql/src/main/java/org/apache/gobblin/writer/commands/MySqlWriterCommands.java index 5a5cf81..534e019 100644 --- a/gobblin-modules/gobblin-sql/src/main/java/org/apache/gobblin/writer/commands/MySqlWriterCommands.java +++ b/gobblin-modules/gobblin-sql/src/main/java/org/apache/gobblin/writer/commands/MySqlWriterCommands.java @@ -40,7 +40,7 @@ import com.google.common.collect.ImmutableMap; public class MySqlWriterCommands implements JdbcWriterCommands { private static final Logger LOG = LoggerFactory.getLogger(MySqlWriterCommands.class); - private static final String CREATE_TABLE_SQL_FORMAT = "CREATE TABLE %s.%s SELECT * FROM %s.%s WHERE 1=2"; + private static final String CREATE_TABLE_SQL_FORMAT = "CREATE TABLE %s.%s LIKE %s.%s"; private static final String SELECT_SQL_FORMAT = "SELECT COUNT(*) FROM %s.%s"; private static final String TRUNCATE_TABLE_FORMAT = "TRUNCATE TABLE %s.%s"; private static final String DROP_TABLE_SQL_FORMAT = "DROP TABLE %s.%s";
