-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #110 from Altinity/refactor_insert_batch
Refactor insert batch
- Loading branch information
Showing
23 changed files
with
455 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
DATABASE=datatypes | ||
./debezium-delete.sh && ./debezium-connector-setup-database.sh $DATABASE | ||
docker exec -it clickhouse clickhouse-client -uroot --password root -mn --query "drop database if exists $DATABASE;create database $DATABASE;" | ||
|
||
docker cp ../tests/data_types.sql mysql-master:/tmp | ||
docker exec -it mysql-master mysql -uroot -proot -e "DROP DATABASE IF EXISTS $DATABASE;CREATE DATABASE $DATABASE;" | ||
|
||
docker exec -it mysql-master mysql -uroot -proot -e "use $DATABASE;source /tmp/data_types.sql;" | ||
|
||
./sink-delete.sh && ./sink-connector-setup-database.sh $DATABASE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
src/main/java/com/altinity/clickhouse/sink/connector/db/ClickHouseDbConstants.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package com.altinity.clickhouse.sink.connector.db; | ||
|
||
public class ClickHouseDbConstants { | ||
|
||
public static final String ALTER_TABLE = "ALTER TABLE"; | ||
public static final String ALTER_TABLE_ADD_COLUMN = "add column"; | ||
public static final String ALTER_TABLE_DELETE_COLUMN = "delete column"; | ||
|
||
|
||
public static final String VERSION_COLUMN = "_version"; | ||
public static final String VERSION_COLUMN_DATA_TYPE = "UInt64"; | ||
public static final String SIGN_COLUMN = "_sign"; | ||
public static final String SIGN_COLUMN_DATA_TYPE = "Int8"; | ||
|
||
public static final String CREATE_TABLE = "CREATE TABLE"; | ||
|
||
public static final String NULL = "NULL"; | ||
public static final String NOT_NULL = "NOT NULL"; | ||
|
||
public static final String PRIMARY_KEY = "PRIMARY KEY"; | ||
|
||
public static final String ORDER_BY = "ORDER BY"; | ||
|
||
public static final String ORDER_BY_TUPLE = "ORDER BY tuple()"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.