Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Perfomance improvements for extracted CC analysis generation #1005

Merged
merged 15 commits into from
Apr 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@
<dependency>
<groupId>org.ohdsi</groupId>
<artifactId>featureExtraction</artifactId>
<version>2.1.5-SNAPSHOT</version>
<version>2.2.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.amazon.redshift</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,6 @@ public JobExecutionResource generateCc(final Long id, @SourceKey final String so
jdbcTemplate,
getTransactionTemplate(),
ccService,
analysisService,
analysisGenerationInfoEntityRepository,
sourceService,
userRepository
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,29 +40,25 @@
import org.springframework.transaction.support.TransactionTemplate;

import java.util.Map;
import java.util.stream.Collectors;

import static org.ohdsi.webapi.Constants.Params.*;

public class GenerateCohortCharacterizationTasklet extends AnalysisTasklet {

private final CcService ccService;
private final FeAnalysisService feAnalysisService;
private final SourceService sourceService;
private final UserRepository userRepository;

public GenerateCohortCharacterizationTasklet(
final CancelableJdbcTemplate jdbcTemplate,
final TransactionTemplate transactionTemplate,
final CcService ccService,
final FeAnalysisService feAnalysisService,
final AnalysisGenerationInfoEntityRepository analysisGenerationInfoEntityRepository,
final SourceService sourceService,
final UserRepository userRepository
) {
super(LoggerFactory.getLogger(GenerateCohortCharacterizationTasklet.class), jdbcTemplate, transactionTemplate, analysisGenerationInfoEntityRepository);
this.ccService = ccService;
this.feAnalysisService = feAnalysisService;
this.sourceService = sourceService;
this.userRepository = userRepository;
}
Expand All @@ -88,8 +84,7 @@ protected String[] prepareQueries(ChunkContext chunkContext, CancelableJdbcTempl
final String tempSchema = SourceUtils.getTempQualifier(source);
CCQueryBuilder ccQueryBuilder = new CCQueryBuilder(cohortCharacterization, cohortTable, sessionId,
SourceUtils.getCdmQualifier(source), SourceUtils.getResultsQualifier(source),
SourceUtils.getVocabularyQualifier(source), tempSchema,
jobId, feAnalysisService.findAllPresetAnalyses().stream().map(FeAnalysisWithStringEntity::getDesign).collect(Collectors.toList()));
SourceUtils.getVocabularyQualifier(source), tempSchema, jobId);
String sql = ccQueryBuilder.build();

/*
Expand Down