Skip to content

Commit 867ad23

Browse files
committed
Add validation for auto_create_table
1 parent b088717 commit 867ad23

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/java/org/embulk/output/dynamodb/DynamodbUtils.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,9 @@ protected void configCheck(DynamodbOutputPlugin.PluginTask task)
111111
if (!task.getPrimaryKey().isPresent() || !task.getPrimaryKeyType().isPresent()) {
112112
throw new ConfigException("If auto_create_table is true, both primary_key and primary_key_type is necessary");
113113
}
114+
if (!task.getReadCapacityUnits().isPresent() || !task.getWriteCapacityUnits().isPresent()) {
115+
throw new ConfigException("If auto_create_table is true, 'read_capacity_units' and 'write_capacity_units' is required.");
116+
}
114117
}
115118
}
116119

0 commit comments

Comments
 (0)