Describes one Picard pipeline execution and derives the names used to isolate its database and filesystem outputs. This R6 class owns execution mode and pipeline version (the namespace).
Internal: constructed by the pipeline (execute_pipeline()) and by the
settings/path helpers (createExecutionSettingsFromConfig(),
setOutputFolder(), resolveResultsPath()). Study code and task files
never construct it directly.
Methods
Method new()
Usage
ExecutionContext$new(
mode = c("test", "production"),
pipelineVersion = "dev",
studyVersion = NULL,
baseCohortTable = NULL,
databaseName = NULL,
execPath = here::here("exec/results"),
maxTableNameLength = MAX_TEST_COHORT_TABLE_NAME_LENGTH
)Arguments
modeCharacter. Either
"test"or"production".pipelineVersionCharacter. The complete execution pipeline version. Defaults to
"dev"for test executions. Test pipeline versions are normalized to lowercase snake case. Production pipeline versions are semantic versions, or the literal"prod"for a production run against the configured table whose version is not tracked.studyVersionCharacter or
NULL. The study version associated with the execution. Required for a semantic-version production run;NULLfor test runs and forpipelineVersion = "prod".baseCohortTableCharacter or
NULL. The configured, unsuffixed cohort table. Optional for a run-scoped context shared by multiple database config blocks.databaseNameCharacter or
NULL. Human-readable database name used in result paths. Optional for a run-scoped context shared by multiple database config blocks.execPathCharacter. Base path for execution results. Defaults to
exec/resultsin the current study project.maxTableNameLengthInteger. Maximum permitted length of the derived cohort table name. Defaults to 60, a practical cross-database limit for test-derived names. Set to
NULLto disable this package-level check.
Method deriveCohortTable()
Apply this run's mode and namespace to a configured base cohort table. Production returns the base table unchanged; test appends the normalized pipeline version and enforces the table-name length ceiling before any database work.