embulk-output-sqlserver 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 -1
- data/classpath/{embulk-output-jdbc-0.7.10.jar → embulk-output-jdbc-0.7.11.jar} +0 -0
- data/classpath/{embulk-output-sqlserver-0.7.10.jar → embulk-output-sqlserver-0.7.11.jar} +0 -0
- data/src/main/java/org/embulk/output/SQLServerOutputPlugin.java +17 -8
- data/src/test/java/org/embulk/output/sqlserver/BasicTest.java +200 -0
- data/src/test/java/org/embulk/output/sqlserver/SQLServerTests.java +80 -0
- data/src/test/resources/org/embulk/output/sqlserver/test/expect/basic/setup.sql +82 -0
- data/src/test/resources/org/embulk/output/sqlserver/test/expect/basic/test1.csv +4 -0
- data/src/test/resources/org/embulk/output/sqlserver/test/expect/basic/test_expected.diff +2 -0
- data/src/test/resources/org/embulk/output/sqlserver/test/expect/basic/test_insert.yml +2 -0
- data/src/test/resources/org/embulk/output/sqlserver/test/expect/basic/test_insert_create_expected.csv +3 -0
- data/src/test/resources/org/embulk/output/sqlserver/test/expect/basic/test_insert_direct.yml +2 -0
- data/src/test/resources/org/embulk/output/sqlserver/test/expect/basic/test_insert_expected.csv +4 -0
- data/src/test/resources/org/embulk/output/sqlserver/test/expect/basic/test_merge.csv +5 -0
- data/src/test/resources/org/embulk/output/sqlserver/test/expect/basic/test_merge.yml +2 -0
- data/src/test/resources/{sqlserver/data/test6/test6.csv → org/embulk/output/sqlserver/test/expect/basic/test_merge_expected.csv} +6 -4
- data/src/test/resources/org/embulk/output/sqlserver/test/expect/basic/test_merge_keys.yml +3 -0
- data/src/test/resources/org/embulk/output/sqlserver/test/expect/basic/test_merge_rule.yml +3 -0
- data/src/test/resources/org/embulk/output/sqlserver/test/expect/basic/test_merge_rule_expected.csv +6 -0
- data/src/test/resources/org/embulk/output/sqlserver/test/expect/basic/test_native_insert_direct.yml +3 -0
- data/src/test/resources/org/embulk/output/sqlserver/test/expect/basic/test_replace.yml +2 -0
- data/src/test/resources/org/embulk/output/sqlserver/test/expect/basic/test_replace_longname.yml +2 -0
- data/src/test/resources/org/embulk/output/sqlserver/test/expect/basic/test_string_timestamp.csv +4 -0
- data/src/test/resources/org/embulk/output/sqlserver/test/expect/basic/test_string_timestamp.yml +5 -0
- data/src/test/resources/org/embulk/output/sqlserver/test/expect/basic/test_string_timestamp_expected.csv +4 -0
- data/src/test/resources/org/embulk/output/sqlserver/test/expect/basic/test_truncate_insert.yml +2 -0
- data/src/test/resources/org/embulk/output/sqlserver/test/expect/basic/test_truncate_insert_expected.csv +3 -0
- metadata +27 -27
- data/src/test/java/org/embulk/output/sqlserver/PreciseTime.java +0 -48
- data/src/test/java/org/embulk/output/sqlserver/SQLServerOutputPluginTest.java +0 -923
- data/src/test/resources/sqlserver/data/test1/test1.csv +0 -3
- data/src/test/resources/sqlserver/data/test2/test2.csv +0 -2
- data/src/test/resources/sqlserver/data/test3/test3.csv +0 -2
- data/src/test/resources/sqlserver/data/test4/test4.csv +0 -2
- data/src/test/resources/sqlserver/data/test5/test5.csv +0 -2
- data/src/test/resources/sqlserver/yml/test-insert-direct.yml +0 -43
- data/src/test/resources/sqlserver/yml/test-insert.yml +0 -43
- data/src/test/resources/sqlserver/yml/test-jtds.yml +0 -43
- data/src/test/resources/sqlserver/yml/test-merge-keys.yml +0 -23
- data/src/test/resources/sqlserver/yml/test-merge-rule.yml +0 -22
- data/src/test/resources/sqlserver/yml/test-merge.yml +0 -21
- data/src/test/resources/sqlserver/yml/test-native-date.yml +0 -26
- data/src/test/resources/sqlserver/yml/test-native-decimal.yml +0 -25
- data/src/test/resources/sqlserver/yml/test-native-integer.yml +0 -24
- data/src/test/resources/sqlserver/yml/test-native-string.yml +0 -25
- data/src/test/resources/sqlserver/yml/test-native.yml +0 -44
- data/src/test/resources/sqlserver/yml/test-replace-long-name.yml +0 -43
- data/src/test/resources/sqlserver/yml/test-replace.yml +0 -43
- data/src/test/resources/sqlserver/yml/test-string-timestamp.yml +0 -46
- data/src/test/resources/sqlserver/yml/test-truncate-insert.yml +0 -43
@@ -1,3 +0,0 @@
|
|
1
|
-
A001,0,1234,123456,12345678901,0,1.23,3.456,12.34,123.4567,0.1234567,0.12345678901234,a,b,c,A,B,C,2016/1/1,2017/1/1 1:2:3.123,2018/1/1 1:2:3.1234567,2019/1/1 1:2:3.12,2020/1/1 1:2:3,3:4:5.1234567,6:7:8.12
|
2
|
-
A002,255,-32768,-2147483648,-9223372036854775808,1,-9999999999.99,-99.999,-214748.3648,-922337203685477.5808,-9999000000,-999999999999000000,あい,あいうえ,あいうえお,かき,かきくけ,かきくけこ,2016/12/31,2017/12/31 23:59:59.997,2018/12/31 23:59:59.9999999,2019/12/31 23:59:59.99,2020/12/31 23:59:59,23:59:59.9999999,23:59:59.99
|
3
|
-
A003,,,,,,,,,,,,,,,,,,,,,,,,
|
@@ -1,43 +0,0 @@
|
|
1
|
-
in:
|
2
|
-
type: file
|
3
|
-
path_prefix: '/sqlserver/data/test1/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: TINYINT_ITEM, type: long}
|
13
|
-
- {name: SMALLINT_ITEM, type: long}
|
14
|
-
- {name: INT_ITEM, type: long}
|
15
|
-
- {name: BIGINT_ITEM, type: long}
|
16
|
-
- {name: BIT_ITEM, type: boolean}
|
17
|
-
- {name: DECIMAL_ITEM, type: string}
|
18
|
-
- {name: NUMERIC_ITEM, type: string}
|
19
|
-
- {name: SMALLMONEY_ITEM, type: string}
|
20
|
-
- {name: MONEY_ITEM, type: string}
|
21
|
-
- {name: REAL_ITEM, type: double}
|
22
|
-
- {name: FLOAT_ITEM, type: double}
|
23
|
-
- {name: CHAR_ITEM, type: string}
|
24
|
-
- {name: VARCHAR_ITEM, type: string}
|
25
|
-
- {name: TEXT_ITEM, type: string}
|
26
|
-
- {name: NCHAR_ITEM, type: string}
|
27
|
-
- {name: NVARCHAR_ITEM, type: string}
|
28
|
-
- {name: NTEXT_ITEM, type: string}
|
29
|
-
- {name: DATE_ITEM, type: timestamp, format: '%Y/%m/%d'}
|
30
|
-
- {name: DATETIME_ITEM, type: timestamp, format: '%Y/%m/%d %H:%M:%S.%N'}
|
31
|
-
- {name: DATETIME2_ITEM, type: timestamp, format: '%Y/%m/%d %H:%M:%S.%N'}
|
32
|
-
- {name: DATETIME2_2_ITEM, type: timestamp, format: '%Y/%m/%d %H:%M:%S.%N'}
|
33
|
-
- {name: SMALLDATETIME_ITEM, type: timestamp, format: '%Y/%m/%d %H:%M:%S'}
|
34
|
-
- {name: TIME_ITEM, type: timestamp, format: '%H:%M:%S.%N'}
|
35
|
-
- {name: TIME_2_ITEM, type: timestamp, format: '%H:%M:%S.%N'}
|
36
|
-
out:
|
37
|
-
type: sqlserver
|
38
|
-
host: #host#
|
39
|
-
database: #database#
|
40
|
-
user: #user#
|
41
|
-
password: #password#
|
42
|
-
table: TEST1
|
43
|
-
mode: insert_direct
|
@@ -1,43 +0,0 @@
|
|
1
|
-
in:
|
2
|
-
type: file
|
3
|
-
path_prefix: '/sqlserver/data/test1/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: TINYINT_ITEM, type: long}
|
13
|
-
- {name: SMALLINT_ITEM, type: long}
|
14
|
-
- {name: INT_ITEM, type: long}
|
15
|
-
- {name: BIGINT_ITEM, type: long}
|
16
|
-
- {name: BIT_ITEM, type: boolean}
|
17
|
-
- {name: DECIMAL_ITEM, type: string}
|
18
|
-
- {name: NUMERIC_ITEM, type: string}
|
19
|
-
- {name: SMALLMONEY_ITEM, type: string}
|
20
|
-
- {name: MONEY_ITEM, type: string}
|
21
|
-
- {name: REAL_ITEM, type: double}
|
22
|
-
- {name: FLOAT_ITEM, type: double}
|
23
|
-
- {name: CHAR_ITEM, type: string}
|
24
|
-
- {name: VARCHAR_ITEM, type: string}
|
25
|
-
- {name: TEXT_ITEM, type: string}
|
26
|
-
- {name: NCHAR_ITEM, type: string}
|
27
|
-
- {name: NVARCHAR_ITEM, type: string}
|
28
|
-
- {name: NTEXT_ITEM, type: string}
|
29
|
-
- {name: DATE_ITEM, type: timestamp, format: '%Y/%m/%d'}
|
30
|
-
- {name: DATETIME_ITEM, type: timestamp, format: '%Y/%m/%d %H:%M:%S.%N'}
|
31
|
-
- {name: DATETIME2_ITEM, type: timestamp, format: '%Y/%m/%d %H:%M:%S.%N'}
|
32
|
-
- {name: DATETIME2_2_ITEM, type: timestamp, format: '%Y/%m/%d %H:%M:%S.%N'}
|
33
|
-
- {name: SMALLDATETIME_ITEM, type: timestamp, format: '%Y/%m/%d %H:%M:%S'}
|
34
|
-
- {name: TIME_ITEM, type: timestamp, format: '%H:%M:%S.%N'}
|
35
|
-
- {name: TIME_2_ITEM, type: timestamp, format: '%H:%M:%S.%N'}
|
36
|
-
out:
|
37
|
-
type: sqlserver
|
38
|
-
host: #host#
|
39
|
-
database: #database#
|
40
|
-
user: #user#
|
41
|
-
password: #password#
|
42
|
-
table: TEST1
|
43
|
-
mode: insert
|
@@ -1,43 +0,0 @@
|
|
1
|
-
in:
|
2
|
-
type: file
|
3
|
-
path_prefix: '/sqlserver/data/test1/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: TINYINT_ITEM, type: long}
|
13
|
-
- {name: SMALLINT_ITEM, type: long}
|
14
|
-
- {name: INT_ITEM, type: long}
|
15
|
-
- {name: BIGINT_ITEM, type: long}
|
16
|
-
- {name: BIT_ITEM, type: boolean}
|
17
|
-
- {name: DECIMAL_ITEM, type: string}
|
18
|
-
- {name: NUMERIC_ITEM, type: string}
|
19
|
-
- {name: SMALLMONEY_ITEM, type: string}
|
20
|
-
- {name: MONEY_ITEM, type: string}
|
21
|
-
- {name: REAL_ITEM, type: double}
|
22
|
-
- {name: FLOAT_ITEM, type: double}
|
23
|
-
- {name: CHAR_ITEM, type: string}
|
24
|
-
- {name: VARCHAR_ITEM, type: string}
|
25
|
-
- {name: TEXT_ITEM, type: string}
|
26
|
-
- {name: NCHAR_ITEM, type: string}
|
27
|
-
- {name: NVARCHAR_ITEM, type: string}
|
28
|
-
- {name: NTEXT_ITEM, type: string}
|
29
|
-
- {name: DATE_ITEM, type: timestamp, format: '%Y/%m/%d'}
|
30
|
-
- {name: DATETIME_ITEM, type: timestamp, format: '%Y/%m/%d %H:%M:%S.%N'}
|
31
|
-
- {name: DATETIME2_ITEM, type: timestamp, format: '%Y/%m/%d %H:%M:%S.%N'}
|
32
|
-
- {name: DATETIME2_2_ITEM, type: timestamp, format: '%Y/%m/%d %H:%M:%S.%N'}
|
33
|
-
- {name: SMALLDATETIME_ITEM, type: timestamp, format: '%Y/%m/%d %H:%M:%S'}
|
34
|
-
- {name: TIME_ITEM, type: timestamp, format: '%H:%M:%S.%N'}
|
35
|
-
- {name: TIME_2_ITEM, type: timestamp, format: '%H:%M:%S.%N'}
|
36
|
-
out:
|
37
|
-
type: sqlserver
|
38
|
-
host: #host#
|
39
|
-
database: #database#
|
40
|
-
user: #user#
|
41
|
-
password: #password#
|
42
|
-
table: TEST1
|
43
|
-
mode: insert_direct
|
@@ -1,23 +0,0 @@
|
|
1
|
-
in:
|
2
|
-
type: file
|
3
|
-
path_prefix: '/sqlserver/data/test6/test6.csv'
|
4
|
-
parser:
|
5
|
-
charset: UTF-8
|
6
|
-
newline: CRLF
|
7
|
-
type: csv
|
8
|
-
delimiter: ','
|
9
|
-
quote: ''
|
10
|
-
columns:
|
11
|
-
- {name: ITEM1, type: long}
|
12
|
-
- {name: ITEM2, type: long}
|
13
|
-
- {name: ITEM3, type: string}
|
14
|
-
out:
|
15
|
-
type: sqlserver
|
16
|
-
host: #host#
|
17
|
-
database: #database#
|
18
|
-
user: #user#
|
19
|
-
password: #password#
|
20
|
-
table: TEST6B
|
21
|
-
mode: merge
|
22
|
-
merge_keys: [ITEM1,ITEM2]
|
23
|
-
|
@@ -1,22 +0,0 @@
|
|
1
|
-
in:
|
2
|
-
type: file
|
3
|
-
path_prefix: '/sqlserver/data/test6/test6.csv'
|
4
|
-
parser:
|
5
|
-
charset: UTF-8
|
6
|
-
newline: CRLF
|
7
|
-
type: csv
|
8
|
-
delimiter: ','
|
9
|
-
quote: ''
|
10
|
-
columns:
|
11
|
-
- {name: ITEM1, type: long}
|
12
|
-
- {name: ITEM2, type: long}
|
13
|
-
- {name: ITEM3, type: string}
|
14
|
-
out:
|
15
|
-
type: sqlserver
|
16
|
-
host: #host#
|
17
|
-
database: #database#
|
18
|
-
user: #user#
|
19
|
-
password: #password#
|
20
|
-
table: TEST6
|
21
|
-
mode: merge
|
22
|
-
merge_rule: ["ITEM3 = T.ITEM3 + S.ITEM3"]
|
@@ -1,21 +0,0 @@
|
|
1
|
-
in:
|
2
|
-
type: file
|
3
|
-
path_prefix: '/sqlserver/data/test6/test6.csv'
|
4
|
-
parser:
|
5
|
-
charset: UTF-8
|
6
|
-
newline: CRLF
|
7
|
-
type: csv
|
8
|
-
delimiter: ','
|
9
|
-
quote: ''
|
10
|
-
columns:
|
11
|
-
- {name: ITEM1, type: long}
|
12
|
-
- {name: ITEM2, type: long}
|
13
|
-
- {name: ITEM3, type: string}
|
14
|
-
out:
|
15
|
-
type: sqlserver
|
16
|
-
host: #host#
|
17
|
-
database: #database#
|
18
|
-
user: #user#
|
19
|
-
password: #password#
|
20
|
-
table: TEST6
|
21
|
-
mode: merge
|
@@ -1,26 +0,0 @@
|
|
1
|
-
in:
|
2
|
-
type: file
|
3
|
-
path_prefix: '/sqlserver/data/test5/test5.csv'
|
4
|
-
parser:
|
5
|
-
charset: UTF-8
|
6
|
-
newline: CRLF
|
7
|
-
type: csv
|
8
|
-
delimiter: ','
|
9
|
-
quote: ''
|
10
|
-
columns:
|
11
|
-
- {name: ITEM1, type: timestamp, format: '%Y/%m/%d'}
|
12
|
-
- {name: ITEM2, type: timestamp, format: '%Y/%m/%d %H:%M:%S'}
|
13
|
-
- {name: ITEM3, type: timestamp, format: '%Y/%m/%d %H:%M:%S.%N'}
|
14
|
-
- {name: ITEM4, type: timestamp, format: '%Y/%m/%d %H:%M:%S.%N'}
|
15
|
-
- {name: ITEM5, type: timestamp, format: '%Y/%m/%d %H:%M:%S.%N'}
|
16
|
-
- {name: ITEM6, type: timestamp, format: '%H:%M:%S.%N'}
|
17
|
-
- {name: ITEM7, type: timestamp, format: '%H:%M:%S.%N'}
|
18
|
-
out:
|
19
|
-
type: sqlserver
|
20
|
-
host: #host#
|
21
|
-
database: #database#
|
22
|
-
user: #user#
|
23
|
-
password: #password#
|
24
|
-
table: TEST5
|
25
|
-
mode: insert_direct
|
26
|
-
insert_method: native
|
@@ -1,25 +0,0 @@
|
|
1
|
-
in:
|
2
|
-
type: file
|
3
|
-
path_prefix: '/sqlserver/data/test4/test4.csv'
|
4
|
-
parser:
|
5
|
-
charset: UTF-8
|
6
|
-
newline: CRLF
|
7
|
-
type: csv
|
8
|
-
delimiter: ','
|
9
|
-
quote: ''
|
10
|
-
columns:
|
11
|
-
- {name: ITEM1, type: double}
|
12
|
-
- {name: ITEM2, type: string}
|
13
|
-
- {name: ITEM3, type: string}
|
14
|
-
- {name: ITEM4, type: string}
|
15
|
-
- {name: ITEM5, type: double}
|
16
|
-
- {name: ITEM6, type: double}
|
17
|
-
out:
|
18
|
-
type: sqlserver
|
19
|
-
host: #host#
|
20
|
-
database: #database#
|
21
|
-
user: #user#
|
22
|
-
password: #password#
|
23
|
-
table: TEST4
|
24
|
-
mode: insert_direct
|
25
|
-
insert_method: native
|
@@ -1,24 +0,0 @@
|
|
1
|
-
in:
|
2
|
-
type: file
|
3
|
-
path_prefix: '/sqlserver/data/test3/test3.csv'
|
4
|
-
parser:
|
5
|
-
charset: UTF-8
|
6
|
-
newline: CRLF
|
7
|
-
type: csv
|
8
|
-
delimiter: ','
|
9
|
-
quote: ''
|
10
|
-
columns:
|
11
|
-
- {name: ITEM1, type: long}
|
12
|
-
- {name: ITEM2, type: long}
|
13
|
-
- {name: ITEM3, type: long}
|
14
|
-
- {name: ITEM4, type: long}
|
15
|
-
- {name: ITEM5, type: long}
|
16
|
-
out:
|
17
|
-
type: sqlserver
|
18
|
-
host: #host#
|
19
|
-
database: #database#
|
20
|
-
user: #user#
|
21
|
-
password: #password#
|
22
|
-
table: TEST3
|
23
|
-
mode: insert_direct
|
24
|
-
insert_method: native
|
@@ -1,25 +0,0 @@
|
|
1
|
-
in:
|
2
|
-
type: file
|
3
|
-
path_prefix: '/sqlserver/data/test2/test2.csv'
|
4
|
-
parser:
|
5
|
-
charset: UTF-8
|
6
|
-
newline: CRLF
|
7
|
-
type: csv
|
8
|
-
delimiter: ','
|
9
|
-
quote: ''
|
10
|
-
columns:
|
11
|
-
- {name: ITEM1, type: string}
|
12
|
-
- {name: ITEM2, type: string}
|
13
|
-
- {name: ITEM3, type: string}
|
14
|
-
- {name: ITEM4, type: string}
|
15
|
-
- {name: ITEM5, type: string}
|
16
|
-
- {name: ITEM6, type: string}
|
17
|
-
out:
|
18
|
-
type: sqlserver
|
19
|
-
host: #host#
|
20
|
-
database: #database#
|
21
|
-
user: #user#
|
22
|
-
password: #password#
|
23
|
-
table: TEST2
|
24
|
-
mode: insert_direct
|
25
|
-
insert_method: native
|
@@ -1,44 +0,0 @@
|
|
1
|
-
in:
|
2
|
-
type: file
|
3
|
-
path_prefix: '/sqlserver/data/test1/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: TINYINT_ITEM, type: long}
|
13
|
-
- {name: SMALLINT_ITEM, type: long}
|
14
|
-
- {name: INT_ITEM, type: long}
|
15
|
-
- {name: BIGINT_ITEM, type: long}
|
16
|
-
- {name: BIT_ITEM, type: boolean}
|
17
|
-
- {name: DECIMAL_ITEM, type: string}
|
18
|
-
- {name: NUMERIC_ITEM, type: string}
|
19
|
-
- {name: SMALLMONEY_ITEM, type: string}
|
20
|
-
- {name: MONEY_ITEM, type: string}
|
21
|
-
- {name: REAL_ITEM, type: double}
|
22
|
-
- {name: FLOAT_ITEM, type: double}
|
23
|
-
- {name: CHAR_ITEM, type: string}
|
24
|
-
- {name: VARCHAR_ITEM, type: string}
|
25
|
-
- {name: TEXT_ITEM, type: string}
|
26
|
-
- {name: NCHAR_ITEM, type: string}
|
27
|
-
- {name: NVARCHAR_ITEM, type: string}
|
28
|
-
- {name: NTEXT_ITEM, type: string}
|
29
|
-
- {name: DATE_ITEM, type: timestamp, format: '%Y/%m/%d'}
|
30
|
-
- {name: DATETIME_ITEM, type: timestamp, format: '%Y/%m/%d %H:%M:%S.%N'}
|
31
|
-
- {name: DATETIME2_ITEM, type: timestamp, format: '%Y/%m/%d %H:%M:%S.%N'}
|
32
|
-
- {name: DATETIME2_2_ITEM, type: timestamp, format: '%Y/%m/%d %H:%M:%S.%N'}
|
33
|
-
- {name: SMALLDATETIME_ITEM, type: timestamp, format: '%Y/%m/%d %H:%M:%S'}
|
34
|
-
- {name: TIME_ITEM, type: timestamp, format: '%H:%M:%S.%N'}
|
35
|
-
- {name: TIME_2_ITEM, type: timestamp, format: '%H:%M:%S.%N'}
|
36
|
-
out:
|
37
|
-
type: sqlserver
|
38
|
-
host: #host#
|
39
|
-
database: #database#
|
40
|
-
user: #user#
|
41
|
-
password: #password#
|
42
|
-
table: TEST1
|
43
|
-
mode: insert_direct
|
44
|
-
insert_method: native
|
@@ -1,43 +0,0 @@
|
|
1
|
-
in:
|
2
|
-
type: file
|
3
|
-
path_prefix: '/sqlserver/data/test1/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: TINYINT_ITEM, type: long}
|
13
|
-
- {name: SMALLINT_ITEM, type: long}
|
14
|
-
- {name: INT_ITEM, type: long}
|
15
|
-
- {name: BIGINT_ITEM, type: long}
|
16
|
-
- {name: BIT_ITEM, type: boolean}
|
17
|
-
- {name: DECIMAL_ITEM, type: string}
|
18
|
-
- {name: NUMERIC_ITEM, type: string}
|
19
|
-
- {name: SMALLMONEY_ITEM, type: string}
|
20
|
-
- {name: MONEY_ITEM, type: string}
|
21
|
-
- {name: REAL_ITEM, type: double}
|
22
|
-
- {name: FLOAT_ITEM, type: double}
|
23
|
-
- {name: CHAR_ITEM, type: string}
|
24
|
-
- {name: VARCHAR_ITEM, type: string}
|
25
|
-
- {name: TEXT_ITEM, type: string}
|
26
|
-
- {name: NCHAR_ITEM, type: string}
|
27
|
-
- {name: NVARCHAR_ITEM, type: string}
|
28
|
-
- {name: NTEXT_ITEM, type: string}
|
29
|
-
- {name: DATE_ITEM, type: timestamp, format: '%Y/%m/%d'}
|
30
|
-
- {name: DATETIME_ITEM, type: timestamp, format: '%Y/%m/%d %H:%M:%S.%N'}
|
31
|
-
- {name: DATETIME2_ITEM, type: timestamp, format: '%Y/%m/%d %H:%M:%S.%N'}
|
32
|
-
- {name: DATETIME2_2_ITEM, type: timestamp, format: '%Y/%m/%d %H:%M:%S.%N'}
|
33
|
-
- {name: SMALLDATETIME_ITEM, type: timestamp, format: '%Y/%m/%d %H:%M:%S'}
|
34
|
-
- {name: TIME_ITEM, type: timestamp, format: '%H:%M:%S.%N'}
|
35
|
-
- {name: TIME_2_ITEM, type: timestamp, format: '%H:%M:%S.%N'}
|
36
|
-
out:
|
37
|
-
type: sqlserver
|
38
|
-
host: #host#
|
39
|
-
database: #database#
|
40
|
-
user: #user#
|
41
|
-
password: #password#
|
42
|
-
table: TEST___A123456789B123456789C123456789D123456789E123456789F123456789G123456789H123456789I123456789J123456789K123456789L123456789
|
43
|
-
mode: replace
|
@@ -1,43 +0,0 @@
|
|
1
|
-
in:
|
2
|
-
type: file
|
3
|
-
path_prefix: '/sqlserver/data/test1/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: TINYINT_ITEM, type: long}
|
13
|
-
- {name: SMALLINT_ITEM, type: long}
|
14
|
-
- {name: INT_ITEM, type: long}
|
15
|
-
- {name: BIGINT_ITEM, type: long}
|
16
|
-
- {name: BIT_ITEM, type: boolean}
|
17
|
-
- {name: DECIMAL_ITEM, type: string}
|
18
|
-
- {name: NUMERIC_ITEM, type: string}
|
19
|
-
- {name: SMALLMONEY_ITEM, type: string}
|
20
|
-
- {name: MONEY_ITEM, type: string}
|
21
|
-
- {name: REAL_ITEM, type: double}
|
22
|
-
- {name: FLOAT_ITEM, type: double}
|
23
|
-
- {name: CHAR_ITEM, type: string}
|
24
|
-
- {name: VARCHAR_ITEM, type: string}
|
25
|
-
- {name: TEXT_ITEM, type: string}
|
26
|
-
- {name: NCHAR_ITEM, type: string}
|
27
|
-
- {name: NVARCHAR_ITEM, type: string}
|
28
|
-
- {name: NTEXT_ITEM, type: string}
|
29
|
-
- {name: DATE_ITEM, type: timestamp, format: '%Y/%m/%d'}
|
30
|
-
- {name: DATETIME_ITEM, type: timestamp, format: '%Y/%m/%d %H:%M:%S.%N'}
|
31
|
-
- {name: DATETIME2_ITEM, type: timestamp, format: '%Y/%m/%d %H:%M:%S.%N'}
|
32
|
-
- {name: DATETIME2_2_ITEM, type: timestamp, format: '%Y/%m/%d %H:%M:%S.%N'}
|
33
|
-
- {name: SMALLDATETIME_ITEM, type: timestamp, format: '%Y/%m/%d %H:%M:%S'}
|
34
|
-
- {name: TIME_ITEM, type: timestamp, format: '%H:%M:%S.%N'}
|
35
|
-
- {name: TIME_2_ITEM, type: timestamp, format: '%H:%M:%S.%N'}
|
36
|
-
out:
|
37
|
-
type: sqlserver
|
38
|
-
host: #host#
|
39
|
-
database: #database#
|
40
|
-
user: #user#
|
41
|
-
password: #password#
|
42
|
-
table: TEST1
|
43
|
-
mode: replace
|