Skip to content

Commit

Permalink
[no ticket][risk=no] Fix person id query for VCF extractions (#8971)
Browse files Browse the repository at this point in the history
  • Loading branch information
dolbeew authored Nov 25, 2024
1 parent 040e500 commit 1b4a121
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,12 @@ public QueryJobConfiguration buildUnionedParticipantIdQuery(
.build();
}

public QueryJobConfiguration buildPersonIdQuery(String personIdQuery) {
return QueryJobConfiguration.newBuilder(personIdQuery).setUseLegacySql(false).build();
// This method supports VCF extractions for Tanagra exports
public QueryJobConfiguration buildTanagraWGSPersonIdQuery(String personIdQuery) {
return QueryJobConfiguration.newBuilder(
personIdQuery
+ " AND id IN (SELECT id FROM `${projectId}.${dataSetId}.T_ENT_person` WHERE has_whole_genome_variant = true)")
.setUseLegacySql(false)
.build();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1430,7 +1430,7 @@ public List<String> getTanagraPersonIdsWithWholeGenome(
.get()
.describeExport(exportPreviewRequest, underlayName)
.getEntityIdSql();
participantIdQuery = cohortQueryBuilder.buildPersonIdQuery(cohortsQuery);
participantIdQuery = cohortQueryBuilder.buildTanagraWGSPersonIdQuery(cohortsQuery);
} catch (ApiException e) {
throw new BadRequestException("Bad Request: " + e.getMessage());
}
Expand Down

0 comments on commit 1b4a121

Please sign in to comment.