Skip to content

Commit 96bedc9

Browse files
authored
Data changes (#12)
* update query for data config * update with runNow * update
1 parent 646d803 commit 96bedc9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

DataCompareProcessor/src/main/java/gov/cdc/datacompareprocessor/service/DataCompareService.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -543,10 +543,11 @@ protected Map<String, JsonObject> loadJsonAsMapFromS3(String fileName, String un
543543
Map<String, JsonObject> recordMap = new HashMap<>();
544544

545545
try {
546-
// Convert JsonArray into a map using the unique identifier field
547546
for (JsonElement element : jsonElement.getAsJsonArray()) {
548547
JsonObject jsonObject = element.getAsJsonObject();
549-
String id = jsonObject.get(uniqueIdField).getAsString();
548+
String id = jsonObject.has(uniqueIdField) && !jsonObject.get(uniqueIdField).isJsonNull()
549+
? jsonObject.get(uniqueIdField).getAsString()
550+
: "NULL";
550551
recordMap.put(id, jsonObject);
551552
}
552553
} catch (Exception e) {

0 commit comments

Comments
 (0)