embulk-output-mysql 0.7.7 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +21 -0
- data/build.gradle +3 -3
- data/classpath/embulk-output-jdbc-0.8.0.jar +0 -0
- data/classpath/embulk-output-mysql-0.8.0.jar +0 -0
- data/default_jdbc_driver/mysql-connector-java-5.1.44.jar +0 -0
- data/src/main/java/org/embulk/output/MySQLOutputPlugin.java +56 -16
- data/src/main/java/org/embulk/output/MySQLTimeZoneComparison.java +107 -0
- data/src/main/java/org/embulk/output/mysql/MySQLOutputConnection.java +14 -5
- data/src/main/java/org/embulk/output/mysql/MySQLOutputConnector.java +3 -8
- data/src/test/java/org/embulk/output/mysql/AfterLoadTest.java +136 -0
- data/src/test/java/org/embulk/output/mysql/BeforeLoadTest.java +124 -0
- data/src/test/java/org/embulk/output/mysql/CreateTableTest.java +79 -0
- data/src/test/java/org/embulk/output/mysql/MySQLTests.java +69 -0
- data/src/test/resources/org/embulk/output/mysql/test/expect/after_load/setup.sql +8 -0
- data/src/test/resources/org/embulk/output/mysql/test/expect/after_load/test1.csv +4 -0
- data/src/test/resources/org/embulk/output/mysql/test/expect/after_load/test_expected.diff +2 -0
- data/src/test/resources/org/embulk/output/mysql/test/expect/after_load/test_insert_after_load.yml +3 -0
- data/src/test/resources/org/embulk/output/mysql/test/expect/after_load/test_insert_after_load_expected.csv +5 -0
- data/src/test/resources/org/embulk/output/mysql/test/expect/after_load/test_insert_direct_after_load.yml +3 -0
- data/src/test/resources/org/embulk/output/mysql/test/expect/after_load/test_merge_after_load.yml +3 -0
- data/src/test/resources/org/embulk/output/mysql/test/expect/after_load/test_merge_after_load_expected.csv +5 -0
- data/src/test/resources/org/embulk/output/mysql/test/expect/after_load/test_merge_direct_after_load.yml +3 -0
- data/src/test/resources/org/embulk/output/mysql/test/expect/after_load/test_replace_after_load.yml +3 -0
- data/src/test/resources/org/embulk/output/mysql/test/expect/after_load/test_replace_after_load_expected.csv +3 -0
- data/src/test/resources/org/embulk/output/mysql/test/expect/after_load/test_truncate_insert_after_load.yml +3 -0
- data/src/test/resources/org/embulk/output/mysql/test/expect/after_load/test_truncate_insert_after_load_expected.csv +3 -0
- data/src/test/resources/org/embulk/output/mysql/test/expect/before_load/setup.sql +8 -0
- data/src/test/resources/org/embulk/output/mysql/test/expect/before_load/test1.csv +4 -0
- data/src/test/resources/org/embulk/output/mysql/test/expect/before_load/test_expected.diff +2 -0
- data/src/test/resources/org/embulk/output/mysql/test/expect/before_load/test_insert_before_load.yml +3 -0
- data/src/test/resources/{mysql/data/test1.csv → org/embulk/output/mysql/test/expect/before_load/test_insert_before_load_expected.csv} +1 -0
- data/src/test/resources/org/embulk/output/mysql/test/expect/before_load/test_insert_direct_before_load.yml +3 -0
- data/src/test/resources/org/embulk/output/mysql/test/expect/before_load/test_merge_before_load.yml +3 -0
- data/src/test/resources/org/embulk/output/mysql/test/expect/before_load/test_merge_before_load_expected.csv +4 -0
- data/src/test/resources/org/embulk/output/mysql/test/expect/before_load/test_merge_direct_before_load.yml +3 -0
- data/src/test/resources/org/embulk/output/mysql/test/expect/before_load/test_truncate_insert_before_load.yml +3 -0
- data/src/test/resources/org/embulk/output/mysql/test/expect/before_load/test_truncate_insert_before_load_expected.csv +4 -0
- data/src/test/resources/org/embulk/output/mysql/test/expect/create_table/setup.sql +1 -0
- data/src/test/resources/org/embulk/output/mysql/test/expect/create_table/test1.csv +4 -0
- data/src/test/resources/org/embulk/output/mysql/test/expect/create_table/test_table_constraint.yml +5 -0
- data/src/test/resources/org/embulk/output/mysql/test/expect/create_table/test_table_constraint_expected.csv +3 -0
- data/src/test/resources/org/embulk/output/mysql/test/expect/create_table/test_table_option.yml +5 -0
- data/src/test/resources/org/embulk/output/mysql/test/expect/create_table/test_table_option_expected.csv +3 -0
- metadata +40 -18
- data/classpath/embulk-output-jdbc-0.7.7.jar +0 -0
- data/classpath/embulk-output-mysql-0.7.7.jar +0 -0
- data/classpath/mysql-connector-java-5.1.34.jar +0 -0
- data/src/test/java/org/embulk/output/mysql/MySQLOutputPluginTest.java +0 -569
- data/src/test/resources/mysql/yml/test-insert-after-load.yml +0 -22
- data/src/test/resources/mysql/yml/test-insert-before-load.yml +0 -22
- data/src/test/resources/mysql/yml/test-insert-direct-after-load.yml +0 -22
- data/src/test/resources/mysql/yml/test-insert-direct-before-load.yml +0 -22
- data/src/test/resources/mysql/yml/test-merge-after-load.yml +0 -22
- data/src/test/resources/mysql/yml/test-merge-before-load.yml +0 -22
- data/src/test/resources/mysql/yml/test-merge-direct-after-load.yml +0 -22
- data/src/test/resources/mysql/yml/test-merge-direct-before-load.yml +0 -22
- data/src/test/resources/mysql/yml/test-replace-after-load.yml +0 -22
- data/src/test/resources/mysql/yml/test-truncate-insert-after-load.yml +0 -22
- data/src/test/resources/mysql/yml/test-truncate-insert-before-load.yml +0 -22
@@ -1,22 +0,0 @@
|
|
1
|
-
in:
|
2
|
-
type: file
|
3
|
-
path_prefix: '/mysql/data/test1.csv'
|
4
|
-
parser:
|
5
|
-
charset: UTF-8
|
6
|
-
newline: CRLF
|
7
|
-
type: csv
|
8
|
-
delimiter: ','
|
9
|
-
quote: ''
|
10
|
-
columns:
|
11
|
-
- {name: id, type: string}
|
12
|
-
- {name: int_item, type: long}
|
13
|
-
- {name: varchar_item, type: string}
|
14
|
-
out:
|
15
|
-
type: mysql
|
16
|
-
host: #host#
|
17
|
-
database: #database#
|
18
|
-
user: #user#
|
19
|
-
password: #password#
|
20
|
-
table: test1
|
21
|
-
mode: merge_direct
|
22
|
-
after_load: "update test1 set varchar_item = 'x' where int_item = 9"
|
@@ -1,22 +0,0 @@
|
|
1
|
-
in:
|
2
|
-
type: file
|
3
|
-
path_prefix: '/mysql/data/test1.csv'
|
4
|
-
parser:
|
5
|
-
charset: UTF-8
|
6
|
-
newline: CRLF
|
7
|
-
type: csv
|
8
|
-
delimiter: ','
|
9
|
-
quote: ''
|
10
|
-
columns:
|
11
|
-
- {name: id, type: string}
|
12
|
-
- {name: int_item, type: long}
|
13
|
-
- {name: varchar_item, type: string}
|
14
|
-
out:
|
15
|
-
type: mysql
|
16
|
-
host: #host#
|
17
|
-
database: #database#
|
18
|
-
user: #user#
|
19
|
-
password: #password#
|
20
|
-
table: test1
|
21
|
-
mode: merge_direct
|
22
|
-
before_load: "delete from test1 where int_item = 9"
|
@@ -1,22 +0,0 @@
|
|
1
|
-
in:
|
2
|
-
type: file
|
3
|
-
path_prefix: '/mysql/data/test1.csv'
|
4
|
-
parser:
|
5
|
-
charset: UTF-8
|
6
|
-
newline: CRLF
|
7
|
-
type: csv
|
8
|
-
delimiter: ','
|
9
|
-
quote: ''
|
10
|
-
columns:
|
11
|
-
- {name: id, type: string}
|
12
|
-
- {name: int_item, type: long}
|
13
|
-
- {name: varchar_item, type: string}
|
14
|
-
out:
|
15
|
-
type: mysql
|
16
|
-
host: #host#
|
17
|
-
database: #database#
|
18
|
-
user: #user#
|
19
|
-
password: #password#
|
20
|
-
table: test1
|
21
|
-
mode: replace
|
22
|
-
after_load: "update test1 set varchar_item = 'x' where int_item = 9"
|
@@ -1,22 +0,0 @@
|
|
1
|
-
in:
|
2
|
-
type: file
|
3
|
-
path_prefix: '/mysql/data/test1.csv'
|
4
|
-
parser:
|
5
|
-
charset: UTF-8
|
6
|
-
newline: CRLF
|
7
|
-
type: csv
|
8
|
-
delimiter: ','
|
9
|
-
quote: ''
|
10
|
-
columns:
|
11
|
-
- {name: id, type: string}
|
12
|
-
- {name: int_item, type: long}
|
13
|
-
- {name: varchar_item, type: string}
|
14
|
-
out:
|
15
|
-
type: mysql
|
16
|
-
host: #host#
|
17
|
-
database: #database#
|
18
|
-
user: #user#
|
19
|
-
password: #password#
|
20
|
-
table: test1
|
21
|
-
mode: truncate_insert
|
22
|
-
after_load: "update test1 set varchar_item = 'x' where int_item = 9"
|
@@ -1,22 +0,0 @@
|
|
1
|
-
in:
|
2
|
-
type: file
|
3
|
-
path_prefix: '/mysql/data/test1.csv'
|
4
|
-
parser:
|
5
|
-
charset: UTF-8
|
6
|
-
newline: CRLF
|
7
|
-
type: csv
|
8
|
-
delimiter: ','
|
9
|
-
quote: ''
|
10
|
-
columns:
|
11
|
-
- {name: id, type: string}
|
12
|
-
- {name: int_item, type: long}
|
13
|
-
- {name: varchar_item, type: string}
|
14
|
-
out:
|
15
|
-
type: mysql
|
16
|
-
host: #host#
|
17
|
-
database: #database#
|
18
|
-
user: #user#
|
19
|
-
password: #password#
|
20
|
-
table: test1
|
21
|
-
mode: truncate_insert
|
22
|
-
before_load: "insert into test1 values('C001', 0, 'x')"
|