}
private ExportTable convert(OutputDescription output) {
assert output != null;
BulkLoadExporterDescription desc = extract(output);
DuplicateRecordCheck duplicate = desc.getDuplicateRecordCheck();
if (duplicate == null) {
return new ExportTable(
desc.getModelType(),
desc.getTableName(),
desc.getColumnNames(),
desc.getTargetColumnNames(),
null,
Collections.singletonList(getOutputLocation(output)));
} else {
return new ExportTable(
desc.getModelType(),
desc.getTableName(),
desc.getColumnNames(),
desc.getTargetColumnNames(),
new DuplicateRecordErrorTable(
duplicate.getTableName(),
duplicate.getColumnNames(),
duplicate.getCheckColumnNames(),
duplicate.getErrorCodeColumnName(),
duplicate.getErrorCodeValue()),
Collections.singletonList(getOutputLocation(output)));
}
}