Skip to content

Commit

Permalink
Merge pull request #2088 from bakdata/fix/import-column-check
Browse files Browse the repository at this point in the history
adds table assertion for Import
  • Loading branch information
thoniTUB authored Sep 20, 2021
2 parents 1f410d3 + 5c11a85 commit 292f4f5
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ public static ImportJob create(
throw new BadRequestException(String.format("Table[%s] does not exist.", tableId));
}

// Ensure that Import and Table have the same schema
header.assertMatch(table);

final ImportId importId = new ImportId(table.getId(), header.getName());

if (namespace.getStorage().getImport(importId) != null) {
Expand Down

0 comments on commit 292f4f5

Please sign in to comment.