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.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +16 -0
  3. data/build.gradle +1 -2
  4. data/classpath/{embulk-output-jdbc-0.7.10.jar → embulk-output-jdbc-0.7.11.jar} +0 -0
  5. data/classpath/{embulk-output-mysql-0.7.10.jar → embulk-output-mysql-0.7.11.jar} +0 -0
  6. data/src/test/java/org/embulk/output/mysql/AfterLoadTest.java +136 -0
  7. data/src/test/java/org/embulk/output/mysql/BeforeLoadTest.java +124 -0
  8. data/src/test/java/org/embulk/output/mysql/MySQLTests.java +69 -0
  9. data/src/test/resources/org/embulk/output/mysql/test/expect/after_load/setup.sql +8 -0
  10. data/src/test/resources/org/embulk/output/mysql/test/expect/after_load/test1.csv +4 -0
  11. data/src/test/resources/org/embulk/output/mysql/test/expect/after_load/test_expected.diff +2 -0
  12. data/src/test/resources/org/embulk/output/mysql/test/expect/after_load/test_insert_after_load.yml +3 -0
  13. data/src/test/resources/org/embulk/output/mysql/test/expect/after_load/test_insert_after_load_expected.csv +5 -0
  14. data/src/test/resources/org/embulk/output/mysql/test/expect/after_load/test_insert_direct_after_load.yml +3 -0
  15. data/src/test/resources/org/embulk/output/mysql/test/expect/after_load/test_merge_after_load.yml +3 -0
  16. data/src/test/resources/org/embulk/output/mysql/test/expect/after_load/test_merge_after_load_expected.csv +5 -0
  17. data/src/test/resources/org/embulk/output/mysql/test/expect/after_load/test_merge_direct_after_load.yml +3 -0
  18. data/src/test/resources/org/embulk/output/mysql/test/expect/after_load/test_replace_after_load.yml +3 -0
  19. data/src/test/resources/org/embulk/output/mysql/test/expect/after_load/test_replace_after_load_expected.csv +3 -0
  20. data/src/test/resources/org/embulk/output/mysql/test/expect/after_load/test_truncate_insert_after_load.yml +3 -0
  21. data/src/test/resources/org/embulk/output/mysql/test/expect/after_load/test_truncate_insert_after_load_expected.csv +3 -0
  22. data/src/test/resources/org/embulk/output/mysql/test/expect/before_load/setup.sql +8 -0
  23. data/src/test/resources/org/embulk/output/mysql/test/expect/before_load/test1.csv +4 -0
  24. data/src/test/resources/org/embulk/output/mysql/test/expect/before_load/test_expected.diff +2 -0
  25. data/src/test/resources/org/embulk/output/mysql/test/expect/before_load/test_insert_before_load.yml +3 -0
  26. data/src/test/resources/{mysql/data/test1.csv → org/embulk/output/mysql/test/expect/before_load/test_insert_before_load_expected.csv} +1 -0
  27. data/src/test/resources/org/embulk/output/mysql/test/expect/before_load/test_insert_direct_before_load.yml +3 -0
  28. data/src/test/resources/org/embulk/output/mysql/test/expect/before_load/test_merge_before_load.yml +3 -0
  29. data/src/test/resources/org/embulk/output/mysql/test/expect/before_load/test_merge_before_load_expected.csv +4 -0
  30. data/src/test/resources/org/embulk/output/mysql/test/expect/before_load/test_merge_direct_before_load.yml +3 -0
  31. data/src/test/resources/org/embulk/output/mysql/test/expect/before_load/test_truncate_insert_before_load.yml +3 -0
  32. data/src/test/resources/org/embulk/output/mysql/test/expect/before_load/test_truncate_insert_before_load_expected.csv +4 -0
  33. metadata +31 -17
  34. data/src/test/java/org/embulk/output/mysql/MySQLOutputPluginTest.java +0 -569
  35. data/src/test/resources/mysql/yml/test-insert-after-load.yml +0 -22
  36. data/src/test/resources/mysql/yml/test-insert-before-load.yml +0 -22
  37. data/src/test/resources/mysql/yml/test-insert-direct-after-load.yml +0 -22
  38. data/src/test/resources/mysql/yml/test-insert-direct-before-load.yml +0 -22
  39. data/src/test/resources/mysql/yml/test-merge-after-load.yml +0 -22
  40. data/src/test/resources/mysql/yml/test-merge-before-load.yml +0 -22
  41. data/src/test/resources/mysql/yml/test-merge-direct-after-load.yml +0 -22
  42. data/src/test/resources/mysql/yml/test-merge-direct-before-load.yml +0 -22
  43. data/src/test/resources/mysql/yml/test-replace-after-load.yml +0 -22
  44. data/src/test/resources/mysql/yml/test-truncate-insert-after-load.yml +0 -22
  45. 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')"