embulk-output-kintone 1.1.0 → 1.2.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 +8 -0
- data/classpath/embulk-output-kintone-1.2.0.jar +0 -0
- data/classpath/{shadow-kintone-java-client-1.1.0-all.jar → shadow-kintone-java-client-1.2.0-all.jar} +0 -0
- data/src/main/java/org/embulk/output/kintone/KintoneClient.java +117 -0
- data/src/main/java/org/embulk/output/kintone/KintoneColumnType.java +30 -13
- data/src/main/java/org/embulk/output/kintone/KintoneColumnVisitor.java +54 -4
- data/src/main/java/org/embulk/output/kintone/KintoneMode.java +52 -4
- data/src/main/java/org/embulk/output/kintone/KintoneOutputPlugin.java +0 -17
- data/src/main/java/org/embulk/output/kintone/KintonePageOutput.java +106 -118
- data/src/main/java/org/embulk/output/kintone/PluginTask.java +5 -0
- data/src/main/java/org/embulk/output/kintone/record/Id.java +18 -0
- data/src/main/java/org/embulk/output/kintone/record/IdOrUpdateKey.java +45 -0
- data/src/main/java/org/embulk/output/kintone/record/Skip.java +14 -0
- data/src/main/java/org/embulk/output/kintone/util/Lazy.java +20 -0
- data/src/test/java/org/embulk/output/kintone/KintoneClientTest.java +139 -0
- data/src/test/java/org/embulk/output/kintone/KintoneColumnVisitorTest.java +33 -33
- data/src/test/java/org/embulk/output/kintone/KintoneColumnVisitorVerifier.java +6 -6
- data/src/test/java/org/embulk/output/kintone/KintonePageOutputVerifier.java +79 -53
- data/src/test/java/org/embulk/output/kintone/MockClient.java +112 -0
- data/src/test/java/org/embulk/output/kintone/TestKintoneOutputPlugin.java +64 -16
- data/src/test/java/org/embulk/output/kintone/TestTaskMode.java +1 -0
- data/src/test/java/org/embulk/output/kintone/TestTaskReduce.java +1 -0
- data/src/test/java/org/embulk/output/kintone/TestTaskReduceSubtable.java +1 -0
- data/src/test/java/org/embulk/output/kintone/TestTaskSkip.java +80 -0
- data/src/test/java/org/embulk/output/kintone/TestTaskSkipId.java +80 -0
- data/src/test/resources/org/embulk/output/kintone/client/config.yml +1 -0
- data/src/test/resources/org/embulk/output/kintone/task/config.yml +1 -0
- data/src/test/resources/org/embulk/output/kintone/task/mode/upsert_never_skip_double_single_line_text_add_values.json +1 -0
- data/src/test/resources/org/embulk/output/kintone/task/reduce/upsert_never_skip_double_single_line_text_add_values.json +1 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip/config.yml +1 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip/input.csv +7 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip/insert_add_records.jsonl +6 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip/insert_always_skip_add_records.jsonl +6 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip/insert_always_skip_prefer_nulls_add_records.jsonl +6 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip/insert_never_skip_add_records.jsonl +6 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip/insert_never_skip_prefer_nulls_add_records.jsonl +6 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip/insert_prefer_nulls_add_records.jsonl +6 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip/update_always_skip_long_number_add_values.json +1 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip/update_always_skip_long_number_values.json +1 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip/update_always_skip_prefer_nulls_long_number_add_values.json +1 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip/update_always_skip_prefer_nulls_long_number_values.json +1 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip/update_always_skip_prefer_nulls_update_records.jsonl +2 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip/update_always_skip_update_records.jsonl +5 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip/update_never_skip_update_records.jsonl +6 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip/update_prefer_nulls_update_records.jsonl +3 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip/update_update_records.jsonl +6 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip/upsert_add_records.jsonl +1 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip/upsert_always_skip_prefer_nulls_string_single_line_text_add_values.json +1 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip/upsert_always_skip_prefer_nulls_string_single_line_text_values.json +1 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip/upsert_always_skip_prefer_nulls_update_records.jsonl +2 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip/upsert_always_skip_string_single_line_text_add_values.json +1 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip/upsert_always_skip_string_single_line_text_values.json +1 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip/upsert_always_skip_update_records.jsonl +2 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip/upsert_never_skip_add_records.jsonl +4 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip/upsert_never_skip_prefer_nulls_add_records.jsonl +4 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip/upsert_never_skip_prefer_nulls_string_single_line_text_add_values.json +1 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip/upsert_never_skip_prefer_nulls_string_single_line_text_values.json +1 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip/upsert_never_skip_prefer_nulls_update_records.jsonl +2 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip/upsert_never_skip_string_single_line_text_add_values.json +1 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip/upsert_never_skip_string_single_line_text_values.json +1 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip/upsert_never_skip_update_records.jsonl +2 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip/upsert_prefer_nulls_add_records.jsonl +1 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip/upsert_prefer_nulls_string_single_line_text_add_values.json +1 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip/upsert_prefer_nulls_string_single_line_text_values.json +1 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip/upsert_prefer_nulls_update_records.jsonl +2 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip/upsert_string_single_line_text_add_values.json +1 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip/upsert_string_single_line_text_values.json +1 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip/upsert_update_records.jsonl +2 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip_id/config.yml +1 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip_id/input.csv +7 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip_id/insert_add_records.jsonl +6 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip_id/insert_always_skip_add_records.jsonl +6 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip_id/insert_always_skip_prefer_nulls_add_records.jsonl +6 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip_id/insert_never_skip_add_records.jsonl +6 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip_id/insert_never_skip_prefer_nulls_add_records.jsonl +6 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip_id/insert_prefer_nulls_add_records.jsonl +6 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip_id/update_always_skip__id_add_values.json +1 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip_id/update_always_skip__id_values.json +1 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip_id/update_always_skip_prefer_nulls__id_add_values.json +1 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip_id/update_always_skip_prefer_nulls__id_values.json +1 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip_id/update_always_skip_prefer_nulls_update_records.jsonl +2 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip_id/update_always_skip_update_records.jsonl +5 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip_id/update_never_skip_update_records.jsonl +6 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip_id/update_prefer_nulls_update_records.jsonl +3 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip_id/update_update_records.jsonl +6 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip_id/upsert__id_add_values.json +1 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip_id/upsert__id_values.json +1 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip_id/upsert_always_skip__id_add_values.json +1 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip_id/upsert_always_skip__id_values.json +1 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip_id/upsert_always_skip_prefer_nulls__id_add_values.json +1 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip_id/upsert_always_skip_prefer_nulls__id_values.json +1 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip_id/upsert_always_skip_prefer_nulls_update_records.jsonl +2 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip_id/upsert_always_skip_update_records.jsonl +5 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip_id/upsert_never_skip__id_add_values.json +1 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip_id/upsert_never_skip__id_values.json +1 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip_id/upsert_never_skip_add_records.jsonl +1 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip_id/upsert_never_skip_prefer_nulls__id_add_values.json +1 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip_id/upsert_never_skip_prefer_nulls__id_values.json +1 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip_id/upsert_never_skip_prefer_nulls_add_records.jsonl +4 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip_id/upsert_never_skip_prefer_nulls_update_records.jsonl +2 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip_id/upsert_never_skip_update_records.jsonl +5 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip_id/upsert_prefer_nulls__id_add_values.json +1 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip_id/upsert_prefer_nulls__id_values.json +1 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip_id/upsert_prefer_nulls_add_records.jsonl +3 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip_id/upsert_prefer_nulls_update_records.jsonl +2 -0
- data/src/test/resources/org/embulk/output/kintone/task/skip_id/upsert_update_records.jsonl +5 -0
- metadata +131 -43
- data/classpath/embulk-output-kintone-1.1.0.jar +0 -0
- data/src/test/resources/org/embulk/output/kintone/task/reduce_subtable/upsert_add_records.jsonl +0 -0
- /data/src/test/resources/org/embulk/output/kintone/task/mode/{insert_add_ignore_nulls_records.jsonl → insert_ignore_nulls_add_records.jsonl} +0 -0
- /data/src/test/resources/org/embulk/output/kintone/task/mode/{insert_add_prefer_nulls_records.jsonl → insert_prefer_nulls_add_records.jsonl} +0 -0
- /data/src/test/resources/org/embulk/output/kintone/task/mode/{update_update_ignore_nulls_records.jsonl → update_ignore_nulls_update_records.jsonl} +0 -0
- /data/src/test/resources/org/embulk/output/kintone/task/mode/{update_update_prefer_nulls_records.jsonl → update_prefer_nulls_update_records.jsonl} +0 -0
- /data/src/test/resources/org/embulk/output/kintone/task/mode/{upsert_add_records.jsonl → upsert_never_skip_add_records.jsonl} +0 -0
- /data/src/test/resources/org/embulk/output/kintone/task/mode/{values.json → upsert_never_skip_double_single_line_text_values.json} +0 -0
- /data/src/test/resources/org/embulk/output/kintone/task/mode/{upsert_add_ignore_nulls_records.jsonl → upsert_never_skip_ignore_nulls_add_records.jsonl} +0 -0
- /data/src/test/resources/org/embulk/output/kintone/task/mode/{values_ignore_nulls.json → upsert_never_skip_ignore_nulls_double_single_line_text_values.json} +0 -0
- /data/src/test/resources/org/embulk/output/kintone/task/mode/{upsert_update_ignore_nulls_records.jsonl → upsert_never_skip_ignore_nulls_update_records.jsonl} +0 -0
- /data/src/test/resources/org/embulk/output/kintone/task/mode/{upsert_add_prefer_nulls_records.jsonl → upsert_never_skip_prefer_nulls_add_records.jsonl} +0 -0
- /data/src/test/resources/org/embulk/output/kintone/task/mode/{values_prefer_nulls.json → upsert_never_skip_prefer_nulls_double_single_line_text_values.json} +0 -0
- /data/src/test/resources/org/embulk/output/kintone/task/mode/{upsert_update_prefer_nulls_records.jsonl → upsert_never_skip_prefer_nulls_update_records.jsonl} +0 -0
- /data/src/test/resources/org/embulk/output/kintone/task/mode/{upsert_update_records.jsonl → upsert_never_skip_update_records.jsonl} +0 -0
- /data/src/test/resources/org/embulk/output/kintone/task/reduce/{insert_add_ignore_nulls_records.jsonl → insert_ignore_nulls_add_records.jsonl} +0 -0
- /data/src/test/resources/org/embulk/output/kintone/task/reduce/{insert_add_prefer_nulls_records.jsonl → insert_prefer_nulls_add_records.jsonl} +0 -0
- /data/src/test/resources/org/embulk/output/kintone/task/reduce/{update_update_ignore_nulls_records.jsonl → update_ignore_nulls_update_records.jsonl} +0 -0
- /data/src/test/resources/org/embulk/output/kintone/task/reduce/{update_update_prefer_nulls_records.jsonl → update_prefer_nulls_update_records.jsonl} +0 -0
- /data/src/test/resources/org/embulk/output/kintone/task/reduce/{upsert_add_records.jsonl → upsert_never_skip_add_records.jsonl} +0 -0
- /data/src/test/resources/org/embulk/output/kintone/task/reduce/{values.json → upsert_never_skip_double_single_line_text_values.json} +0 -0
- /data/src/test/resources/org/embulk/output/kintone/task/reduce/{upsert_add_ignore_nulls_records.jsonl → upsert_never_skip_ignore_nulls_add_records.jsonl} +0 -0
- /data/src/test/resources/org/embulk/output/kintone/task/reduce/{values_ignore_nulls.json → upsert_never_skip_ignore_nulls_double_single_line_text_values.json} +0 -0
- /data/src/test/resources/org/embulk/output/kintone/task/reduce/{upsert_update_ignore_nulls_records.jsonl → upsert_never_skip_ignore_nulls_update_records.jsonl} +0 -0
- /data/src/test/resources/org/embulk/output/kintone/task/reduce/{upsert_add_prefer_nulls_records.jsonl → upsert_never_skip_prefer_nulls_add_records.jsonl} +0 -0
- /data/src/test/resources/org/embulk/output/kintone/task/reduce/{values_prefer_nulls.json → upsert_never_skip_prefer_nulls_double_single_line_text_values.json} +0 -0
- /data/src/test/resources/org/embulk/output/kintone/task/reduce/{upsert_update_prefer_nulls_records.jsonl → upsert_never_skip_prefer_nulls_update_records.jsonl} +0 -0
- /data/src/test/resources/org/embulk/output/kintone/task/reduce/{upsert_update_records.jsonl → upsert_never_skip_update_records.jsonl} +0 -0
- /data/src/test/resources/org/embulk/output/kintone/task/reduce_subtable/{insert_add_ignore_nulls_records.jsonl → insert_ignore_nulls_add_records.jsonl} +0 -0
- /data/src/test/resources/org/embulk/output/kintone/task/reduce_subtable/{insert_add_prefer_nulls_records.jsonl → insert_prefer_nulls_add_records.jsonl} +0 -0
- /data/src/test/resources/org/embulk/output/kintone/task/reduce_subtable/{update_update_ignore_nulls_records.jsonl → update_ignore_nulls_update_records.jsonl} +0 -0
- /data/src/test/resources/org/embulk/output/kintone/task/reduce_subtable/{update_update_prefer_nulls_records.jsonl → update_prefer_nulls_update_records.jsonl} +0 -0
- /data/src/test/resources/org/embulk/output/kintone/task/reduce_subtable/{values.json → upsert_never_skip_double_single_line_text_values.json} +0 -0
- /data/src/test/resources/org/embulk/output/kintone/task/reduce_subtable/{upsert_add_ignore_nulls_records.jsonl → upsert_never_skip_ignore_nulls_add_records.jsonl} +0 -0
- /data/src/test/resources/org/embulk/output/kintone/task/reduce_subtable/{values_ignore_nulls.json → upsert_never_skip_ignore_nulls_double_single_line_text_values.json} +0 -0
- /data/src/test/resources/org/embulk/output/kintone/task/reduce_subtable/{upsert_update_ignore_nulls_records.jsonl → upsert_never_skip_ignore_nulls_update_records.jsonl} +0 -0
- /data/src/test/resources/org/embulk/output/kintone/task/reduce_subtable/{upsert_add_prefer_nulls_records.jsonl → upsert_never_skip_prefer_nulls_add_records.jsonl} +0 -0
- /data/src/test/resources/org/embulk/output/kintone/task/reduce_subtable/{values_prefer_nulls.json → upsert_never_skip_prefer_nulls_double_single_line_text_values.json} +0 -0
- /data/src/test/resources/org/embulk/output/kintone/task/reduce_subtable/{upsert_update_prefer_nulls_records.jsonl → upsert_never_skip_prefer_nulls_update_records.jsonl} +0 -0
- /data/src/test/resources/org/embulk/output/kintone/task/reduce_subtable/{upsert_update_records.jsonl → upsert_never_skip_update_records.jsonl} +0 -0
@@ -26,6 +26,8 @@ import java.util.stream.Collectors;
|
|
26
26
|
import org.embulk.config.ConfigDiff;
|
27
27
|
import org.embulk.config.ConfigSource;
|
28
28
|
import org.embulk.config.TaskSource;
|
29
|
+
import org.embulk.output.kintone.record.Id;
|
30
|
+
import org.embulk.output.kintone.record.Skip;
|
29
31
|
import org.embulk.spi.Column;
|
30
32
|
import org.embulk.spi.Exec;
|
31
33
|
import org.embulk.spi.OutputPlugin;
|
@@ -132,14 +134,16 @@ public class TestKintoneOutputPlugin extends KintoneOutputPlugin {
|
|
132
134
|
String test = config.get(String.class, "domain");
|
133
135
|
String mode = config.get(String.class, "mode");
|
134
136
|
String field = config.get(String.class, "update_key", null);
|
137
|
+
Skip skip = config.get(Skip.class, "skip_if_non_existing_id_or_update_key");
|
135
138
|
boolean preferNulls = config.get(boolean.class, "prefer_nulls", false);
|
136
139
|
boolean ignoreNulls = config.get(boolean.class, "ignore_nulls", false);
|
137
140
|
return new KintonePageOutputVerifier(
|
138
141
|
test,
|
139
142
|
field,
|
140
|
-
getValues(test, preferNulls, ignoreNulls),
|
141
|
-
|
142
|
-
|
143
|
+
getValues(test, mode, skip, preferNulls, ignoreNulls, field),
|
144
|
+
getAddValues(test, mode, skip, preferNulls, ignoreNulls, field),
|
145
|
+
getAddRecords(test, mode, skip, preferNulls, ignoreNulls),
|
146
|
+
getUpdateRecords(test, mode, skip, preferNulls, ignoreNulls, field));
|
143
147
|
}
|
144
148
|
|
145
149
|
private TransactionalPageOutput openWithVerifier(
|
@@ -147,15 +151,17 @@ public class TestKintoneOutputPlugin extends KintoneOutputPlugin {
|
|
147
151
|
String test = taskSource.get(String.class, "Domain");
|
148
152
|
String mode = taskSource.get(String.class, "Mode");
|
149
153
|
String field = taskSource.get(String.class, "UpdateKeyName");
|
154
|
+
Skip skip = taskSource.get(Skip.class, "SkipIfNonExistingIdOrUpdateKey");
|
150
155
|
boolean preferNulls = taskSource.get(boolean.class, "PreferNulls");
|
151
156
|
boolean ignoreNulls = taskSource.get(boolean.class, "IgnoreNulls");
|
152
157
|
return new KintonePageOutputVerifier(
|
153
158
|
super.open(taskSource, schema, taskIndex),
|
154
159
|
test,
|
155
160
|
field,
|
156
|
-
getValues(test, preferNulls, ignoreNulls),
|
157
|
-
|
158
|
-
|
161
|
+
getValues(test, mode, skip, preferNulls, ignoreNulls, field),
|
162
|
+
getAddValues(test, mode, skip, preferNulls, ignoreNulls, field),
|
163
|
+
getAddRecords(test, mode, skip, preferNulls, ignoreNulls),
|
164
|
+
getUpdateRecords(test, mode, skip, preferNulls, ignoreNulls, field));
|
159
165
|
}
|
160
166
|
|
161
167
|
private static Set<Column> getDerivedColumns(String test) {
|
@@ -168,11 +174,34 @@ public class TestKintoneOutputPlugin extends KintoneOutputPlugin {
|
|
168
174
|
.collect(Collectors.toSet());
|
169
175
|
}
|
170
176
|
|
171
|
-
private static List<String> getValues(
|
177
|
+
private static List<String> getValues(
|
178
|
+
String test, String mode, Skip skip, boolean preferNulls, boolean ignoreNulls, String field) {
|
172
179
|
String name =
|
173
180
|
String.format(
|
174
|
-
"%s
|
175
|
-
test,
|
181
|
+
"%s/%s%s%s%s_values.json",
|
182
|
+
test,
|
183
|
+
mode,
|
184
|
+
format(skip),
|
185
|
+
ignoreNulls ? "_ignore_nulls" : preferNulls ? "_prefer_nulls" : "",
|
186
|
+
format(field));
|
187
|
+
String json = existsResource(name) ? readResource(name) : null;
|
188
|
+
return json == null || json.isEmpty()
|
189
|
+
? Collections.emptyList()
|
190
|
+
: PARSER.parse(json).asArrayValue().list().stream()
|
191
|
+
.map(Value::toJson)
|
192
|
+
.collect(Collectors.toList());
|
193
|
+
}
|
194
|
+
|
195
|
+
private static List<String> getAddValues(
|
196
|
+
String test, String mode, Skip skip, boolean preferNulls, boolean ignoreNulls, String field) {
|
197
|
+
String name =
|
198
|
+
String.format(
|
199
|
+
"%s/%s%s%s%s_add_values.json",
|
200
|
+
test,
|
201
|
+
mode,
|
202
|
+
format(skip),
|
203
|
+
ignoreNulls ? "_ignore_nulls" : preferNulls ? "_prefer_nulls" : "",
|
204
|
+
format(field));
|
176
205
|
String json = existsResource(name) ? readResource(name) : null;
|
177
206
|
return json == null || json.isEmpty()
|
178
207
|
? Collections.emptyList()
|
@@ -182,11 +211,14 @@ public class TestKintoneOutputPlugin extends KintoneOutputPlugin {
|
|
182
211
|
}
|
183
212
|
|
184
213
|
private static List<Record> getAddRecords(
|
185
|
-
String test, String mode, boolean preferNulls, boolean ignoreNulls) {
|
214
|
+
String test, String mode, Skip skip, boolean preferNulls, boolean ignoreNulls) {
|
186
215
|
String name =
|
187
216
|
String.format(
|
188
|
-
"%s/%
|
189
|
-
test,
|
217
|
+
"%s/%s%s%s_add_records.jsonl",
|
218
|
+
test,
|
219
|
+
mode,
|
220
|
+
format(skip),
|
221
|
+
ignoreNulls ? "_ignore_nulls" : preferNulls ? "_prefer_nulls" : "");
|
190
222
|
String jsonl = existsResource(name) ? readResource(name) : null;
|
191
223
|
return jsonl == null || jsonl.isEmpty()
|
192
224
|
? Collections.emptyList()
|
@@ -196,21 +228,37 @@ public class TestKintoneOutputPlugin extends KintoneOutputPlugin {
|
|
196
228
|
}
|
197
229
|
|
198
230
|
private static List<RecordForUpdate> getUpdateRecords(
|
199
|
-
String test, String mode, boolean preferNulls, boolean ignoreNulls, String field) {
|
231
|
+
String test, String mode, Skip skip, boolean preferNulls, boolean ignoreNulls, String field) {
|
200
232
|
Function<Record, UpdateKey> key = getKey(field);
|
233
|
+
Function<Record, RecordForUpdate> forUpdate =
|
234
|
+
record ->
|
235
|
+
Id.FIELD.equals(field)
|
236
|
+
? new RecordForUpdate(record.getId(), Record.newFrom(record))
|
237
|
+
: new RecordForUpdate(key.apply(record), record.removeField(field));
|
201
238
|
String name =
|
202
239
|
String.format(
|
203
|
-
"%s/%
|
204
|
-
test,
|
240
|
+
"%s/%s%s%s_update_records.jsonl",
|
241
|
+
test,
|
242
|
+
mode,
|
243
|
+
format(skip),
|
244
|
+
ignoreNulls ? "_ignore_nulls" : preferNulls ? "_prefer_nulls" : "");
|
205
245
|
String jsonl = existsResource(name) ? readResource(name) : null;
|
206
246
|
return jsonl == null || jsonl.isEmpty()
|
207
247
|
? Collections.emptyList()
|
208
248
|
: Arrays.stream(jsonl.split("\\r?\\n|\\r"))
|
209
249
|
.map(s -> Json.parse(s, Record.class))
|
210
|
-
.map(
|
250
|
+
.map(forUpdate)
|
211
251
|
.collect(Collectors.toList());
|
212
252
|
}
|
213
253
|
|
254
|
+
private static String format(Skip skip) {
|
255
|
+
return skip == Skip.AUTO ? "" : String.format("_%s_skip", skip.name().toLowerCase());
|
256
|
+
}
|
257
|
+
|
258
|
+
private static String format(String string) {
|
259
|
+
return string == null ? "" : String.format("_%s", string.replace('$', '_'));
|
260
|
+
}
|
261
|
+
|
214
262
|
private static Function<Record, UpdateKey> getKey(String field) {
|
215
263
|
return field == null
|
216
264
|
? record -> null
|
@@ -34,6 +34,7 @@ public class TestTaskMode extends TestTask {
|
|
34
34
|
@Test
|
35
35
|
public void testUpsert() throws Exception {
|
36
36
|
merge(config("mode: upsert", "update_key: double_single_line_text"));
|
37
|
+
merge(config("skip_if_non_existing_id_or_update_key: never"));
|
37
38
|
runOutput();
|
38
39
|
merge(config("prefer_nulls: true"));
|
39
40
|
runOutput();
|
@@ -36,6 +36,7 @@ public class TestTaskReduce extends TestTask {
|
|
36
36
|
@Test
|
37
37
|
public void testUpsert() throws Exception {
|
38
38
|
merge(config("mode: upsert", "update_key: double_single_line_text"));
|
39
|
+
merge(config("skip_if_non_existing_id_or_update_key: never"));
|
39
40
|
merge(config("reduce_key: string_number"));
|
40
41
|
runOutput();
|
41
42
|
merge(config("prefer_nulls: true"));
|
@@ -36,6 +36,7 @@ public class TestTaskReduceSubtable extends TestTask {
|
|
36
36
|
@Test
|
37
37
|
public void testUpsert() throws Exception {
|
38
38
|
merge(config("mode: upsert", "update_key: double_single_line_text"));
|
39
|
+
merge(config("skip_if_non_existing_id_or_update_key: never"));
|
39
40
|
merge(config("reduce_key: double_single_line_text"));
|
40
41
|
runOutput();
|
41
42
|
merge(config("prefer_nulls: true"));
|
@@ -0,0 +1,80 @@
|
|
1
|
+
package org.embulk.output.kintone;
|
2
|
+
|
3
|
+
import static org.hamcrest.MatcherAssert.assertThat;
|
4
|
+
import static org.hamcrest.Matchers.instanceOf;
|
5
|
+
import static org.hamcrest.Matchers.is;
|
6
|
+
import static org.junit.Assert.assertThrows;
|
7
|
+
|
8
|
+
import net.jcip.annotations.NotThreadSafe;
|
9
|
+
import org.embulk.exec.PartialExecutionException;
|
10
|
+
import org.junit.Test;
|
11
|
+
|
12
|
+
@NotThreadSafe
|
13
|
+
public class TestTaskSkip extends TestTask {
|
14
|
+
@Override
|
15
|
+
public void before() {
|
16
|
+
super.before();
|
17
|
+
merge(config("domain: task/skip"));
|
18
|
+
}
|
19
|
+
|
20
|
+
@Test
|
21
|
+
public void testInsert() throws Exception {
|
22
|
+
merge(config("mode: insert", "update_key: null"));
|
23
|
+
merge(config("skip_if_non_existing_id_or_update_key: auto"));
|
24
|
+
runOutput();
|
25
|
+
merge(config("skip_if_non_existing_id_or_update_key: never"));
|
26
|
+
runOutput();
|
27
|
+
merge(config("skip_if_non_existing_id_or_update_key: always"));
|
28
|
+
runOutput();
|
29
|
+
merge(config("prefer_nulls: true"));
|
30
|
+
merge(config("skip_if_non_existing_id_or_update_key: auto"));
|
31
|
+
runOutput();
|
32
|
+
merge(config("skip_if_non_existing_id_or_update_key: never"));
|
33
|
+
runOutput();
|
34
|
+
merge(config("skip_if_non_existing_id_or_update_key: always"));
|
35
|
+
runOutput();
|
36
|
+
}
|
37
|
+
|
38
|
+
@Test
|
39
|
+
public void testUpdate() throws Exception {
|
40
|
+
merge(config("mode: update", "update_key: long_number"));
|
41
|
+
merge(config("skip_if_non_existing_id_or_update_key: auto"));
|
42
|
+
runOutput();
|
43
|
+
merge(config("skip_if_non_existing_id_or_update_key: never"));
|
44
|
+
runOutput();
|
45
|
+
merge(config("skip_if_non_existing_id_or_update_key: always"));
|
46
|
+
runOutput();
|
47
|
+
merge(config("prefer_nulls: true"));
|
48
|
+
merge(config("skip_if_non_existing_id_or_update_key: auto"));
|
49
|
+
runOutput();
|
50
|
+
merge(config("skip_if_non_existing_id_or_update_key: never"));
|
51
|
+
assertNoIdOrUpdateKeyValueWasSpecified();
|
52
|
+
merge(config("skip_if_non_existing_id_or_update_key: always"));
|
53
|
+
runOutput();
|
54
|
+
}
|
55
|
+
|
56
|
+
@Test
|
57
|
+
public void testUpsert() throws Exception {
|
58
|
+
merge(config("mode: upsert", "update_key: string_single_line_text"));
|
59
|
+
merge(config("skip_if_non_existing_id_or_update_key: auto"));
|
60
|
+
runOutput();
|
61
|
+
merge(config("skip_if_non_existing_id_or_update_key: never"));
|
62
|
+
runOutput();
|
63
|
+
merge(config("skip_if_non_existing_id_or_update_key: always"));
|
64
|
+
runOutput();
|
65
|
+
merge(config("prefer_nulls: true"));
|
66
|
+
merge(config("skip_if_non_existing_id_or_update_key: auto"));
|
67
|
+
runOutput();
|
68
|
+
merge(config("skip_if_non_existing_id_or_update_key: never"));
|
69
|
+
runOutput();
|
70
|
+
merge(config("skip_if_non_existing_id_or_update_key: always"));
|
71
|
+
runOutput();
|
72
|
+
}
|
73
|
+
|
74
|
+
private void assertNoIdOrUpdateKeyValueWasSpecified() {
|
75
|
+
Exception e = assertThrows(PartialExecutionException.class, this::runOutput);
|
76
|
+
assertThat(e.getCause(), is(instanceOf(RuntimeException.class)));
|
77
|
+
assertThat(e.getCause().getCause(), is(instanceOf(RuntimeException.class)));
|
78
|
+
assertThat(e.getCause().getCause().getMessage(), is("No id or update key value was specified"));
|
79
|
+
}
|
80
|
+
}
|
@@ -0,0 +1,80 @@
|
|
1
|
+
package org.embulk.output.kintone;
|
2
|
+
|
3
|
+
import static org.hamcrest.MatcherAssert.assertThat;
|
4
|
+
import static org.hamcrest.Matchers.instanceOf;
|
5
|
+
import static org.hamcrest.Matchers.is;
|
6
|
+
import static org.junit.Assert.assertThrows;
|
7
|
+
|
8
|
+
import net.jcip.annotations.NotThreadSafe;
|
9
|
+
import org.embulk.exec.PartialExecutionException;
|
10
|
+
import org.junit.Test;
|
11
|
+
|
12
|
+
@NotThreadSafe
|
13
|
+
public class TestTaskSkipId extends TestTask {
|
14
|
+
@Override
|
15
|
+
public void before() {
|
16
|
+
super.before();
|
17
|
+
merge(config("domain: task/skip_id"));
|
18
|
+
}
|
19
|
+
|
20
|
+
@Test
|
21
|
+
public void testInsert() throws Exception {
|
22
|
+
merge(config("mode: insert"));
|
23
|
+
merge(config("skip_if_non_existing_id_or_update_key: auto"));
|
24
|
+
runOutput();
|
25
|
+
merge(config("skip_if_non_existing_id_or_update_key: never"));
|
26
|
+
runOutput();
|
27
|
+
merge(config("skip_if_non_existing_id_or_update_key: always"));
|
28
|
+
runOutput();
|
29
|
+
merge(config("prefer_nulls: true"));
|
30
|
+
merge(config("skip_if_non_existing_id_or_update_key: auto"));
|
31
|
+
runOutput();
|
32
|
+
merge(config("skip_if_non_existing_id_or_update_key: never"));
|
33
|
+
runOutput();
|
34
|
+
merge(config("skip_if_non_existing_id_or_update_key: always"));
|
35
|
+
runOutput();
|
36
|
+
}
|
37
|
+
|
38
|
+
@Test
|
39
|
+
public void testUpdate() throws Exception {
|
40
|
+
merge(config("mode: update", "update_key: $id"));
|
41
|
+
merge(config("skip_if_non_existing_id_or_update_key: auto"));
|
42
|
+
runOutput();
|
43
|
+
merge(config("skip_if_non_existing_id_or_update_key: never"));
|
44
|
+
runOutput();
|
45
|
+
merge(config("skip_if_non_existing_id_or_update_key: always"));
|
46
|
+
runOutput();
|
47
|
+
merge(config("prefer_nulls: true"));
|
48
|
+
merge(config("skip_if_non_existing_id_or_update_key: auto"));
|
49
|
+
runOutput();
|
50
|
+
merge(config("skip_if_non_existing_id_or_update_key: never"));
|
51
|
+
assertNoIdOrUpdateKeyValueWasSpecified();
|
52
|
+
merge(config("skip_if_non_existing_id_or_update_key: always"));
|
53
|
+
runOutput();
|
54
|
+
}
|
55
|
+
|
56
|
+
@Test
|
57
|
+
public void testUpsert() throws Exception {
|
58
|
+
merge(config("mode: upsert", "update_key: $id"));
|
59
|
+
merge(config("skip_if_non_existing_id_or_update_key: auto"));
|
60
|
+
runOutput();
|
61
|
+
merge(config("skip_if_non_existing_id_or_update_key: never"));
|
62
|
+
runOutput();
|
63
|
+
merge(config("skip_if_non_existing_id_or_update_key: always"));
|
64
|
+
runOutput();
|
65
|
+
merge(config("prefer_nulls: true"));
|
66
|
+
merge(config("skip_if_non_existing_id_or_update_key: auto"));
|
67
|
+
runOutput();
|
68
|
+
merge(config("skip_if_non_existing_id_or_update_key: never"));
|
69
|
+
runOutput();
|
70
|
+
merge(config("skip_if_non_existing_id_or_update_key: always"));
|
71
|
+
runOutput();
|
72
|
+
}
|
73
|
+
|
74
|
+
private void assertNoIdOrUpdateKeyValueWasSpecified() {
|
75
|
+
Exception e = assertThrows(PartialExecutionException.class, this::runOutput);
|
76
|
+
assertThat(e.getCause(), is(instanceOf(RuntimeException.class)));
|
77
|
+
assertThat(e.getCause().getCause(), is(instanceOf(RuntimeException.class)));
|
78
|
+
assertThat(e.getCause().getCause().getMessage(), is("No id or update key value was specified"));
|
79
|
+
}
|
80
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
domain: client
|
@@ -0,0 +1 @@
|
|
1
|
+
["1.0","123.0"]
|
@@ -0,0 +1 @@
|
|
1
|
+
["1.0","123.0"]
|
@@ -0,0 +1 @@
|
|
1
|
+
{}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
$id:long,long_number:long,string_single_line_text:string,boolean:boolean,long:long,double:double,string:string,timestamp:timestamp,json:json
|
2
|
+
123,123,abc,true,123,123,abc,1999-12-31 23:59:59.000 +0000,"""abc"""
|
3
|
+
,,,,,,,,
|
4
|
+
456,456,def,false,456,456,def,2000-01-01 00:00:00.000 +0000,"""def"""
|
5
|
+
,,,,,,,,
|
6
|
+
789,789,ghi,,789,789,ghi,,"""ghi"""
|
7
|
+
,,,,,,,,
|
@@ -0,0 +1,6 @@
|
|
1
|
+
{"long_number":{"type":"NUMBER","value":"123"},"string_single_line_text":{"type":"MULTI_LINE_TEXT","value":"abc"},"boolean":{"type":"NUMBER","value":"1"},"long":{"type":"NUMBER","value":"123"},"double":{"type":"NUMBER","value":"123.0"},"string":{"type":"MULTI_LINE_TEXT","value":"abc"},"timestamp":{"type":"DATETIME","value":"1999-12-31T23:59:59Z"},"json":{"type":"MULTI_LINE_TEXT","value":"\"abc\""}}
|
2
|
+
{"long_number":{"type":"NUMBER","value":"0"},"string_single_line_text":{"type":"MULTI_LINE_TEXT","value":""},"boolean":{"type":"NUMBER","value":"0"},"long":{"type":"NUMBER","value":"0"},"double":{"type":"NUMBER","value":"0.0"},"string":{"type":"MULTI_LINE_TEXT","value":""},"timestamp":{"type":"DATETIME","value":"1970-01-01T00:00:00Z"},"json":{"type":"MULTI_LINE_TEXT","value":"\"\""}}
|
3
|
+
{"long_number":{"type":"NUMBER","value":"456"},"string_single_line_text":{"type":"MULTI_LINE_TEXT","value":"def"},"boolean":{"type":"NUMBER","value":"0"},"long":{"type":"NUMBER","value":"456"},"double":{"type":"NUMBER","value":"456.0"},"string":{"type":"MULTI_LINE_TEXT","value":"def"},"timestamp":{"type":"DATETIME","value":"2000-01-01T00:00:00Z"},"json":{"type":"MULTI_LINE_TEXT","value":"\"def\""}}
|
4
|
+
{"long_number":{"type":"NUMBER","value":"0"},"string_single_line_text":{"type":"MULTI_LINE_TEXT","value":""},"boolean":{"type":"NUMBER","value":"0"},"long":{"type":"NUMBER","value":"0"},"double":{"type":"NUMBER","value":"0.0"},"string":{"type":"MULTI_LINE_TEXT","value":""},"timestamp":{"type":"DATETIME","value":"1970-01-01T00:00:00Z"},"json":{"type":"MULTI_LINE_TEXT","value":"\"\""}}
|
5
|
+
{"long_number":{"type":"NUMBER","value":"789"},"string_single_line_text":{"type":"MULTI_LINE_TEXT","value":"ghi"},"boolean":{"type":"NUMBER","value":"0"},"long":{"type":"NUMBER","value":"789"},"double":{"type":"NUMBER","value":"789.0"},"string":{"type":"MULTI_LINE_TEXT","value":"ghi"},"timestamp":{"type":"DATETIME","value":"1970-01-01T00:00:00Z"},"json":{"type":"MULTI_LINE_TEXT","value":"\"ghi\""}}
|
6
|
+
{"long_number":{"type":"NUMBER","value":"0"},"string_single_line_text":{"type":"MULTI_LINE_TEXT","value":""},"boolean":{"type":"NUMBER","value":"0"},"long":{"type":"NUMBER","value":"0"},"double":{"type":"NUMBER","value":"0.0"},"string":{"type":"MULTI_LINE_TEXT","value":""},"timestamp":{"type":"DATETIME","value":"1970-01-01T00:00:00Z"},"json":{"type":"MULTI_LINE_TEXT","value":"\"\""}}
|
data/src/test/resources/org/embulk/output/kintone/task/skip/insert_always_skip_add_records.jsonl
ADDED
@@ -0,0 +1,6 @@
|
|
1
|
+
{"long_number":{"type":"NUMBER","value":"123"},"string_single_line_text":{"type":"MULTI_LINE_TEXT","value":"abc"},"boolean":{"type":"NUMBER","value":"1"},"long":{"type":"NUMBER","value":"123"},"double":{"type":"NUMBER","value":"123.0"},"string":{"type":"MULTI_LINE_TEXT","value":"abc"},"timestamp":{"type":"DATETIME","value":"1999-12-31T23:59:59Z"},"json":{"type":"MULTI_LINE_TEXT","value":"\"abc\""}}
|
2
|
+
{"long_number":{"type":"NUMBER","value":"0"},"string_single_line_text":{"type":"MULTI_LINE_TEXT","value":""},"boolean":{"type":"NUMBER","value":"0"},"long":{"type":"NUMBER","value":"0"},"double":{"type":"NUMBER","value":"0.0"},"string":{"type":"MULTI_LINE_TEXT","value":""},"timestamp":{"type":"DATETIME","value":"1970-01-01T00:00:00Z"},"json":{"type":"MULTI_LINE_TEXT","value":"\"\""}}
|
3
|
+
{"long_number":{"type":"NUMBER","value":"456"},"string_single_line_text":{"type":"MULTI_LINE_TEXT","value":"def"},"boolean":{"type":"NUMBER","value":"0"},"long":{"type":"NUMBER","value":"456"},"double":{"type":"NUMBER","value":"456.0"},"string":{"type":"MULTI_LINE_TEXT","value":"def"},"timestamp":{"type":"DATETIME","value":"2000-01-01T00:00:00Z"},"json":{"type":"MULTI_LINE_TEXT","value":"\"def\""}}
|
4
|
+
{"long_number":{"type":"NUMBER","value":"0"},"string_single_line_text":{"type":"MULTI_LINE_TEXT","value":""},"boolean":{"type":"NUMBER","value":"0"},"long":{"type":"NUMBER","value":"0"},"double":{"type":"NUMBER","value":"0.0"},"string":{"type":"MULTI_LINE_TEXT","value":""},"timestamp":{"type":"DATETIME","value":"1970-01-01T00:00:00Z"},"json":{"type":"MULTI_LINE_TEXT","value":"\"\""}}
|
5
|
+
{"long_number":{"type":"NUMBER","value":"789"},"string_single_line_text":{"type":"MULTI_LINE_TEXT","value":"ghi"},"boolean":{"type":"NUMBER","value":"0"},"long":{"type":"NUMBER","value":"789"},"double":{"type":"NUMBER","value":"789.0"},"string":{"type":"MULTI_LINE_TEXT","value":"ghi"},"timestamp":{"type":"DATETIME","value":"1970-01-01T00:00:00Z"},"json":{"type":"MULTI_LINE_TEXT","value":"\"ghi\""}}
|
6
|
+
{"long_number":{"type":"NUMBER","value":"0"},"string_single_line_text":{"type":"MULTI_LINE_TEXT","value":""},"boolean":{"type":"NUMBER","value":"0"},"long":{"type":"NUMBER","value":"0"},"double":{"type":"NUMBER","value":"0.0"},"string":{"type":"MULTI_LINE_TEXT","value":""},"timestamp":{"type":"DATETIME","value":"1970-01-01T00:00:00Z"},"json":{"type":"MULTI_LINE_TEXT","value":"\"\""}}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
{"long_number":{"type":"NUMBER","value":"123"},"string_single_line_text":{"type":"MULTI_LINE_TEXT","value":"abc"},"boolean":{"type":"NUMBER","value":"1"},"long":{"type":"NUMBER","value":"123"},"double":{"type":"NUMBER","value":"123.0"},"string":{"type":"MULTI_LINE_TEXT","value":"abc"},"timestamp":{"type":"DATETIME","value":"1999-12-31T23:59:59Z"},"json":{"type":"MULTI_LINE_TEXT","value":"\"abc\""}}
|
2
|
+
{"long_number":{"type":"NUMBER","value":null},"string_single_line_text":{"type":"MULTI_LINE_TEXT","value":null},"boolean":{"type":"NUMBER","value":null},"long":{"type":"NUMBER","value":null},"double":{"type":"NUMBER","value":null},"string":{"type":"MULTI_LINE_TEXT","value":null},"timestamp":{"type":"DATETIME","value":null},"json":{"type":"MULTI_LINE_TEXT","value":null}}
|
3
|
+
{"long_number":{"type":"NUMBER","value":"456"},"string_single_line_text":{"type":"MULTI_LINE_TEXT","value":"def"},"boolean":{"type":"NUMBER","value":"0"},"long":{"type":"NUMBER","value":"456"},"double":{"type":"NUMBER","value":"456.0"},"string":{"type":"MULTI_LINE_TEXT","value":"def"},"timestamp":{"type":"DATETIME","value":"2000-01-01T00:00:00Z"},"json":{"type":"MULTI_LINE_TEXT","value":"\"def\""}}
|
4
|
+
{"long_number":{"type":"NUMBER","value":null},"string_single_line_text":{"type":"MULTI_LINE_TEXT","value":null},"boolean":{"type":"NUMBER","value":null},"long":{"type":"NUMBER","value":null},"double":{"type":"NUMBER","value":null},"string":{"type":"MULTI_LINE_TEXT","value":null},"timestamp":{"type":"DATETIME","value":null},"json":{"type":"MULTI_LINE_TEXT","value":null}}
|
5
|
+
{"long_number":{"type":"NUMBER","value":"789"},"string_single_line_text":{"type":"MULTI_LINE_TEXT","value":"ghi"},"boolean":{"type":"NUMBER","value":null},"long":{"type":"NUMBER","value":"789"},"double":{"type":"NUMBER","value":"789.0"},"string":{"type":"MULTI_LINE_TEXT","value":"ghi"},"timestamp":{"type":"DATETIME","value":null},"json":{"type":"MULTI_LINE_TEXT","value":"\"ghi\""}}
|
6
|
+
{"long_number":{"type":"NUMBER","value":null},"string_single_line_text":{"type":"MULTI_LINE_TEXT","value":null},"boolean":{"type":"NUMBER","value":null},"long":{"type":"NUMBER","value":null},"double":{"type":"NUMBER","value":null},"string":{"type":"MULTI_LINE_TEXT","value":null},"timestamp":{"type":"DATETIME","value":null},"json":{"type":"MULTI_LINE_TEXT","value":null}}
|
data/src/test/resources/org/embulk/output/kintone/task/skip/insert_never_skip_add_records.jsonl
ADDED
@@ -0,0 +1,6 @@
|
|
1
|
+
{"long_number":{"type":"NUMBER","value":"123"},"string_single_line_text":{"type":"MULTI_LINE_TEXT","value":"abc"},"boolean":{"type":"NUMBER","value":"1"},"long":{"type":"NUMBER","value":"123"},"double":{"type":"NUMBER","value":"123.0"},"string":{"type":"MULTI_LINE_TEXT","value":"abc"},"timestamp":{"type":"DATETIME","value":"1999-12-31T23:59:59Z"},"json":{"type":"MULTI_LINE_TEXT","value":"\"abc\""}}
|
2
|
+
{"long_number":{"type":"NUMBER","value":"0"},"string_single_line_text":{"type":"MULTI_LINE_TEXT","value":""},"boolean":{"type":"NUMBER","value":"0"},"long":{"type":"NUMBER","value":"0"},"double":{"type":"NUMBER","value":"0.0"},"string":{"type":"MULTI_LINE_TEXT","value":""},"timestamp":{"type":"DATETIME","value":"1970-01-01T00:00:00Z"},"json":{"type":"MULTI_LINE_TEXT","value":"\"\""}}
|
3
|
+
{"long_number":{"type":"NUMBER","value":"456"},"string_single_line_text":{"type":"MULTI_LINE_TEXT","value":"def"},"boolean":{"type":"NUMBER","value":"0"},"long":{"type":"NUMBER","value":"456"},"double":{"type":"NUMBER","value":"456.0"},"string":{"type":"MULTI_LINE_TEXT","value":"def"},"timestamp":{"type":"DATETIME","value":"2000-01-01T00:00:00Z"},"json":{"type":"MULTI_LINE_TEXT","value":"\"def\""}}
|
4
|
+
{"long_number":{"type":"NUMBER","value":"0"},"string_single_line_text":{"type":"MULTI_LINE_TEXT","value":""},"boolean":{"type":"NUMBER","value":"0"},"long":{"type":"NUMBER","value":"0"},"double":{"type":"NUMBER","value":"0.0"},"string":{"type":"MULTI_LINE_TEXT","value":""},"timestamp":{"type":"DATETIME","value":"1970-01-01T00:00:00Z"},"json":{"type":"MULTI_LINE_TEXT","value":"\"\""}}
|
5
|
+
{"long_number":{"type":"NUMBER","value":"789"},"string_single_line_text":{"type":"MULTI_LINE_TEXT","value":"ghi"},"boolean":{"type":"NUMBER","value":"0"},"long":{"type":"NUMBER","value":"789"},"double":{"type":"NUMBER","value":"789.0"},"string":{"type":"MULTI_LINE_TEXT","value":"ghi"},"timestamp":{"type":"DATETIME","value":"1970-01-01T00:00:00Z"},"json":{"type":"MULTI_LINE_TEXT","value":"\"ghi\""}}
|
6
|
+
{"long_number":{"type":"NUMBER","value":"0"},"string_single_line_text":{"type":"MULTI_LINE_TEXT","value":""},"boolean":{"type":"NUMBER","value":"0"},"long":{"type":"NUMBER","value":"0"},"double":{"type":"NUMBER","value":"0.0"},"string":{"type":"MULTI_LINE_TEXT","value":""},"timestamp":{"type":"DATETIME","value":"1970-01-01T00:00:00Z"},"json":{"type":"MULTI_LINE_TEXT","value":"\"\""}}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
{"long_number":{"type":"NUMBER","value":"123"},"string_single_line_text":{"type":"MULTI_LINE_TEXT","value":"abc"},"boolean":{"type":"NUMBER","value":"1"},"long":{"type":"NUMBER","value":"123"},"double":{"type":"NUMBER","value":"123.0"},"string":{"type":"MULTI_LINE_TEXT","value":"abc"},"timestamp":{"type":"DATETIME","value":"1999-12-31T23:59:59Z"},"json":{"type":"MULTI_LINE_TEXT","value":"\"abc\""}}
|
2
|
+
{"long_number":{"type":"NUMBER","value":null},"string_single_line_text":{"type":"MULTI_LINE_TEXT","value":null},"boolean":{"type":"NUMBER","value":null},"long":{"type":"NUMBER","value":null},"double":{"type":"NUMBER","value":null},"string":{"type":"MULTI_LINE_TEXT","value":null},"timestamp":{"type":"DATETIME","value":null},"json":{"type":"MULTI_LINE_TEXT","value":null}}
|
3
|
+
{"long_number":{"type":"NUMBER","value":"456"},"string_single_line_text":{"type":"MULTI_LINE_TEXT","value":"def"},"boolean":{"type":"NUMBER","value":"0"},"long":{"type":"NUMBER","value":"456"},"double":{"type":"NUMBER","value":"456.0"},"string":{"type":"MULTI_LINE_TEXT","value":"def"},"timestamp":{"type":"DATETIME","value":"2000-01-01T00:00:00Z"},"json":{"type":"MULTI_LINE_TEXT","value":"\"def\""}}
|
4
|
+
{"long_number":{"type":"NUMBER","value":null},"string_single_line_text":{"type":"MULTI_LINE_TEXT","value":null},"boolean":{"type":"NUMBER","value":null},"long":{"type":"NUMBER","value":null},"double":{"type":"NUMBER","value":null},"string":{"type":"MULTI_LINE_TEXT","value":null},"timestamp":{"type":"DATETIME","value":null},"json":{"type":"MULTI_LINE_TEXT","value":null}}
|
5
|
+
{"long_number":{"type":"NUMBER","value":"789"},"string_single_line_text":{"type":"MULTI_LINE_TEXT","value":"ghi"},"boolean":{"type":"NUMBER","value":null},"long":{"type":"NUMBER","value":"789"},"double":{"type":"NUMBER","value":"789.0"},"string":{"type":"MULTI_LINE_TEXT","value":"ghi"},"timestamp":{"type":"DATETIME","value":null},"json":{"type":"MULTI_LINE_TEXT","value":"\"ghi\""}}
|
6
|
+
{"long_number":{"type":"NUMBER","value":null},"string_single_line_text":{"type":"MULTI_LINE_TEXT","value":null},"boolean":{"type":"NUMBER","value":null},"long":{"type":"NUMBER","value":null},"double":{"type":"NUMBER","value":null},"string":{"type":"MULTI_LINE_TEXT","value":null},"timestamp":{"type":"DATETIME","value":null},"json":{"type":"MULTI_LINE_TEXT","value":null}}
|
data/src/test/resources/org/embulk/output/kintone/task/skip/insert_prefer_nulls_add_records.jsonl
ADDED
@@ -0,0 +1,6 @@
|
|
1
|
+
{"long_number":{"type":"NUMBER","value":"123"},"string_single_line_text":{"type":"MULTI_LINE_TEXT","value":"abc"},"boolean":{"type":"NUMBER","value":"1"},"long":{"type":"NUMBER","value":"123"},"double":{"type":"NUMBER","value":"123.0"},"string":{"type":"MULTI_LINE_TEXT","value":"abc"},"timestamp":{"type":"DATETIME","value":"1999-12-31T23:59:59Z"},"json":{"type":"MULTI_LINE_TEXT","value":"\"abc\""}}
|
2
|
+
{"long_number":{"type":"NUMBER","value":null},"string_single_line_text":{"type":"MULTI_LINE_TEXT","value":null},"boolean":{"type":"NUMBER","value":null},"long":{"type":"NUMBER","value":null},"double":{"type":"NUMBER","value":null},"string":{"type":"MULTI_LINE_TEXT","value":null},"timestamp":{"type":"DATETIME","value":null},"json":{"type":"MULTI_LINE_TEXT","value":null}}
|
3
|
+
{"long_number":{"type":"NUMBER","value":"456"},"string_single_line_text":{"type":"MULTI_LINE_TEXT","value":"def"},"boolean":{"type":"NUMBER","value":"0"},"long":{"type":"NUMBER","value":"456"},"double":{"type":"NUMBER","value":"456.0"},"string":{"type":"MULTI_LINE_TEXT","value":"def"},"timestamp":{"type":"DATETIME","value":"2000-01-01T00:00:00Z"},"json":{"type":"MULTI_LINE_TEXT","value":"\"def\""}}
|
4
|
+
{"long_number":{"type":"NUMBER","value":null},"string_single_line_text":{"type":"MULTI_LINE_TEXT","value":null},"boolean":{"type":"NUMBER","value":null},"long":{"type":"NUMBER","value":null},"double":{"type":"NUMBER","value":null},"string":{"type":"MULTI_LINE_TEXT","value":null},"timestamp":{"type":"DATETIME","value":null},"json":{"type":"MULTI_LINE_TEXT","value":null}}
|
5
|
+
{"long_number":{"type":"NUMBER","value":"789"},"string_single_line_text":{"type":"MULTI_LINE_TEXT","value":"ghi"},"boolean":{"type":"NUMBER","value":null},"long":{"type":"NUMBER","value":"789"},"double":{"type":"NUMBER","value":"789.0"},"string":{"type":"MULTI_LINE_TEXT","value":"ghi"},"timestamp":{"type":"DATETIME","value":null},"json":{"type":"MULTI_LINE_TEXT","value":"\"ghi\""}}
|
6
|
+
{"long_number":{"type":"NUMBER","value":null},"string_single_line_text":{"type":"MULTI_LINE_TEXT","value":null},"boolean":{"type":"NUMBER","value":null},"long":{"type":"NUMBER","value":null},"double":{"type":"NUMBER","value":null},"string":{"type":"MULTI_LINE_TEXT","value":null},"timestamp":{"type":"DATETIME","value":null},"json":{"type":"MULTI_LINE_TEXT","value":null}}
|
@@ -0,0 +1 @@
|
|
1
|
+
["789"]
|
@@ -0,0 +1 @@
|
|
1
|
+
["123","0","456","0","789","0"]
|
@@ -0,0 +1 @@
|
|
1
|
+
["789"]
|
@@ -0,0 +1 @@
|
|
1
|
+
["123","456","789"]
|
@@ -0,0 +1,2 @@
|
|
1
|
+
{"long_number":{"type":"NUMBER","value":"123"},"string_single_line_text":{"type":"MULTI_LINE_TEXT","value":"abc"},"boolean":{"type":"NUMBER","value":"1"},"long":{"type":"NUMBER","value":"123"},"double":{"type":"NUMBER","value":"123.0"},"string":{"type":"MULTI_LINE_TEXT","value":"abc"},"timestamp":{"type":"DATETIME","value":"1999-12-31T23:59:59Z"},"json":{"type":"MULTI_LINE_TEXT","value":"\"abc\""}}
|
2
|
+
{"long_number":{"type":"NUMBER","value":"456"},"string_single_line_text":{"type":"MULTI_LINE_TEXT","value":"def"},"boolean":{"type":"NUMBER","value":"0"},"long":{"type":"NUMBER","value":"456"},"double":{"type":"NUMBER","value":"456.0"},"string":{"type":"MULTI_LINE_TEXT","value":"def"},"timestamp":{"type":"DATETIME","value":"2000-01-01T00:00:00Z"},"json":{"type":"MULTI_LINE_TEXT","value":"\"def\""}}
|
data/src/test/resources/org/embulk/output/kintone/task/skip/update_always_skip_update_records.jsonl
ADDED
@@ -0,0 +1,5 @@
|
|
1
|
+
{"long_number":{"type":"NUMBER","value":"123"},"string_single_line_text":{"type":"MULTI_LINE_TEXT","value":"abc"},"boolean":{"type":"NUMBER","value":"1"},"long":{"type":"NUMBER","value":"123"},"double":{"type":"NUMBER","value":"123.0"},"string":{"type":"MULTI_LINE_TEXT","value":"abc"},"timestamp":{"type":"DATETIME","value":"1999-12-31T23:59:59Z"},"json":{"type":"MULTI_LINE_TEXT","value":"\"abc\""}}
|
2
|
+
{"long_number":{"type":"NUMBER","value":"0"},"string_single_line_text":{"type":"MULTI_LINE_TEXT","value":""},"boolean":{"type":"NUMBER","value":"0"},"long":{"type":"NUMBER","value":"0"},"double":{"type":"NUMBER","value":"0.0"},"string":{"type":"MULTI_LINE_TEXT","value":""},"timestamp":{"type":"DATETIME","value":"1970-01-01T00:00:00Z"},"json":{"type":"MULTI_LINE_TEXT","value":"\"\""}}
|
3
|
+
{"long_number":{"type":"NUMBER","value":"456"},"string_single_line_text":{"type":"MULTI_LINE_TEXT","value":"def"},"boolean":{"type":"NUMBER","value":"0"},"long":{"type":"NUMBER","value":"456"},"double":{"type":"NUMBER","value":"456.0"},"string":{"type":"MULTI_LINE_TEXT","value":"def"},"timestamp":{"type":"DATETIME","value":"2000-01-01T00:00:00Z"},"json":{"type":"MULTI_LINE_TEXT","value":"\"def\""}}
|
4
|
+
{"long_number":{"type":"NUMBER","value":"0"},"string_single_line_text":{"type":"MULTI_LINE_TEXT","value":""},"boolean":{"type":"NUMBER","value":"0"},"long":{"type":"NUMBER","value":"0"},"double":{"type":"NUMBER","value":"0.0"},"string":{"type":"MULTI_LINE_TEXT","value":""},"timestamp":{"type":"DATETIME","value":"1970-01-01T00:00:00Z"},"json":{"type":"MULTI_LINE_TEXT","value":"\"\""}}
|
5
|
+
{"long_number":{"type":"NUMBER","value":"0"},"string_single_line_text":{"type":"MULTI_LINE_TEXT","value":""},"boolean":{"type":"NUMBER","value":"0"},"long":{"type":"NUMBER","value":"0"},"double":{"type":"NUMBER","value":"0.0"},"string":{"type":"MULTI_LINE_TEXT","value":""},"timestamp":{"type":"DATETIME","value":"1970-01-01T00:00:00Z"},"json":{"type":"MULTI_LINE_TEXT","value":"\"\""}}
|
data/src/test/resources/org/embulk/output/kintone/task/skip/update_never_skip_update_records.jsonl
ADDED
@@ -0,0 +1,6 @@
|
|
1
|
+
{"long_number":{"type":"NUMBER","value":"123"},"string_single_line_text":{"type":"MULTI_LINE_TEXT","value":"abc"},"boolean":{"type":"NUMBER","value":"1"},"long":{"type":"NUMBER","value":"123"},"double":{"type":"NUMBER","value":"123.0"},"string":{"type":"MULTI_LINE_TEXT","value":"abc"},"timestamp":{"type":"DATETIME","value":"1999-12-31T23:59:59Z"},"json":{"type":"MULTI_LINE_TEXT","value":"\"abc\""}}
|
2
|
+
{"long_number":{"type":"NUMBER","value":"0"},"string_single_line_text":{"type":"MULTI_LINE_TEXT","value":""},"boolean":{"type":"NUMBER","value":"0"},"long":{"type":"NUMBER","value":"0"},"double":{"type":"NUMBER","value":"0.0"},"string":{"type":"MULTI_LINE_TEXT","value":""},"timestamp":{"type":"DATETIME","value":"1970-01-01T00:00:00Z"},"json":{"type":"MULTI_LINE_TEXT","value":"\"\""}}
|
3
|
+
{"long_number":{"type":"NUMBER","value":"456"},"string_single_line_text":{"type":"MULTI_LINE_TEXT","value":"def"},"boolean":{"type":"NUMBER","value":"0"},"long":{"type":"NUMBER","value":"456"},"double":{"type":"NUMBER","value":"456.0"},"string":{"type":"MULTI_LINE_TEXT","value":"def"},"timestamp":{"type":"DATETIME","value":"2000-01-01T00:00:00Z"},"json":{"type":"MULTI_LINE_TEXT","value":"\"def\""}}
|
4
|
+
{"long_number":{"type":"NUMBER","value":"0"},"string_single_line_text":{"type":"MULTI_LINE_TEXT","value":""},"boolean":{"type":"NUMBER","value":"0"},"long":{"type":"NUMBER","value":"0"},"double":{"type":"NUMBER","value":"0.0"},"string":{"type":"MULTI_LINE_TEXT","value":""},"timestamp":{"type":"DATETIME","value":"1970-01-01T00:00:00Z"},"json":{"type":"MULTI_LINE_TEXT","value":"\"\""}}
|
5
|
+
{"long_number":{"type":"NUMBER","value":"789"},"string_single_line_text":{"type":"MULTI_LINE_TEXT","value":"ghi"},"boolean":{"type":"NUMBER","value":"0"},"long":{"type":"NUMBER","value":"789"},"double":{"type":"NUMBER","value":"789.0"},"string":{"type":"MULTI_LINE_TEXT","value":"ghi"},"timestamp":{"type":"DATETIME","value":"1970-01-01T00:00:00Z"},"json":{"type":"MULTI_LINE_TEXT","value":"\"ghi\""}}
|
6
|
+
{"long_number":{"type":"NUMBER","value":"0"},"string_single_line_text":{"type":"MULTI_LINE_TEXT","value":""},"boolean":{"type":"NUMBER","value":"0"},"long":{"type":"NUMBER","value":"0"},"double":{"type":"NUMBER","value":"0.0"},"string":{"type":"MULTI_LINE_TEXT","value":""},"timestamp":{"type":"DATETIME","value":"1970-01-01T00:00:00Z"},"json":{"type":"MULTI_LINE_TEXT","value":"\"\""}}
|
data/src/test/resources/org/embulk/output/kintone/task/skip/update_prefer_nulls_update_records.jsonl
ADDED
@@ -0,0 +1,3 @@
|
|
1
|
+
{"long_number":{"type":"NUMBER","value":"123"},"string_single_line_text":{"type":"MULTI_LINE_TEXT","value":"abc"},"boolean":{"type":"NUMBER","value":"1"},"long":{"type":"NUMBER","value":"123"},"double":{"type":"NUMBER","value":"123.0"},"string":{"type":"MULTI_LINE_TEXT","value":"abc"},"timestamp":{"type":"DATETIME","value":"1999-12-31T23:59:59Z"},"json":{"type":"MULTI_LINE_TEXT","value":"\"abc\""}}
|
2
|
+
{"long_number":{"type":"NUMBER","value":"456"},"string_single_line_text":{"type":"MULTI_LINE_TEXT","value":"def"},"boolean":{"type":"NUMBER","value":"0"},"long":{"type":"NUMBER","value":"456"},"double":{"type":"NUMBER","value":"456.0"},"string":{"type":"MULTI_LINE_TEXT","value":"def"},"timestamp":{"type":"DATETIME","value":"2000-01-01T00:00:00Z"},"json":{"type":"MULTI_LINE_TEXT","value":"\"def\""}}
|
3
|
+
{"long_number":{"type":"NUMBER","value":"789"},"string_single_line_text":{"type":"MULTI_LINE_TEXT","value":"ghi"},"boolean":{"type":"NUMBER","value":null},"long":{"type":"NUMBER","value":"789"},"double":{"type":"NUMBER","value":"789.0"},"string":{"type":"MULTI_LINE_TEXT","value":"ghi"},"timestamp":{"type":"DATETIME","value":null},"json":{"type":"MULTI_LINE_TEXT","value":"\"ghi\""}}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
{"long_number":{"type":"NUMBER","value":"123"},"string_single_line_text":{"type":"MULTI_LINE_TEXT","value":"abc"},"boolean":{"type":"NUMBER","value":"1"},"long":{"type":"NUMBER","value":"123"},"double":{"type":"NUMBER","value":"123.0"},"string":{"type":"MULTI_LINE_TEXT","value":"abc"},"timestamp":{"type":"DATETIME","value":"1999-12-31T23:59:59Z"},"json":{"type":"MULTI_LINE_TEXT","value":"\"abc\""}}
|
2
|
+
{"long_number":{"type":"NUMBER","value":"0"},"string_single_line_text":{"type":"MULTI_LINE_TEXT","value":""},"boolean":{"type":"NUMBER","value":"0"},"long":{"type":"NUMBER","value":"0"},"double":{"type":"NUMBER","value":"0.0"},"string":{"type":"MULTI_LINE_TEXT","value":""},"timestamp":{"type":"DATETIME","value":"1970-01-01T00:00:00Z"},"json":{"type":"MULTI_LINE_TEXT","value":"\"\""}}
|
3
|
+
{"long_number":{"type":"NUMBER","value":"456"},"string_single_line_text":{"type":"MULTI_LINE_TEXT","value":"def"},"boolean":{"type":"NUMBER","value":"0"},"long":{"type":"NUMBER","value":"456"},"double":{"type":"NUMBER","value":"456.0"},"string":{"type":"MULTI_LINE_TEXT","value":"def"},"timestamp":{"type":"DATETIME","value":"2000-01-01T00:00:00Z"},"json":{"type":"MULTI_LINE_TEXT","value":"\"def\""}}
|
4
|
+
{"long_number":{"type":"NUMBER","value":"0"},"string_single_line_text":{"type":"MULTI_LINE_TEXT","value":""},"boolean":{"type":"NUMBER","value":"0"},"long":{"type":"NUMBER","value":"0"},"double":{"type":"NUMBER","value":"0.0"},"string":{"type":"MULTI_LINE_TEXT","value":""},"timestamp":{"type":"DATETIME","value":"1970-01-01T00:00:00Z"},"json":{"type":"MULTI_LINE_TEXT","value":"\"\""}}
|
5
|
+
{"long_number":{"type":"NUMBER","value":"789"},"string_single_line_text":{"type":"MULTI_LINE_TEXT","value":"ghi"},"boolean":{"type":"NUMBER","value":"0"},"long":{"type":"NUMBER","value":"789"},"double":{"type":"NUMBER","value":"789.0"},"string":{"type":"MULTI_LINE_TEXT","value":"ghi"},"timestamp":{"type":"DATETIME","value":"1970-01-01T00:00:00Z"},"json":{"type":"MULTI_LINE_TEXT","value":"\"ghi\""}}
|
6
|
+
{"long_number":{"type":"NUMBER","value":"0"},"string_single_line_text":{"type":"MULTI_LINE_TEXT","value":""},"boolean":{"type":"NUMBER","value":"0"},"long":{"type":"NUMBER","value":"0"},"double":{"type":"NUMBER","value":"0.0"},"string":{"type":"MULTI_LINE_TEXT","value":""},"timestamp":{"type":"DATETIME","value":"1970-01-01T00:00:00Z"},"json":{"type":"MULTI_LINE_TEXT","value":"\"\""}}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"long_number":{"type":"NUMBER","value":"789"},"string_single_line_text":{"type":"SINGLE_LINE_TEXT","value":"ghi"},"boolean":{"type":"NUMBER","value":"0"},"long":{"type":"NUMBER","value":"789"},"double":{"type":"NUMBER","value":"789.0"},"string":{"type":"MULTI_LINE_TEXT","value":"ghi"},"timestamp":{"type":"DATETIME","value":"1970-01-01T00:00:00Z"},"json":{"type":"MULTI_LINE_TEXT","value":"\"ghi\""}}
|
@@ -0,0 +1 @@
|
|
1
|
+
["ghi"]
|
@@ -0,0 +1 @@
|
|
1
|
+
["abc","def","ghi"]
|
@@ -0,0 +1,2 @@
|
|
1
|
+
{"long_number":{"type":"NUMBER","value":"123"},"string_single_line_text":{"type":"SINGLE_LINE_TEXT","value":"abc"},"boolean":{"type":"NUMBER","value":"1"},"long":{"type":"NUMBER","value":"123"},"double":{"type":"NUMBER","value":"123.0"},"string":{"type":"MULTI_LINE_TEXT","value":"abc"},"timestamp":{"type":"DATETIME","value":"1999-12-31T23:59:59Z"},"json":{"type":"MULTI_LINE_TEXT","value":"\"abc\""}}
|
2
|
+
{"long_number":{"type":"NUMBER","value":"456"},"string_single_line_text":{"type":"SINGLE_LINE_TEXT","value":"def"},"boolean":{"type":"NUMBER","value":"0"},"long":{"type":"NUMBER","value":"456"},"double":{"type":"NUMBER","value":"456.0"},"string":{"type":"MULTI_LINE_TEXT","value":"def"},"timestamp":{"type":"DATETIME","value":"2000-01-01T00:00:00Z"},"json":{"type":"MULTI_LINE_TEXT","value":"\"def\""}}
|
@@ -0,0 +1 @@
|
|
1
|
+
["ghi"]
|
@@ -0,0 +1 @@
|
|
1
|
+
["abc","def","ghi"]
|
data/src/test/resources/org/embulk/output/kintone/task/skip/upsert_always_skip_update_records.jsonl
ADDED
@@ -0,0 +1,2 @@
|
|
1
|
+
{"long_number":{"type":"NUMBER","value":"123"},"string_single_line_text":{"type":"SINGLE_LINE_TEXT","value":"abc"},"boolean":{"type":"NUMBER","value":"1"},"long":{"type":"NUMBER","value":"123"},"double":{"type":"NUMBER","value":"123.0"},"string":{"type":"MULTI_LINE_TEXT","value":"abc"},"timestamp":{"type":"DATETIME","value":"1999-12-31T23:59:59Z"},"json":{"type":"MULTI_LINE_TEXT","value":"\"abc\""}}
|
2
|
+
{"long_number":{"type":"NUMBER","value":"456"},"string_single_line_text":{"type":"SINGLE_LINE_TEXT","value":"def"},"boolean":{"type":"NUMBER","value":"0"},"long":{"type":"NUMBER","value":"456"},"double":{"type":"NUMBER","value":"456.0"},"string":{"type":"MULTI_LINE_TEXT","value":"def"},"timestamp":{"type":"DATETIME","value":"2000-01-01T00:00:00Z"},"json":{"type":"MULTI_LINE_TEXT","value":"\"def\""}}
|
data/src/test/resources/org/embulk/output/kintone/task/skip/upsert_never_skip_add_records.jsonl
ADDED
@@ -0,0 +1,4 @@
|
|
1
|
+
{"long_number":{"type":"NUMBER","value":"0"},"string_single_line_text":{"type":"SINGLE_LINE_TEXT","value":""},"boolean":{"type":"NUMBER","value":"0"},"long":{"type":"NUMBER","value":"0"},"double":{"type":"NUMBER","value":"0.0"},"string":{"type":"MULTI_LINE_TEXT","value":""},"timestamp":{"type":"DATETIME","value":"1970-01-01T00:00:00Z"},"json":{"type":"MULTI_LINE_TEXT","value":"\"\""}}
|
2
|
+
{"long_number":{"type":"NUMBER","value":"0"},"string_single_line_text":{"type":"SINGLE_LINE_TEXT","value":""},"boolean":{"type":"NUMBER","value":"0"},"long":{"type":"NUMBER","value":"0"},"double":{"type":"NUMBER","value":"0.0"},"string":{"type":"MULTI_LINE_TEXT","value":""},"timestamp":{"type":"DATETIME","value":"1970-01-01T00:00:00Z"},"json":{"type":"MULTI_LINE_TEXT","value":"\"\""}}
|
3
|
+
{"long_number":{"type":"NUMBER","value":"789"},"string_single_line_text":{"type":"SINGLE_LINE_TEXT","value":"ghi"},"boolean":{"type":"NUMBER","value":"0"},"long":{"type":"NUMBER","value":"789"},"double":{"type":"NUMBER","value":"789.0"},"string":{"type":"MULTI_LINE_TEXT","value":"ghi"},"timestamp":{"type":"DATETIME","value":"1970-01-01T00:00:00Z"},"json":{"type":"MULTI_LINE_TEXT","value":"\"ghi\""}}
|
4
|
+
{"long_number":{"type":"NUMBER","value":"0"},"string_single_line_text":{"type":"SINGLE_LINE_TEXT","value":""},"boolean":{"type":"NUMBER","value":"0"},"long":{"type":"NUMBER","value":"0"},"double":{"type":"NUMBER","value":"0.0"},"string":{"type":"MULTI_LINE_TEXT","value":""},"timestamp":{"type":"DATETIME","value":"1970-01-01T00:00:00Z"},"json":{"type":"MULTI_LINE_TEXT","value":"\"\""}}
|
@@ -0,0 +1,4 @@
|
|
1
|
+
{"long_number":{"type":"NUMBER","value":null},"string_single_line_text":{"type":"SINGLE_LINE_TEXT","value":null},"boolean":{"type":"NUMBER","value":null},"long":{"type":"NUMBER","value":null},"double":{"type":"NUMBER","value":null},"string":{"type":"MULTI_LINE_TEXT","value":null},"timestamp":{"type":"DATETIME","value":null},"json":{"type":"MULTI_LINE_TEXT","value":null}}
|
2
|
+
{"long_number":{"type":"NUMBER","value":null},"string_single_line_text":{"type":"SINGLE_LINE_TEXT","value":null},"boolean":{"type":"NUMBER","value":null},"long":{"type":"NUMBER","value":null},"double":{"type":"NUMBER","value":null},"string":{"type":"MULTI_LINE_TEXT","value":null},"timestamp":{"type":"DATETIME","value":null},"json":{"type":"MULTI_LINE_TEXT","value":null}}
|
3
|
+
{"long_number":{"type":"NUMBER","value":"789"},"string_single_line_text":{"type":"SINGLE_LINE_TEXT","value":"ghi"},"boolean":{"type":"NUMBER","value":null},"long":{"type":"NUMBER","value":"789"},"double":{"type":"NUMBER","value":"789.0"},"string":{"type":"MULTI_LINE_TEXT","value":"ghi"},"timestamp":{"type":"DATETIME","value":null},"json":{"type":"MULTI_LINE_TEXT","value":"\"ghi\""}}
|
4
|
+
{"long_number":{"type":"NUMBER","value":null},"string_single_line_text":{"type":"SINGLE_LINE_TEXT","value":null},"boolean":{"type":"NUMBER","value":null},"long":{"type":"NUMBER","value":null},"double":{"type":"NUMBER","value":null},"string":{"type":"MULTI_LINE_TEXT","value":null},"timestamp":{"type":"DATETIME","value":null},"json":{"type":"MULTI_LINE_TEXT","value":null}}
|
@@ -0,0 +1 @@
|
|
1
|
+
["ghi"]
|
@@ -0,0 +1 @@
|
|
1
|
+
["abc","def","ghi"]
|
@@ -0,0 +1,2 @@
|
|
1
|
+
{"long_number":{"type":"NUMBER","value":"123"},"string_single_line_text":{"type":"SINGLE_LINE_TEXT","value":"abc"},"boolean":{"type":"NUMBER","value":"1"},"long":{"type":"NUMBER","value":"123"},"double":{"type":"NUMBER","value":"123.0"},"string":{"type":"MULTI_LINE_TEXT","value":"abc"},"timestamp":{"type":"DATETIME","value":"1999-12-31T23:59:59Z"},"json":{"type":"MULTI_LINE_TEXT","value":"\"abc\""}}
|
2
|
+
{"long_number":{"type":"NUMBER","value":"456"},"string_single_line_text":{"type":"SINGLE_LINE_TEXT","value":"def"},"boolean":{"type":"NUMBER","value":"0"},"long":{"type":"NUMBER","value":"456"},"double":{"type":"NUMBER","value":"456.0"},"string":{"type":"MULTI_LINE_TEXT","value":"def"},"timestamp":{"type":"DATETIME","value":"2000-01-01T00:00:00Z"},"json":{"type":"MULTI_LINE_TEXT","value":"\"def\""}}
|
@@ -0,0 +1 @@
|
|
1
|
+
["ghi"]
|