embulk-output-mysql 0.7.10 → 0.7.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +16 -0
- data/build.gradle +1 -2
- data/classpath/{embulk-output-jdbc-0.7.10.jar → embulk-output-jdbc-0.7.11.jar} +0 -0
- data/classpath/{embulk-output-mysql-0.7.10.jar → embulk-output-mysql-0.7.11.jar} +0 -0
- 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/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
- metadata +31 -17
- 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: 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: insert
|
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: insert_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: insert_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: merge
|
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
|
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: 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')"
|