Loads the cohort manifest, displays the cohorts to be generated, optionally prompts for user confirmation, and then generates the cohorts and retrieves their counts. This function serves as the foundational step for all subsequent analytical tasks in the pipeline.
Usage
generateCohorts(
executionSettings,
pipelineVersion,
executionContext = NULL,
override = FALSE
)Arguments
- executionSettings
An ExecutionSettings object containing database configuration for cohort generation. When created via
createExecutionSettingsFromConfig()with a non-semverpipelineVersion(e.g. "dev", "test"), the cohort table name will already have a_devsuffix applied, keeping dev runs isolated from the production cohort table.- pipelineVersion
Character. The pipeline version used to organize the output folder structure. Output will be saved to
exec/results/{databaseName}/{pipelineVersion}/00_buildCohorts/. Non-semver values (e.g. "dev") also trigger dev cohort table routing viacreateExecutionSettingsFromConfig().- executionContext
An optional
ExecutionContextfor the current run. When supplied, its pipeline version and result-path rules are used.- override
Logical. If TRUE, skips the user confirmation prompt and proceeds directly with cohort generation. Defaults to FALSE.