Skip to content

Commit 3b945a3

Browse files
authored
Apply --resourceList in the view generation mode (#1368)
1 parent 271893f commit 3b945a3

File tree

1 file changed

+10
-1
lines changed
  • pipelines/batch/src/main/java/com/google/fhir/analytics

1 file changed

+10
-1
lines changed

pipelines/batch/src/main/java/com/google/fhir/analytics/FhirEtl.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,16 @@ private static List<Pipeline> buildParquetReadPipeline(
377377
options.getParquetInputDwhRoot(),
378378
options.getOutputParquetViewPath(),
379379
avroConversionUtil.getFhirContext());
380-
Set<String> resourceTypes = dwhFiles.findNonEmptyResourceDirs();
380+
Set<String> foundResourceTypes = dwhFiles.findNonEmptyResourceDirs();
381+
log.info("Found Parquet files for these resource types: {}", foundResourceTypes);
382+
Set<String> resourceTypes = Sets.newHashSet(options.getResourceList().split(","));
383+
if (!resourceTypes.equals(foundResourceTypes)) {
384+
log.warn(
385+
"Found resource types {} is not equal to requested resource types {}",
386+
foundResourceTypes,
387+
resourceTypes);
388+
resourceTypes.retainAll(foundResourceTypes);
389+
}
381390
log.info("Reading Parquet files for these resource types: {}", resourceTypes);
382391
List<Pipeline> pipelineList = new ArrayList<>();
383392
for (String resourceType : resourceTypes) {

0 commit comments

Comments
 (0)