Skip to content

Schema fields

This table is a generated view of the schema files in yaml/, which define the spec, project, codelists and function file types: each field's shape, kind and default. Follow the rule link for behavior. It is not an additional semantic contract.

A field's kind comes from its type and says what a bare scalar in it is:

Kind A bare scalar is
expression Text of the closed grammar, in which a bare name is a reference and quoted text a literal; a YAML number, Boolean or null is a literal.
name One variable name, bare or qualified.
identifier A declared name, or a reference to one.
value A constant: text is text, and YAML null is missing where the type admits it.
path A local path.
structure Nothing: the field holds a class, a list or mapping of classes, or a registry value.

schema_codelists.yaml

Field or value type Type Kind Required Default Constraints Contract
codelist_file_class.yamaa "language_version" value true Absent -- Oldest language version this codelist file needs, always quoted (SCHEMA-2).
codelist_file_class.type "str" value true Absent {"values": ["codelists"]} File type of a codelist file, which holds the codelists of one source (CT-1).
codelist_file_class.standard "terminology_standard_class" structure false Absent -- Published terminology the source's codelists are drawn from; a source without one is sponsor-defined (CT-2).
codelist_file_class.codelists "list[codelist_class]" structure true Absent -- Codelists this source declares (CT-1).

schema_derivation.yaml

Field or value type Type Kind Required Default Constraints Contract
expression ["str", "int", "float", "bool", "null", "operation"] expression false Absent -- One expression, either text in the closed grammar, where a bare name is a reference and quoted text a literal, or a YAML number, Boolean or null, which is a literal, or a mapping holding one registered operation (EXPR-5).
derivation ["expression", "handled_expression_class"] expression false Absent -- Schema constraint
handled_expression_class.value "expression" expression true Absent -- Schema constraint
handled_expression_class.unconvertible "substitute_value" value false Absent -- Schema constraint
intermediate_derivation ["untyped_intermediate_derivation", "intermediate_binding_class"] expression false Absent -- Schema constraint
untyped_intermediate_derivation "expression" expression false Absent -- Schema constraint
intermediate_binding_class.type "column_type" value true Absent -- Schema constraint
intermediate_binding_class.derivation "untyped_intermediate_derivation" expression true Absent -- Schema constraint
intermediate_binding_class.unconvertible "substitute_value" value false Absent -- Schema constraint

schema_expression_aggregate.yaml

Field or value type Type Kind Required Default Constraints Contract
expressions.aggregate ["aggregate_expression", "aggregate_class"] -- false Absent -- Schema constraint
aggregate_class.key "match_key" expression false Absent -- Schema constraint
aggregate_class.between "record_between_class" structure false Absent -- Schema constraint
aggregate_class.filter "predicate" expression false Absent -- Schema constraint
aggregate_class.group_by "list[variable]" name false Absent -- Grouping keys of an ordinary right-side or output-row reduction; omit when the enclosing grouped row owns the keys (LOOKUP-19).
aggregate_class.derivations "dict[identifier, derive_binding_class]" structure false Absent -- Per-record intermediate variables, by the name the reducer expression reads, evaluated in order before reduction (LOOKUP-22).
aggregate_class.order_by "list[order_by_term]" name false Absent -- Terms ordering the records whose values STR_JOIN joins, over the relation's fields and the derivations' variables, ties keeping stored order; required beside STR_JOIN and refused beside any other expression (FORMULA-18, LOOKUP-10).
aggregate_class.separator "str" value false Absent -- Text STR_JOIN writes between two joined values, the empty string included; required beside STR_JOIN and refused beside any other expression (FORMULA-18).
aggregate_class.distinct "bool" value false Absent -- When true, STR_JOIN writes each text once and COUNT(x) counts each value once; omitted, every value counts. Admitted only beside a bare STR_JOIN(x) or COUNT(x) (FORMULA-18).
aggregate_class.quantile "float" value false Absent -- Probability from 0 through 1 at which QUANTILE reads its quantile, R's default type 7; required beside QUANTILE and refused beside any other expression (FORMULA-18).
aggregate_class.expr "aggregate_expression" expression true Absent -- Closed reducer expression over the records of one relation (FORMULA-17).
derive_binding_class.type "column_type" value true Absent -- Declared type the per-record value converts to (LOOKUP-22).
derive_binding_class.derivation "derivation" expression true Absent -- Per-record derivation over the relation's fields and earlier variables (LOOKUP-22).
aggregate_expression "str" expression false Absent {"min_length": 1} Expression in the closed expression grammar that admits the reducers (FORMULA-27).

schema_expression_core.yaml

Field or value type Type Kind Required Default Constraints Contract
expressions.source "source_binding_class" -- false Absent -- Copies a named source or derived variable read with the range, filter, selection or absence answer of its lookup (EXPR-4).
expressions.first_available.sources "list[filtered_source]" name true Absent -- Variables to test in order (EXPR-9).
expressions.first_available.missing "substitute_value" value false Absent -- Value returned when every source is missing; missing when absent (EXPR-9).
expressions.greatest.sources "list[variable]" name true Absent -- Mutually comparable variables to inspect (EXPR-10).
expressions.least.sources "list[variable]" name true Absent -- Mutually comparable variables to inspect (EXPR-10).
expressions.case "list[case_item_class]" -- false Absent -- Ordered when/then items with an optional trailing otherwise (EXPR-7).
expressions.flag ["predicate", "flag_class"] -- false Absent -- A one-predicate flag derivation; a bare predicate string is the condition with the default values (EXPR-8).
source_binding_class.variable "variable" name true Absent -- Variable to copy (LOOKUP-1).
source_binding_class.between "record_between_class" structure false Absent -- Schema constraint
source_binding_class.filter "predicate" expression false Absent -- Schema constraint
source_binding_class.order_by "list[order_by_term]" name false Absent -- Schema constraint
source_binding_class.keep "keep_policy" value false Absent -- Schema constraint
source_binding_class.absent "substitute_value" value false Absent -- Value used when its implicit join or lookup finds no record; without it, finding no record gives missing (LOOKUP-24).
source_binding_class.require_match "bool" value false Absent -- When true, an implicit join that finds no record fails instead of being answered; it cannot be declared with absent (LOOKUP-24).
flag_class.condition "predicate" expression true Absent -- Predicate selecting the true value (EXPR-8).
flag_class.true_value "substitute_value" value false "Y" -- Value returned when the condition is true (EXPR-8).
flag_class.false_value "substitute_value" value false Absent -- Value returned when the condition is false; missing when absent (EXPR-8).
flag_class.missing "substitute_value" value false Absent -- Value returned when the condition is unknown; missing when absent, and required when false_value is declared (EXPR-8).
filtered_source ["variable", "source_binding_class"] name false Absent -- A variable, or the source_binding_class form carrying it with its range, filter, selection or absent value (LOOKUP-1).
keep_policy "str" value false Absent {"values": ["first", "last"]} LOOKUP-10
order_by_term ["variable", "order_term_class"] name false Absent -- Order term; a bare variable sorts ascending with missing values first, as the lowest value (VALUE-22).
order_term_class.variable "variable" name true Absent -- Variable used as an ordering term (VALUE-22).
order_term_class.direction "str" value false "asc" {"values": ["asc", "desc"]} Sort direction for non-missing values (VALUE-22).
order_term_class.nulls "str" value false Absent {"values": ["first", "last"]} Absolute placement of missing values, never flipped by direction; when omitted, missing sorts lowest (VALUE-22).
case_item_class ["case_branch_class", "case_otherwise_class"] structure false Absent -- A when/then branch, or the trailing otherwise item (EXPR-7).
case_branch_class.when "predicate" expression true Absent -- Condition that selects this branch when true (EXPR-7).
case_branch_class.then "case_result" expression true Absent -- Result returned when the condition is true (EXPR-7).
case_otherwise_class.otherwise "case_result" expression true Absent -- Result used when no branch condition is true (EXPR-7).
case_result "expression" expression false Absent -- Schema constraint

schema_expression_date.yaml

Field or value type Type Kind Required Default Constraints Contract
expressions.diff.type "temporal_type" value true Absent -- Declared type of both dates or both datetimes, which selects the units (TIME-4).
expressions.diff.start "variable" name true Absent -- Starting date or datetime (TIME-4).
expressions.diff.end "variable" name true Absent -- Ending date or datetime; an earlier end produces a negative result (TIME-4).
expressions.diff.unit "str" value true Absent {"values": ["day", "week", "month", "year", "second", "minute", "hour"]} Calendar unit day, week, month or year for dates, or elapsed unit second, minute, hour or day for datetimes, where a day is 86400 seconds (TIME-4).
expressions.diff.closed "str" value false "right" {"values": ["right", "both", "neither"]} Which endpoints the day count includes, the end only, both or neither, defined only for dates with unit day (TIME-5).
expressions.impute.type "temporal_type" value true Absent -- Declared type of the completed value (TIME-8).
expressions.impute.source "variable" name true Absent -- Collected ISO 8601 date or datetime text, read up to its first unknown field, a value of the declared type, or with type datetime a date whose time of day time supplies (TIME-7, TIME-8).
expressions.impute.month "int" value false Absent -- Month supplied to a source collected only to the year, 1 to 12, declared only beside day; without it such a source gives missing (TIME-10).
expressions.impute.day ["int", "day_rule"] value false Absent -- Day supplied to a source collected to the year or the month, an integer from 1 to 31 or first or last resolved against the month the date lands in; without it a source with no day gives missing (TIME-10).
expressions.impute.time "time_rule" value false Absent -- Time fields supplied when the source does not carry them, first supplying 00 to each and last 23, 59 and 59; declared exactly when type is datetime (TIME-10).
expressions.impute.not_before "variable" name false Absent -- Value of the declared type the completed value must not precede; it moves only supplied components, and a bound outside the interval the collected components admit is ignored (TIME-9).
expressions.impute.not_after "variable" name false Absent -- Value of the declared type the completed value must not follow; it moves only supplied components, a bound outside the collected interval is ignored, and it wins when the bounds cross (TIME-9).
expressions.impute.fallback "variable" name false Absent -- Value of the declared type returned, with collected precision none, when the source is missing (TIME-13).
expressions.impute.invalid "substitute_value" value false Absent -- Result when the source is text that cannot be read as collected date text, such as an ISO 8601 interval or duration (TIME-13).
expressions.precision.type "temporal_type" value true Absent -- Declared type whose collected precision is reported, at most day for a date (TIME-7).
expressions.precision.source "variable" name true Absent -- Collected ISO 8601 date or datetime text, read up to its first unknown field, or a value of the declared type (TIME-7).
expressions.precision.invalid "substitute_value" value false Absent -- Result when the source is text that cannot be read as collected date text, such as an ISO 8601 interval or duration (TIME-13).
expressions.imputation_flag.source "variable" name true Absent -- Imputed date or datetime whose collected precision is flagged (TIME-18).
expressions.imputation_flag.part "str" value true Absent {"values": ["date", "time"]} Flag derived, the date flag of a date or datetime or the time flag of a datetime (TIME-18).
expressions.imputation_flag.seconds_collected "bool" value false true -- Whether the study collects seconds, so a time collected to the minute had its seconds imputed (TIME-18).
expressions.to_date.source "variable" name true Absent -- Datetime whose calendar date is returned, or ISO 8601 date or datetime text whose date part is returned (TIME-2).
expressions.date_text.source "variable" name true Absent -- Text holding a date in one of the declared forms, read whole and untrimmed (TIME-22).
expressions.date_text.forms "list[date_form]" value true Absent -- Forms the source may take, at least one, each named once, and at most one of mdy_slash and dmy_slash, which fix the order of day and month (TIME-22).
expressions.date_text.invalid "substitute_value" value false Absent -- Result when the source is text in none of the declared forms (TIME-22).
expressions.study_day.source "variable" name true Absent -- Date whose study day is returned (TIME-6).
expressions.study_day.reference "variable" name true Absent -- Reference start date, which is study day 1 (TIME-6).
expressions.to_epoch_day.source "variable" name true Absent -- Date converted to days since 1970-01-01 (TIME-3).
expressions.dtc.year "variable" name true Absent -- Collected year, four digits as text or an integer from 1 to 9999; a missing year gives missing (TIME-19).
expressions.dtc.month "variable" name false Absent -- Collected month, two digits as text or an integer from 1 to 12; the text stops before a missing month (TIME-19).
expressions.dtc.day "variable" name false Absent -- Collected day within its month, declared only beside month (TIME-19).
expressions.dtc.hour "variable" name false Absent -- Collected hour from 0 to 23, declared only beside day (TIME-19).
expressions.dtc.minute "variable" name false Absent -- Collected minute from 0 to 59, declared only beside hour (TIME-19).
expressions.dtc.second "variable" name false Absent -- Collected second from 0 to 59, declared only beside minute (TIME-19).
expressions.dtc.invalid "substitute_value" value false Absent -- Result when a part the text reads is not its field's digits or lies outside its range (TIME-19).
expressions.time_of_day.source "variable" name true Absent -- Datetime whose time of day is returned as whole seconds since midnight (TIME-20).
expressions.to_time.source "variable" name true Absent -- Datetime whose time of day is returned as a time (TIME-23).
expressions.shift.type "temporal_type" value true Absent -- Declared type of the source and the result (TIME-14).
expressions.shift.source "variable" name true Absent -- Complete date or civil datetime to move (TIME-14).
expressions.shift.days "shift_days" name false Absent -- Signed integer literal or integer variable moving a date; declared exactly when type is date (TIME-14).
expressions.shift.amount "shift_amount" name false Absent -- Signed numeric literal or variable moving a datetime, an integer with unit second; declared exactly when type is datetime (TIME-14).
expressions.shift.unit "str" value false Absent {"values": ["second", "minute", "hour", "day"]} Elapsed unit of the amount, where a day is 86400 seconds; declared exactly when type is datetime (TIME-14).
expressions.duration_value.source "variable" name true Absent -- ISO 8601 fixed-length duration text (TIME-17).
expressions.duration_value.unit "str" value true Absent {"values": ["second", "minute", "hour", "day"]} Numeric result unit of second, minute, hour or day (TIME-17).
expressions.duration_value.invalid "substitute_value" value false Absent -- Literal result for invalid or out-of-range duration text (TIME-17).
expressions.duration_text.source "variable" name true Absent -- Signed int or float amount written as ISO 8601 fixed-length duration text (TIME-21).
expressions.duration_text.unit "str" value true Absent {"values": ["second", "minute", "hour", "day"]} Elapsed unit of the source amount, second, minute, hour or day, where a day is 86400 seconds (TIME-21).
expressions.calendar_duration.start "variable" name true Absent -- Starting date of the calendar duration (TIME-24).
expressions.calendar_duration.end "variable" name true Absent -- Ending date; an earlier end writes the duration of the exchanged dates after one leading minus sign (TIME-24).
temporal_type "str" value false Absent {"values": ["date", "datetime"]} Declared temporal type a type-dispatched operation reads and returns, never inferred from runtime text (TIME-1).
day_rule "str" value false Absent {"values": ["first", "last"]} Day resolved against the month the completed date lands in (TIME-8).
time_rule "str" value false Absent {"values": ["first", "last"]} Earliest or latest civil moment the collected source admits, each missing time field taking its first or last value (TIME-8).
date_form "str" value false Absent {"values": ["iso", "ddmonyyyy", "mdy_slash", "dmy_slash", "yyyymmdd", "monyyyy"]} Form of date text that date_text reads, iso for collected date text, or else the fields in the order its name spells, mon being a three-letter month abbreviation (TIME-22).
shift_days ["variable", "int"] name false Absent -- Integer variable or signed integer literal (TIME-14).
shift_amount ["variable", "int", "float"] name false Absent -- Numeric variable or signed numeric literal (TIME-14).

schema_expression_function.yaml

Field or value type Type Kind Required Default Constraints Contract
expressions.function.name "identifier" identifier true Absent -- Logical function, defined in a function file the project lists, that the call selects (FUNC-4).
expressions.function.args "dict[identifier, function_arg]" expression false {} -- Named argument leaves of the call (FUNC-6).
function_arg ["str", "int", "float", "bool", "null"] expression false Absent -- One expression leaf, which is a bare name for a variable, quoted text, a YAML number or Boolean, YAML null for missing, or a DATE or DATETIME literal; arbitrary nesting is not allowed (FUNC-6).

schema_expression_mapping.yaml

Field or value type Type Kind Required Default Constraints Contract
expressions.mapping.source "filtered_source" name true Absent -- String variable used as the dictionary key, or a filtered source carrying it (EXPR-11).
expressions.mapping.dict "mapping_dict" value true Absent -- Source-value to result-value dictionary, written inline or as the path of a YAML file holding it (EXPR-11).
expressions.mapping.case_sensitive "bool" value false true -- Compare exactly when true; fold ASCII letters when false (EXPR-12).
expressions.mapping.missing "substitute_value" value false Absent -- Value returned when the source is missing; without it, a missing source gives missing (EXPR-11).
expressions.mapping.unmapped "substitute_value" value false Absent -- Value returned when the source is present but has no dictionary entry; without it, such a source fails (EXPR-11).
expressions.decode.source "filtered_source" name true Absent -- Variable holding the coded value, or a filtered source carrying it (EXPR-15).
expressions.decode.codelist "identifier" identifier true Absent -- Codelist the project file declares, whose item decodes replace the coded values (EXPR-15, CT-1).
expressions.decode.missing "substitute_value" value false Absent -- Value returned when the source is missing; without it, a missing source gives missing (EXPR-15).
expressions.decode.unmapped "substitute_value" value false Absent -- Value returned when the source is present but no item of the codelist lists it; without it, such a source fails (EXPR-15).
expressions.cut.source "filtered_source" name true Absent -- Numeric variable to classify, or a filtered source carrying it (EXPR-13).
expressions.cut.breaks "list[float]" value true Absent -- Ascending interval boundaries (EXPR-13).
expressions.cut.labels "list[str]" value true Absent -- One label per interval; exactly one more than breaks (EXPR-13).
expressions.cut.closed "str" value false "left" {"values": ["left", "right"]} Boundary each interval includes, left-closed and right-open, or right-closed and left-open (EXPR-13).
expressions.cut.missing "substitute_value" value false Absent -- Value returned when the source is missing; without it, a missing source gives missing (EXPR-13).
mapping_dict ["dict[str, substitute_value]", "project_path"] value false Absent -- Inline dictionary, or the path of a YAML file holding one (EXPR-11).

schema_expression_numeric.yaml

Field or value type Type Kind Required Default Constraints Contract
expressions.round_half_away_from_zero.source "variable" name true Absent -- Numeric variable to round (FORMULA-16).
expressions.round_half_away_from_zero.digits "int" value true Absent -- Integer decimal places; negative rounds left of the decimal point (FORMULA-16).
expressions.str_decimal.source "variable" name true Absent -- Numeric variable written as text (TEXT-15).
expressions.str_decimal.decimals "int" value true Absent -- Digits written after the decimal point, zero or more, to which the value is rounded (TEXT-15).
expressions.str_decimal.width "int" value false Absent -- Minimum length of the text, reached with leading spaces; longer text is never truncated (TEXT-15).
expressions.str_decimal.missing "substitute_value" value false Absent -- Value returned when the source is missing; without it, a missing source gives missing (TEXT-15).

schema_expression_odm.yaml

Field or value type Type Kind Required Default Constraints Contract
expressions.odm ["odm_item", "odm_class"] -- false Absent -- One collected item read from the row's ODM scope; a bare string is the item (NAME-7).
odm_item "str" identifier false Absent {"pattern": "^[A-Za-z_][A-Za-z0-9_]*\\.[!-~]+$"} NAME-7
odm_oid "str" identifier false Absent {"pattern": "^[!-~]+$"} NAME-12
odm_class.item "odm_item" identifier true Absent -- The ODM input and the complete ItemOID, written as DATASET.ItemOID (NAME-7).
odm_class.event "list[odm_oid]" identifier false Absent -- StudyEventOID values an identified record carries, written as a list even when there is one (NAME-12).
odm_class.form "list[odm_oid]" identifier false Absent -- FormOID values an identified record carries, written as a list even when there is one (NAME-12).
odm_class.item_group "list[odm_oid]" identifier false Absent -- ItemGroupOID values an identified record carries, written as a list even when there is one (NAME-12).
odm_class.filter "predicate" expression false Absent -- Predicate over the ODM input's schema fields that an identified record satisfies (NAME-12).

schema_expression_str.yaml

Field or value type Type Kind Required Default Constraints Contract
expressions.str_pad.source "variable" name true Absent -- TEXT-2
expressions.str_pad.width "int" value true Absent -- TEXT-2
expressions.str_substr.source "variable" name true Absent -- String variable whose scalars are taken (TEXT-13).
expressions.str_substr.start "int" value false Absent -- Position of the first scalar taken, counted from 1; required unless piece is declared, and refused beside it (TEXT-13, TEXT-16).
expressions.str_substr.length "int" value false Absent -- Most scalars taken; without it, they run to the end of the source; required beside piece (TEXT-13, TEXT-16).
expressions.str_substr.piece "int" value false Absent -- Which piece, counted from 1, of the text broken between words into pieces of at most length scalars; declared instead of start (TEXT-16).
expressions.str_substr.missing "substitute_value" value false Absent -- Value returned when the source is missing; without it, a missing source gives missing (TEXT-13).
expressions.str_length.source "variable" name true Absent -- String variable whose scalars are counted (TEXT-14).
expressions.str_length.missing "substitute_value" value false Absent -- Value returned when the source is missing; without it, a missing source gives missing (TEXT-14).
expressions.str_extract.source "variable" name true Absent -- String variable to search (TEXT-10).
expressions.str_extract.pattern "regex" value true Absent -- Regular expression searched for in the source (TEXT-9).
expressions.str_extract.group "int" value false 0 -- Match group to return; 0 is the full match (TEXT-10).
expressions.str_extract.missing "substitute_value" value false Absent -- Value returned when the source is missing; without it, a missing source gives missing (TEXT-10).
expressions.str_extract.no_match "substitute_value" value false Absent -- Value returned when the pattern does not match the source (TEXT-10).
expressions.str_replace.source "variable" name true Absent -- String variable to search (TEXT-11).
expressions.str_replace.pattern "regex" value true Absent -- Regular expression whose every match in the source is replaced (TEXT-11).
expressions.str_replace.replacement "str" value true Absent -- Literal text that replaces each match (TEXT-11).
expressions.str_replace.missing "substitute_value" value false Absent -- Value returned when the source is missing; without it, a missing source gives missing (TEXT-11).
expressions.str_template ["string_template", "str_template_class"] -- false Absent -- Portable string template, concise or with missing handling (TEXT-4).
expressions.str_case.source "variable" name true Absent -- String variable whose ASCII letters change case (TEXT-5).
expressions.str_case.to "str" value true Absent {"values": ["upper", "lower", "sentence", "title", "proper"]} Case to produce, one of upper, lower, sentence, title or proper (TEXT-5).
expressions.str_case.delimiters "str" value false Absent -- ASCII characters, each listed once, after which proper raises the next character, declared only with proper; without it they are the blank, slash, hyphen, open parenthesis, period and tab (TEXT-5).
expressions.str_case.missing "substitute_value" value false Absent -- Value returned when the source is missing; without it, a missing source gives missing (TEXT-5).
string_template "str" expression false Absent -- Template string of literal text, braced placeholders and doubled braces (TEXT-3).
str_template_class.template "string_template" expression true Absent -- Text containing literal content and braced variables (TEXT-3).
str_template_class.missing "substitute_value" value false Absent -- Value returned when any placeholder value is missing; without it, a missing placeholder fails (TEXT-4).

schema_expression_window.yaml

Field or value type Type Kind Required Default Constraints Contract
window_selection ["identifier", "window_spec"] structure false Absent -- WINDOW-1
window_spec.group_by "list[variable]" name false Absent -- Variables defining partitions; omission uses one partition (WINDOW-3).
window_spec.order_by "list[order_by_term]" name false Absent -- Terms ordering rows within each partition (WINDOW-3).
window_spec.filter "predicate" expression false Absent -- Predicate selecting rows (WINDOW-4).
expressions.row_number.window "window_selection" structure false Absent -- Partition, ordering and row selection for the window (WINDOW-6).
expressions.rank.method "str" value false "competition" {"values": ["competition", "dense"]} Tie numbering; competition leaves position gaps and dense does not (WINDOW-6).
expressions.rank.window "window_selection" structure false Absent -- Partition, ordering and row selection for the window (WINDOW-6).
expressions.row_value.source "variable" name true Absent -- Variable read from the offset row; a strictly backward read can name calculated history under WINDOW-12 (WINDOW-7).
expressions.row_value.offset "int" value true Absent -- Rows to move along the declared order; nonzero (WINDOW-7).
expressions.row_value.window "window_selection" structure false Absent -- Partition, ordering and row selection for the window (WINDOW-7).
expressions.locf.source "variable" name true Absent -- Completed observed variable to carry forward (WINDOW-8).
expressions.locf.include_current "bool" value false true -- Whether a present current source answers before earlier rows (WINDOW-8).
expressions.locf.window "window_selection" structure false Absent -- Partition, ordering and optional row selection (WINDOW-8).
expressions.baseline_flag.date "variable" name true Absent -- Candidate baseline date or datetime (WINDOW-9).
expressions.baseline_flag.reference "variable" name true Absent -- Upper bound for the baseline date, of the same temporal type (WINDOW-9).
expressions.baseline_flag.source "variable" name true Absent -- Analysis value the baseline is for; a row whose value is missing is not eligible (WINDOW-9).
expressions.baseline_flag.inclusive "bool" value false true -- Whether a date equal to the reference date is eligible; false admits only earlier dates (WINDOW-9).
expressions.baseline_flag.window "window_selection" structure false Absent -- Baseline-selection partitions, row filter and the order of eligible rows, whose last row is the baseline; order_by defaults to the date alone (WINDOW-9).

schema_function.yaml

Field or value type Type Kind Required Default Constraints Contract
function_definition_class.yamaa "language_version" value true Absent -- Oldest language version this function file needs, always quoted (SCHEMA-2).
function_definition_class.type "str" value true Absent {"values": ["function"]} File type of a function file, which defines one project function (FUNC-4).
function_definition_class.name "identifier" identifier true Absent -- Logical name a specification calls the function by (FUNC-4).
function_definition_class.description "str" value true Absent {"min_length": 1} Description of what the function computes (FUNC-4).
function_definition_class.params "list[function_parameter_class]" structure true Absent -- Closed, ordered named parameters of the function (FUNC-5).
function_definition_class.returns "column_type" value true Absent -- Column type of the one scalar the function returns (FUNC-9).
function_definition_class.may_return_missing "bool" value false false -- Whether an invoked binding may return the missing value (FUNC-9).
function_definition_class.comparison_decimals "int" value false 4 -- Decimal places at which numeric test results are compared (FUNC-13).
function_definition_class.implementations "dict[host_language, qualified_callable]" identifier true Absent -- Statically written fully qualified callable each host language binds, by language key (FUNC-8).
function_definition_class.tests "list[function_test_class]" structure true Absent -- Inline test cases activation runs before any study data is read (FUNC-11).
host_language "str" value false Absent {"values": ["python", "r"]} Host language a callable belongs to.
function_parameter_class.name "identifier" identifier true Absent -- Parameter name, matching the callable's parameter exactly (FUNC-5).
function_parameter_class.type "function_param_type" value true Absent -- Exact type every argument and default of this parameter has (FUNC-5).
function_parameter_class.required "bool" value false true -- Whether a call must supply this argument (FUNC-5).
function_parameter_class.default "function_value" value false Absent -- Value an omitted optional argument takes (FUNC-7).
function_parameter_class.accepts_missing "bool" value false false -- Whether a missing argument is passed to the binding instead of short-circuiting the call (FUNC-7).
function_param_type "str" value false Absent {"values": ["str", "int", "float", "bool", "date", "datetime", "time"]} Schema constraint
function_value "literal_value" value false Absent -- Constant of the declared parameter or return type, a date, datetime or time written as bare text and YAML null for missing (FUNC-5).
qualified_callable "str" identifier false Absent {"min_length": 1} Fully qualified callable name, such as projectbmi.bmi or projectbmi::bmi (FUNC-8).
function_case_id "str" identifier false Absent {"pattern": "^[a-z][a-z0-9-]*$"} Name of one function test case (FUNC-11).
function_coverage "str" identifier false Absent {"pattern": "^(normal\|boundary\|nullable-output\|numeric-comparison\|(default\|accepted-missing\|short-circuit-missing\|boolean-true\|boolean-false):[A-Za-z_][A-Za-z0-9_]*)$"} Obligation a function test case demonstrates (FUNC-11).
function_test_class.id "function_case_id" identifier true Absent -- Unique name of the test case (FUNC-11).
function_test_class.covers "list[function_coverage]" identifier true Absent -- Obligations this case demonstrates (FUNC-11).
function_test_class.args "dict[identifier, function_value]" value true Absent -- Logical arguments the case passes, by parameter name (FUNC-11).
function_test_class.result "function_value" value true Absent -- Result the call is expected to return (FUNC-11).

schema_metadata.yaml

Field or value type Type Kind Required Default Constraints Contract
submission_dataset_class.mode "str" value false Absent {"values": ["validated", "historical"]} Validated metadata constrains derivation; historical metadata reproduces declarations without asserting their truth about the derived data (DEFINE-30).
submission_dataset_class.artifact "relative_href" path false Absent -- Literal historical package link; permitted only in historical metadata exports without transport (DEFINE-30).
submission_dataset_class.has_no_data "bool" value false false -- Whether the submitted dataset has no data, carried for submission composition only (SUB-4).
submission_dataset_class.label "str" value true Absent {"min_length": 1} Description of the dataset as a whole, distinct from the domain it derives.
submission_dataset_class.class "dataset_class_name" value true Absent -- General observation class of the dataset.
submission_dataset_class.subclass "dataset_subclass_name" value false Absent -- Observation subclass, declared when the standard defines one for the dataset.
submission_dataset_class.structure "str" value true Absent {"min_length": 1} Level of detail one record represents, stated in prose.
submission_dataset_class.repeating "bool" value true Absent -- Whether the dataset may carry more than one record per subject or pool.
submission_dataset_class.reference_data "bool" value false false -- Whether the dataset carries reference data rather than subject data.
submission_dataset_class.domain "identifier" identifier false Absent -- Domain the dataset belongs to; defaults to the specification's domain.
submission_dataset_class.standard "standard_reference" identifier false Absent -- Name of the composing section's standard that binds the dataset; the section's first standard when omitted (DEFINE-6, DEFINE-8).
submission_dataset_class.non_standard "bool" value false false -- Whether no implementation guide defines the dataset, as for a custom domain; such a dataset binds no standard and declares none (SUB-4, DEFINE-6).
submission_dataset_class.comment "submission_comment" value false Absent -- Sponsor comment carried with the dataset definition.
submission_column_class.key_sequence "int" value false Absent -- Historical ItemRef key position, independent of the executable keys; permitted only in historical metadata (DEFINE-30).
submission_column_class.has_no_data "bool" value false Absent -- Historical ItemRef def:HasNoData, which validated metadata measures from the published data instead; permitted only in historical metadata (SUB-28, DEFINE-30).
submission_column_class.core "core_designation" value false Absent -- Standard core designation, declared and derived by model (SUB-10).
submission_column_class.mandatory "bool" value false Absent -- Whether every completed value must be present, resolved from keys, declaration and class (SUB-10) and enforced (SUB-11).
submission_column_class.role "column_role" value false Absent -- Role the column plays in its dataset (SUB-9).
submission_column_class.data_type "define_data_type" value false Absent -- Submission data type, defaulted from the declared column type (SUB-6).
submission_column_class.length "int" value false Absent -- Maximum expected value length, derived from a max_length verification and bound to the constraint that enforces it (SUB-8).
submission_column_class.significant_digits "int" value false Absent -- Digits after the decimal point; required with a float submission data type.
submission_column_class.display_format "str" value false Absent {"min_length": 1} Presentation format carried for a reader; it never changes a computed value.
submission_column_class.codelist "identifier" identifier false Absent -- Codelist whose values this column carries (CT-1).
submission_column_class.inventory_vocabulary "bool" value false Absent -- Whether every non-missing value must name a dataset any submission section of the project file declares (CT-11).
submission_column_class.origins "list[submission_origin_class]" structure false Absent -- Declared provenance of the value, one entry per origin, which the derivation may refute (SUB-14, SUB-19).
submission_column_class.method "submission_method" value false Absent -- Algorithm producing the value, required for a derived origin (SUB-18).
submission_column_class.comment "submission_comment" value false Absent -- Sponsor comment carried with the column definition.
submission_column_class.value_level "list[submission_value_class]" structure false Absent -- Value-level entries, each overriding the column's metadata on the rows its where clause selects (SUB-12).
submission_value_class.id "identifier" identifier true Absent -- Identifier of the entry, unique within the column, naming its value-level definitions (SUB-12, DEFINE-9).
submission_value_class.where "dict[identifier, where_condition]" value true Absent -- Declared str output columns and the values that select the entry's rows; a row is selected when every listed column meets its condition (SUB-12).
submission_value_class.label "str" value false Absent {"min_length": 1} Description of the value-level definition; the column's label when omitted (DEFINE-27).
submission_value_class.key_sequence "int" value false Absent -- Historical ItemRef key position, independent of the executable keys; permitted only in historical metadata (DEFINE-30).
submission_value_class.has_no_data "bool" value false Absent -- Historical ItemRef def:HasNoData, which validated metadata measures from the published data instead; permitted only in historical metadata (SUB-28, DEFINE-30).
submission_value_class.core "core_designation" value false Absent -- Standard core designation, declared and derived by model (SUB-10).
submission_value_class.mandatory "bool" value false Absent -- Whether every completed value must be present, resolved from keys, declaration and class (SUB-10) and enforced (SUB-11).
submission_value_class.role "column_role" value false Absent -- Role the column plays in its dataset (SUB-9).
submission_value_class.data_type "define_data_type" value false Absent -- Submission data type, defaulted from the declared column type (SUB-6).
submission_value_class.length "int" value false Absent -- Maximum expected value length, derived from a max_length verification and bound to the constraint that enforces it (SUB-8).
submission_value_class.significant_digits "int" value false Absent -- Digits after the decimal point; required with a float submission data type.
submission_value_class.display_format "str" value false Absent {"min_length": 1} Presentation format carried for a reader; it never changes a computed value.
submission_value_class.codelist "identifier" identifier false Absent -- Codelist whose values this column carries (CT-1).
submission_value_class.inventory_vocabulary "bool" value false Absent -- Whether every non-missing value must name a dataset any submission section of the project file declares (CT-11).
submission_value_class.origins "list[submission_origin_class]" structure false Absent -- Declared provenance of the value, one entry per origin, which the derivation may refute (SUB-14, SUB-19).
submission_value_class.method "submission_method" value false Absent -- Algorithm producing the value, required for a derived origin (SUB-18).
submission_value_class.comment "submission_comment" value false Absent -- Sponsor comment carried with the column definition.
where_condition ["list[where_value]", "where_comparison_class"] value false Absent -- Values that select a row by its where column, which equals the one value or any of several, unless a comparator states another comparison (SUB-12).
where_comparison_class.comparator "str" value false Absent {"values": ["NE", "NOTIN"]} Comparison of the listed values, NE for a column unequal to one value and NOTIN for a column equal to none of them (SUB-12).
where_comparison_class.values "list[where_value]" value true Absent -- Values the comparison reads (SUB-12).
where_value "str" value false Absent {"min_length": 1} One value a where clause selects rows by (SUB-12).
submission_role_fields.core "core_designation" value false Absent -- Standard core designation, declared and derived by model (SUB-10).
submission_role_fields.mandatory "bool" value false Absent -- Whether every completed value must be present, resolved from keys, declaration and class (SUB-10) and enforced (SUB-11).
submission_role_fields.role "column_role" value false Absent -- Role the column plays in its dataset (SUB-9).
submission_metadata_fields.key_sequence "int" value false Absent -- Historical ItemRef key position, independent of the executable keys; permitted only in historical metadata (DEFINE-30).
submission_metadata_fields.has_no_data "bool" value false Absent -- Historical ItemRef def:HasNoData, which validated metadata measures from the published data instead; permitted only in historical metadata (SUB-28, DEFINE-30).
submission_metadata_fields.core "core_designation" value false Absent -- Standard core designation, declared and derived by model (SUB-10).
submission_metadata_fields.mandatory "bool" value false Absent -- Whether every completed value must be present, resolved from keys, declaration and class (SUB-10) and enforced (SUB-11).
submission_metadata_fields.role "column_role" value false Absent -- Role the column plays in its dataset (SUB-9).
submission_metadata_fields.data_type "define_data_type" value false Absent -- Submission data type, defaulted from the declared column type (SUB-6).
submission_metadata_fields.length "int" value false Absent -- Maximum expected value length, derived from a max_length verification and bound to the constraint that enforces it (SUB-8).
submission_metadata_fields.significant_digits "int" value false Absent -- Digits after the decimal point; required with a float submission data type.
submission_metadata_fields.display_format "str" value false Absent {"min_length": 1} Presentation format carried for a reader; it never changes a computed value.
submission_metadata_fields.codelist "identifier" identifier false Absent -- Codelist whose values this column carries (CT-1).
submission_metadata_fields.inventory_vocabulary "bool" value false Absent -- Whether every non-missing value must name a dataset any submission section of the project file declares (CT-11).
submission_metadata_fields.origins "list[submission_origin_class]" structure false Absent -- Declared provenance of the value, one entry per origin, which the derivation may refute (SUB-14, SUB-19).
submission_metadata_fields.method "submission_method" value false Absent -- Algorithm producing the value, required for a derived origin (SUB-18).
submission_metadata_fields.comment "submission_comment" value false Absent -- Sponsor comment carried with the column definition.
submission_origin_class.type "origin_type" value true Absent -- How the value originated.
submission_origin_class.source "origin_source" value false Absent -- Party responsible for the value, admitted and derived by model (SUB-15).
submission_origin_class.description "str" value false Absent {"min_length": 1} Explanatory text, required where the origin is incomplete without it; a Predecessor names the column it copies (SUB-16).
submission_origin_class.documents "list[document_reference]" identifier false Absent -- Supporting documents evidencing the origin; a value collected from a person names its annotated case report form page under Submission (SUB-17).
submission_method_class.name "str" value false Absent {"min_length": 1} Name of the algorithm; Define-XML derives one when it is omitted (DEFINE-21).
submission_method_class.type "method_type" value false "Computation" -- Kind of algorithm the method describes.
submission_method_class.description "str" value true Absent {"min_length": 1} Statement of the algorithm in prose.
submission_method_class.expression "formal_expression_class" structure false Absent -- Machine-readable code the method is also stated in.
submission_method_class.documents "list[document_reference]" identifier false Absent -- Supporting documents carrying the full algorithm.
submission_comment_class.text "str" value true Absent {"min_length": 1} Text of the comment.
submission_comment_class.documents "list[document_reference]" identifier false Absent -- Supporting documents the comment refers to.
formal_expression_class.context "str" value true Absent {"min_length": 1} Language the code is written in, named for a reader that evaluates it.
formal_expression_class.code "str" value true Absent {"min_length": 1} The code itself; nothing in this language parses or executes it.
document_reference_class.document "identifier" identifier true Absent -- Supporting document this reference names.
document_reference_class.pages "page_reference_class" structure false Absent -- Place within the document the reference points at.
page_reference_class.type "str" value true Absent {"values": ["PhysicalRef", "NamedDestination"]} Whether refs are physical page numbers or named destinations.
page_reference_class.refs "str" value true Absent {"min_length": 1} Space-separated page numbers or destination names.
page_reference_class.title "str" value false Absent {"min_length": 1} Label a reader sees in place of the raw reference.
submission_comment ["str", "submission_comment_class"] value false Absent -- Comment text, or text with the documents it refers to.
submission_method ["str", "submission_method_class"] value false Absent -- Algorithm stated in prose, or with its name, code, and documents.
document_reference ["identifier", "document_reference_class"] identifier false Absent -- Document identifier, or an identifier with the place it points at.
standard_reference "str" identifier false Absent {"min_length": 1} Name of one implementation guide among the standards of the section that composes the dataset (DEFINE-8).
core_designation "str" value false Absent {"values": ["Req", "Exp", "Perm", "Cond"]} Required, expected, conditionally required, or permissible in the dataset's standard, admitted by model (SUB-10).
column_role "str" value false Absent {"values": ["Identifier", "Topic", "Timing", "Grouping Qualifier", "Result Qualifier", "Synonym Qualifier", "Record Qualifier", "Variable Qualifier", "Rule"]} One of the nine roles the SDTM model publishes (SUB-9).
origin_type "str" value false Absent {"values": ["Assigned", "Collected", "Derived", "Not Available", "Other", "Predecessor", "Protocol"]} Define-XML 2.1 origin type.
origin_source "str" value false Absent {"values": ["Investigator", "Sponsor", "Subject", "Vendor"]} Define-XML 2.1 origin source.
method_type "str" value false Absent {"values": ["Computation", "Imputation"]} Kind of algorithm a method describes.
define_data_type "str" value false Absent {"values": ["text", "integer", "float", "date", "datetime", "time", "partialDate", "partialTime", "partialDatetime", "incompleteDate", "incompleteTime", "incompleteDatetime", "durationDatetime", "intervalDatetime", "URI"]} Submission data type a column is represented by, within the closed set its declared column type admits (SUB-6).
dataset_class_name "str" value false Absent {"values": ["ADAM OTHER", "BASIC DATA STRUCTURE", "DEVICE LEVEL ANALYSIS DATASET", "EVENTS", "FINDINGS", "FINDINGS ABOUT", "INTERVENTIONS", "MEDICAL DEVICE BASIC DATA STRUCTURE", "MEDICAL DEVICE OCCURRENCE DATA STRUCTURE", "OCCURRENCE DATA STRUCTURE", "REFERENCE DATA STRUCTURE", "RELATIONSHIP", "SPECIAL PURPOSE", "STUDY REFERENCE", "SUBJECT LEVEL ANALYSIS DATASET", "TRIAL DESIGN"]} General observation class, in the exact case Define-XML 2.1 publishes.
dataset_subclass_name "str" value false Absent {"values": ["ADVERSE EVENT", "MEDICAL DEVICE TIME-TO-EVENT", "NON-COMPARTMENTAL ANALYSIS", "POPULATION PHARMACOKINETIC ANALYSIS", "TIME-TO-EVENT"]} Observation subclass, in the exact case Define-XML 2.1 publishes.

schema_project.yaml

Field or value type Type Kind Required Default Constraints Contract
project_class.yamaa "language_version" value true Absent -- Oldest language version this project file needs, always quoted (SCHEMA-2).
project_class.type "str" value true Absent {"values": ["project"]} File type of a project file, which every layer of a chain declares (SCHEMA-2).
project_class.parent "path" path false Absent -- Local project file this one inherits from, relative to this file; its sections compose with this file's before any file the project names is read (PROJECT-16).
project_class.clear "list[spec_path]" value false Absent -- Inherited values this project file removes before its own fields compose, each named by its path (PROJECT-16, LAYER-9).
project_class.functions "list[project_path]" path false Absent -- Function files defining the project functions specifications may call, each relative to the project file (FUNC-1).
project_class.environments "environments_class" structure false Absent -- Lock of each host language, by language key; a host that declares no lock has no entry (PROJECT-2).
project_class.codelists "list[codelist_source]" structure false Absent -- Codelist sources supplying study terminology, in order; a later source's codelist replaces an earlier one of its id (CT-1).
project_class.study "study_class" structure false Absent -- Study the specifications belong to; Define-XML requires it (DEFINE-1, DEFINE-28).
project_class.sdtm "submission_section_class" structure false Absent -- Tabulation specifications and the submission metadata composing them into one Define-XML document (PROJECT-3).
project_class.adam "submission_section_class" structure false Absent -- Analysis specifications and the submission metadata composing them into one Define-XML document (PROJECT-3).
project_class.send "submission_section_class" structure false Absent -- Nonclinical tabulation specifications and the submission metadata composing them into one Define-XML document (PROJECT-3).
environments_class.python "host_environment_class" structure false Absent -- Environment of the Python host (PROJECT-2).
environments_class.r "host_environment_class" structure false Absent -- Environment of the R host (PROJECT-2).
host_environment_class.lock "project_path" path true Absent -- Packaging lock the installed called packages are verified against, relative to the project file (FUNC-3).
study_class.id "define_id" identifier true Absent -- Identifier the study's generated identity is built from (DEFINE-9).
study_class.name "str" value true Absent {"min_length": 1} Name of the study.
study_class.description "str" value true Absent {"min_length": 1} Description of the study.
study_class.protocol_name "str" value true Absent {"min_length": 1} Protocol the study runs under.
metadata_version_class.id "define_id" identifier true Absent -- Identifier this metadata version's generated identity is built from (DEFINE-9).
metadata_version_class.name "str" value true Absent {"min_length": 1} Name of this metadata version.
metadata_version_class.description "str" value false Absent {"min_length": 1} Description of what this metadata version covers.
define_id "str" identifier false Absent {"pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$"} Identifier a generated OID is built from.
language_tag "str" value false Absent {"pattern": "^[A-Za-z]{2,3}(-[A-Za-z0-9]{1,8})*$"} Language tag carried by every generated translated text.
submission_section_class.specs "list[path]" path true Absent -- Ordered specifications of this model, resolved with their parent layers; the only field a run needs (PROJECT-3, DEFINE-5).
submission_section_class.standards "list[implementation_guide_class]" structure false Absent -- Implementation guides that bind the selected datasets, the first being the one a specification takes when it names none; Define-XML requires them (DEFINE-6, DEFINE-28).
submission_section_class.define "path" path false Absent -- Define-XML publication target, relative to the project file; Define-XML requires it (DEFINE-2, DEFINE-28).
submission_section_class.define_version "str" value false Absent {"values": ["2.0.0", "2.1.0", "2.1.1", "2.1.2", "2.1.3", "2.1.4", "2.1.5", "2.1.6", "2.1.7", "2.1.8", "2.1.9", "2.1.10", "2.1.11"]} Define-XML release to generate; every published release from 2.0.0 through 2.1.11 is admitted, omission retains 2.1.11, and 2.0.0 refuses metadata its version cannot represent (DEFINE-29).
submission_section_class.documents "list[document_class]" structure false Absent -- Supporting document IDs, kinds, literal links and titles (DEFINE-13).
submission_section_class.transport "str" value false Absent {"values": ["dataset_json", "dataset_ndjson", "xpt"]} Transport file written for each composed dataset in the document's directory, read from its published artifact, dataset_json for Dataset-JSON in its single-object form, dataset_ndjson for its newline-delimited form and xpt for SAS Transport; required under context Submission, and its omission under Other writes only the Define-XML document (DEFINE-4, JSON-1, JSON-4, XPT-1).
submission_section_class.context "str" value false "Submission" {"values": ["Submission", "Other"]} Submission or Other; defaults to Submission (DEFINE-4).
submission_section_class.xml_lang "language_tag" value false "en" -- Language of generated translated text; defaults to en (DEFINE-21).
submission_section_class.file_oid "str" value false Absent {"min_length": 1} Optional nonempty file-identity text that admits the existing URL-style spellings; generated object and leaf identifiers are validated separately (DEFINE-3).
submission_section_class.metadata_version "metadata_version_class" structure false Absent -- Optional metadata-version ID, name and description overrides (DEFINE-3).
submission_section_class.originator "str" value false Absent {"min_length": 1} Optional submitting party (DEFINE-12).
submission_section_class.stylesheet "relative_href" path false Absent -- Optional relative stylesheet link (DEFINE-23).
submission_section_class.source_system_version "str" value false Absent {"min_length": 1} Optional nonempty XML and JSON source-system version; omission selects the installed package version (DEFINE-12).
implementation_guide_class.name "standard_name" value true Absent -- Schema constraint
implementation_guide_class.version "str" value true Absent {"min_length": 1} Schema constraint
implementation_guide_class.status "str" value true Absent {"values": ["Draft", "Final", "Provisional"]} Schema constraint
document_class.id "identifier" identifier true Absent -- Name references to this document use.
document_class.kind "str" value true Absent {"values": ["annotated_crf", "supplemental", "other"]} Where the document is listed; an other document is listed only where it is referenced.
document_class.link "relative_href" path true Absent -- File the document is, relative to the directory holding the generated document.
document_class.title "str" value true Absent {"min_length": 1} Label a reader sees for the document.

schema_shared.yaml

Field or value type Type Kind Required Default Constraints Contract
language_version "str" value false Absent {"values": ["1.0"]} Language version a file declares in yamaa, the oldest that admits every field it writes (SCHEMA-2).
column_type "str" value false Absent {"values": ["str", "int", "float", "date", "datetime", "time"]} Schema constraint
literal_value ["str", "int", "float", "bool", "null"] value false Absent -- Scalar constant in which YAML null is the missing value; a non-finite float becomes missing (VALUE-4).
substitute_value "literal_value" value false Absent -- Constant a handler, flag or mapping returns, with YAML null for the missing value (COLUMN-10).
path "str" path false Absent {"min_length": 1} Schema constraint
project_path "str" path false Absent {"min_length": 1} Local resource a run reads or publishes; a relative spelling uses the base its declaration selects and an absolute spelling names its local location (FILE-2).
spec_path "str" value false Absent {"min_length": 1} Dotted path of a value in the resolved specification or the composed project, naming a keyed member by its identity and quoting any other segment that is not a name (LAYER-9, PROJECT-16).
path_base "str" value false Absent {"values": ["declaring", "entry"]} Base directory of a relative path, the declaring file's or the entry file's directory (FILE-2).
identifier "str" identifier false Absent {"pattern": "^[A-Za-z_][A-Za-z0-9_]*$"} Single-token identifier; the field's own description states which naming list it belongs to, such as a declared dataset, a declared column, a document or a function (SPEC-2).
relative_href "str" path false Absent {"pattern": "^(?:[^./\\\\][^/\\\\]*\|\\.(?:[^./\\\\][^/\\\\]*\|\\.[^/\\\\]+)?)(?:/(?:[^./\\\\][^/\\\\]*\|\\.(?:[^./\\\\][^/\\\\]*\|\\.[^/\\\\]+)?)?)*$"} Location referenced from the generated document, relative to the directory holding it and never leaving that directory, which need not exist when the document is generated.

schema_spec.yaml

Field or value type Type Kind Required Default Constraints Contract
root_class.yamaa "language_version" value true Absent -- Oldest language version this specification needs, always quoted (SCHEMA-2).
root_class.type "str" value true Absent {"values": ["spec"]} File type of a specification, which every layer of a chain declares (SCHEMA-2).
root_class.model "str" value false Absent {"values": ["SDTM", "SEND", "ADaM"]} CDISC model of the output dataset, required when the specification declares submission metadata or a project section lists it (SUB-3).
root_class.parent "path" path false Absent -- Local specification layer this one inherits from, resolved before validation and execution (LAYER-2).
root_class.include "list[project_path]" path false Absent -- Local specification fragments composed after the parent chain and before this layer's own fields, in list order, each relative to this layer (LAYER-3).
root_class.clear "list[spec_path]" value false Absent -- Inherited values this layer removes before its own fields compose, each named by its spec path (LAYER-9).
root_class.domain "identifier" identifier true Absent -- Name of the output dataset this specification derives (SPEC-1).
root_class.keys "list[identifier]" identifier true Absent -- Output columns identifying a row (OUTPUT-2).
root_class.input "dict[identifier, dataset_source]" structure true Absent -- Source datasets this specification reads, each under the name it is read through (NAME-1).
root_class.base "identifier" identifier false Absent -- Input dataset whose records build output rows when rows is absent; row construction states when it is required.
root_class.filter "predicate" expression false Absent -- Predicate selecting base input records for row construction when rows is absent, as the filter-only row template lifted to the root; it cannot be declared with rows.
root_class.output "output_class" structure true Absent -- Artifact presentation, independent of the dependency-ordered declarations (OUTPUT-1).
root_class.windows "dict[identifier, window_spec]" structure false Absent -- WINDOW-1
root_class.intermediates "list[intermediate_class]" structure false Absent -- Named dataset lookups that several columns read through <lookup-id>.<column>.
root_class.columns "list[column_entry]" structure true Absent -- Columns in the dependency order the execution lifecycle requires; output.columns controls artifact order.
root_class.rows "list[row_class]" structure false Absent -- Row templates constructing output rows from input records or groups; it cannot be declared with filter.
root_class.verifications "list[dataset_verification]" structure false Absent -- Assertions over the completed dataset, written as a list even when there is one (CHECK-1).
root_class.submission "submission_dataset_class" structure false Absent -- Governed dataset metadata a submission document is generated from.
root_class.metadata "dict[str, str]" value false Absent -- Free-form annotations carried with the specification; submission metadata reserves the key names it governs.
output_class.path "path" path true Absent -- File this specification produces, whose extension selects the serialization profile (OUTPUT-5).
output_class.relative_to "path_base" value false "declaring" -- Base for the primary artifact and the run report file (FILE-2).
output_class.decimals "int" value false Absent -- Fixed display digits for every float column of a csv artifact; the CSV profile defines the rounding and rejects it for parquet.
output_class.columns "list[identifier]" identifier true Absent -- Declared columns selected for the artifact, in artifact order (OUTPUT-1).
output_class.report "path" path false Absent -- File the run report is written to, its extension selecting its profile; required when any verification is a warning (CHECK-22).
output_class.order_by "list[order_by_term]" name false Absent -- Terms ordering artifact rows after every verification; omission keeps construction order (OUTPUT-11).
intermediate_class.id "intermediate_id" identifier true Absent -- Name through which the looked-up record is read (LOOKUP-3).
intermediate_class.dataset "identifier" identifier true Absent -- Declared input dataset or pair relation, SELF for completed derived rows (LOOKUP-7), or the left side of a pair relation (LOOKUP-27).
intermediate_class.inner_join "identifier" identifier false Absent -- Right side of a pair relation, one record per matching pair of dataset and this relation on key; it cannot be declared with between, order_by, keep, nearest, absent or require_match (LOOKUP-27).
intermediate_class.key "intermediate_key" expression false Absent -- Match key of the lookup, required unless the intermediate drives a row template, which declares none (LOOKUP-3, ROW-2); none matches every record of the dataset (LOOKUP-5); a pair relation's key pairs its two sides (LOOKUP-27).
intermediate_class.between "record_between_class" structure false Absent -- Schema constraint
intermediate_class.filter "predicate" expression false Absent -- Schema constraint
intermediate_class.order_by "list[order_by_term]" name false Absent -- Schema constraint
intermediate_class.keep "keep_policy" value false Absent -- Schema constraint
intermediate_class.nearest "nearest_class" structure false Absent -- Selects the candidate whose date or datetime lies nearest a current-row value; it cannot be declared with order_by or keep (LOOKUP-26).
intermediate_class.pivot "pivot_class" structure false Absent -- Exposes each listed value of one donor field as a field of the selection, selected among the candidates of that name; it cannot be declared with columns, require_match, inner_join or SELF (LOOKUP-28).
intermediate_class.columns "list[identifier]" identifier false Absent -- Stored and derived columns the lookup may read; defaults to every available column (LOOKUP-11).
intermediate_class.absent "substitute_value" value false Absent -- Value returned when the lookup yields nothing; without it, yielding nothing gives missing (LOOKUP-24).
intermediate_class.require_match "bool" value false Absent -- When true, yielding nothing fails instead of being answered; it cannot be declared with absent (LOOKUP-24).
intermediate_class.derivations "dict[identifier, intermediate_derivation]" expression false Absent -- Per-record derivations over donor fields, the current input record, the current row's columns qualified by the output domain, and records other named intermediates select for it (LOOKUP-15); a pair relation requires them, as the fields it exposes (LOOKUP-27).
intermediate_class.verifications "list[intermediate_verification]" structure false Absent -- Uniqueness checks over the filtered donor records (LOOKUP-17).
record_between_class.value "variable" name true Absent -- Value read from the current row (LOOKUP-9).
record_between_class.lower "identifier" identifier false Absent -- Donor-record field whose value is the lower bound; omit for no lower bound (LOOKUP-9).
record_between_class.upper "identifier" identifier false Absent -- Donor-record field whose value is the upper bound; omit for no upper bound (LOOKUP-9).
record_between_class.closed "str" value false "both" {"values": ["both", "left", "right", "neither"]} Which stated endpoints are included (LOOKUP-9).
nearest_class.source "identifier" identifier true Absent -- Donor-record date or datetime field, stored or derived, whose distance to to chooses the candidate (LOOKUP-26).
nearest_class.to "match_value" expression true Absent -- Current-row value of the source's type that the distance is measured to, read as a key match value is, such as a DATE or DATETIME literal (LOOKUP-26).
nearest_class.unit "str" value true Absent {"values": ["day", "week", "month", "year", "second", "minute", "hour"]} Unit the distance is counted in, as diff counts it, a calendar unit for a date source or an elapsed unit for a datetime source (TIME-4).
pivot_class.name "identifier" identifier true Absent -- Donor-record str field, stored or derived, whose value on a candidate names the field the candidate holds (LOOKUP-28).
pivot_class.value "identifier" identifier true Absent -- Donor-record field, stored or derived, whose value each listed field reads from the candidate selected for its name (LOOKUP-28).
pivot_class.fields "list[identifier]" identifier true Absent -- The names the selection exposes as fields, each selected among the candidates whose name it is; a candidate named otherwise fails the read (LOOKUP-28).
match_key_range_fields.key "match_key" expression false Absent -- Schema constraint
match_key_range_fields.between "record_between_class" structure false Absent -- Schema constraint
match_range_fields.between "record_between_class" structure false Absent -- Schema constraint
match_filter_fields.filter "predicate" expression false Absent -- Schema constraint
match_selection_fields.order_by "list[order_by_term]" name false Absent -- Schema constraint
match_selection_fields.keep "keep_policy" value false Absent -- Schema constraint
column_entry ["column_class", "column_copy_class"] structure false Absent -- A declared column, or an entry copying same-named columns from a linked input (SUB-20).
column_class.name "identifier" identifier true Absent -- Column name this specification declares.
column_class.type "column_type" value true Absent -- Declared data type this column must carry in the completed dataset.
column_class.label "str" value false Absent -- Descriptive text carried with the column for a reader of the dataset.
column_class.derivation "derivation" expression false Absent -- How the column's value is produced (SPEC-4).
column_class.verifications "list[column_verification]" structure false Absent -- Assertions over this column's completed values, written as a list even when there is one (CHECK-1).
column_class.submission "submission_column_class" structure false Absent -- Governed column metadata a submission document is generated from.
column_class.metadata "dict[str, str]" value false Absent -- Free-form annotations carried with the column; submission metadata reserves the key names it governs.
column_copy_class.copy "copy_class" structure true Absent -- Columns this specification copies under their own names from an input linked to its producing specification (SUB-20).
copy_class.dataset "identifier" identifier true Absent -- Declared input dataset, linked to its producing specification through schema, whose columns are copied (INPUT-10).
copy_class.columns "list[identifier]" identifier true Absent -- Producer columns copied, each taking the producer's type, label and submission content metadata (SUB-20).
copy_class.submission "copy_submission_class" structure false Absent -- Core designation, mandatory flag and role of the copied columns in this specification's standard (SUB-10).
copy_submission_class.core "core_designation" value false Absent -- Standard core designation, declared and derived by model (SUB-10).
copy_submission_class.mandatory "bool" value false Absent -- Whether every completed value must be present, resolved from keys, declaration and class (SUB-10) and enforced (SUB-11).
copy_submission_class.role "column_role" value false Absent -- Role the column plays in its dataset (SUB-9).
row_class.id "row_id" identifier true Absent -- Identifier of this row template, unique within rows (ROW-1).
row_class.dataset "identifier" identifier false Absent -- Input dataset or eligible named intermediate whose records build this row template's output rows, required when more than one input dataset is declared (ROW-1).
row_class.group_by "list[variable]" name false Absent -- Grouping keys over driver records, producing one candidate row per group (ROW-4).
row_class.filter "predicate" expression false Absent -- Predicate gating each driver record's candidate row for an ungrouped row template, or completed candidate groups for a grouped row template (ROW-3, ROW-4).
row_class.derivations "dict[identifier, derivation]" expression false Absent -- Columns this row template derives, whose coverage across row templates follows SPEC-5.
variable "str" name false Absent {"pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*$"} Qualified source variable or unqualified constructed output column (NAME-3).
match_key ["match_key_columns", "dict[identifier, match_value]"] expression false Absent -- LOOKUP-5
intermediate_key ["match_key", "none_key"] expression false Absent -- A named intermediate's match key, or none to match every record (LOOKUP-5).
none_key "str" value false Absent {"values": ["none"]} A lookup with no match pair, so every record of its dataset matches every current row (LOOKUP-5).
match_key_columns "list[identifier]" identifier false Absent -- Lookup columns, each paired with the same-named current-row value, written as a list even when there is one (LOOKUP-5).
match_value "expression" expression false Absent -- LOOKUP-6
dataset_source ["project_path", "dataset_class"] structure false Absent -- Path to the dataset, or a path with its producing specification, field types, join key or generated ordinal (INPUT-5).
dataset_class.path "project_path" path true Absent -- Source data path, relative to its relative_to base or absolute at its local location, with no missing-file fallback; its extension selects the source profile (INPUT-1).
dataset_class.relative_to "path_base" value false "declaring" -- Base for the input dataset's path and schema (FILE-2).
dataset_class.types "dict[identifier, column_type]" value false Absent -- Type each named field carries; every other field of a typeless source is str (INPUT-5).
dataset_class.encoding "str" value false Absent {"values": ["utf-8", "windows-1252", "iso-8859-1", "ascii"]} Declared text encoding of a SAS or Transport input, absent on every other input (SAS-2).
dataset_class.byte_order_mark "bool" value false Absent -- When true, the csv source begins with one UTF-8 byte-order mark, which is skipped; absent on an input that another profile reads (CSV-10).
dataset_class.schema "project_path" path false Absent -- Producing specification whose output contract supplies the source fields and types (INPUT-10).
dataset_class.empty_string "str" value false "missing" {"values": ["missing", "present"]} INPUT-9
dataset_class.ordinal "identifier" identifier false Absent -- Name of the generated source record ordinal (INPUT-3).
dataset_class.key "list[identifier]" identifier false Absent -- Columns an implicit join, or a qualified aggregate without its own key, matches this input on, each paired with the current row's same-named value (LOOKUP-1).
dataset_class.require_match "bool" value false Absent -- When true, every read through an implicit join to this input must find a record, unless the read declares absent (LOOKUP-24).
intermediate_id "str" identifier false Absent {"pattern": "^[A-Za-z_][A-Za-z0-9_]*$"} Identifier of a lookup, unique among dataset identifiers, other lookups and the output domain (LOOKUP-3).
row_id "str" identifier false Absent {"min_length": 1} Identifier of a row template, unique within rows (SPEC-2).
regex "str" value false Absent {"min_length": 1} Regular expression applied to a string value under text operations.
predicate "str" expression false Absent {"min_length": 1} Schema constraint

schema_terminology.yaml

Field or value type Type Kind Required Default Constraints Contract
codelist_source ["project_path", "codelist_source_class"] structure false Absent -- Inline codelist source, or the path of a codelist file holding one (CT-1).
codelist_source_class.standard "terminology_standard_class" structure false Absent -- Published terminology the source's codelists are drawn from; a source without one is sponsor-defined (CT-2).
codelist_source_class.codelists "list[codelist_class]" structure true Absent -- Codelists this source declares (CT-1).
terminology_standard_class.name "standard_name" value true Absent -- Name of the published terminology (CT-2).
terminology_standard_class.publishing_set "str" value true Absent {"values": ["ADaM", "CDASH", "DEFINE-XML", "SDTM", "SEND"]} Publishing set of the published terminology (CT-2).
terminology_standard_class.version "str" value true Absent {"min_length": 1} Version of the published terminology (CT-2).
codelist_class.id "identifier" identifier true Absent -- Name column bindings refer to this codelist by (CT-1).
codelist_class.name "str" value true Absent {"min_length": 1} Name of the codelist, unique among the project's composed codelists (CT-1).
codelist_class.data_type "str" value false "text" {"values": ["text", "integer", "float"]} Type of the coded values.
codelist_class.extensible "bool" value false false -- Whether the published list admits sponsor items marked extended (CT-6).
codelist_class.alias "str" value false Absent {"min_length": 1} Published concept identifier of the codelist itself.
codelist_class.format_name "str" value false Absent {"min_length": 1} Transport format name carried for a reader (CT-12).
codelist_class.items "list[codelist_item_class]" structure false Absent -- Coded values this codelist admits, the whole value set of a bound column, in the order the document presents them (CT-7).
codelist_class.external "external_codelist_class" structure false Absent -- Dictionary this codelist defers to instead of listing values.
codelist_item_class.value "literal_value" value true Absent -- The coded value itself.
codelist_item_class.decode "str" value false Absent {"min_length": 1} Text the coded value stands for.
codelist_item_class.rank "int" value false Absent -- Ordering significance of this value relative to the others.
codelist_item_class.alias "str" value false Absent {"min_length": 1} Published concept identifier of this value.
codelist_item_class.extended "bool" value false false -- Whether the sponsor added this value to an extensible published list (CT-6).
external_codelist_class.dictionary "str" value true Absent {"min_length": 1} Name of the external dictionary.
external_codelist_class.version "str" value true Absent {"min_length": 1} Version of that dictionary.
external_codelist_class.href "str" value false Absent {"min_length": 1} Location the dictionary is published at.
standard_name "str" value false Absent {"values": ["ADaMIG", "ADaMIG-MD", "BIMO", "CDISC/NCI", "SDTMIG", "SDTMIG-AP", "SDTMIG-MD", "SENDIG", "SENDIG-AR", "SENDIG-DART", "SENDIG-GENETOX"]} Standard name, in the exact case Define-XML 2.1 publishes.

schema_verification.yaml

Field or value type Type Kind Required Default Constraints Contract
column_verification ["column_verification_keyword", "column_verification_entry"] structure false Absent -- Schema constraint
column_verification_keyword "str" value false Absent {"values": ["not_missing"]} A column verification written as its bare keyword, which declares no field (CHECK-5).
column_verifications.not_missing.id "verification_id" identifier false Absent -- Schema constraint
column_verifications.not_missing.when "predicate" expression false Absent -- CHECK-5
column_verifications.not_missing.max_fraction "float" value false Absent -- CHECK-5
column_verifications.not_missing.severity "verification_severity" value false "error" -- Schema constraint
column_verifications.allowed_values.id "verification_id" identifier false Absent -- Schema constraint
column_verifications.allowed_values.values "list[literal_value]" value true Absent -- Schema constraint
column_verifications.allowed_values.severity "verification_severity" value false "error" -- Schema constraint
column_verifications.range.id "verification_id" identifier false Absent -- Schema constraint
column_verifications.range.min "float" value false Absent -- Schema constraint
column_verifications.range.max "float" value false Absent -- Schema constraint
column_verifications.range.severity "verification_severity" value false "error" -- Schema constraint
column_verifications.max_length.id "verification_id" identifier false Absent -- Schema constraint
column_verifications.max_length.max "int" value true Absent -- Schema constraint
column_verifications.max_length.severity "verification_severity" value false "error" -- Schema constraint
column_verifications.matches.id "verification_id" identifier false Absent -- Schema constraint
column_verifications.matches.pattern "regex" value true Absent -- Schema constraint
column_verifications.matches.severity "verification_severity" value false "error" -- Schema constraint
dataset_verifications.unique ["list[variable]", "dataset_unique_arguments"] -- false Absent -- Schema constraint
dataset_verifications.all_or_none.id "verification_id" identifier false Absent -- Schema constraint
dataset_verifications.all_or_none.columns "list[variable]" name true Absent -- Schema constraint
dataset_verifications.all_or_none.severity "verification_severity" value false "error" -- Schema constraint
dataset_verifications.assert.id "verification_id" identifier false Absent -- Schema constraint
dataset_verifications.assert.when "predicate" expression false Absent -- CHECK-12
dataset_verifications.assert.require "predicate" expression true Absent -- Schema constraint
dataset_verifications.assert.severity "verification_severity" value false "error" -- Schema constraint
dataset_verifications.row_count.id "verification_id" identifier false Absent -- Schema constraint
dataset_verifications.row_count.group_by "list[variable]" name false Absent -- Schema constraint
dataset_verifications.row_count.filter "predicate" expression false Absent -- Schema constraint
dataset_verifications.row_count.when "predicate" expression false Absent -- A predicate over one constructed output row that binds a group when at least one of its rows evaluates it to TRUE, leaving a group with no such row exempt (CHECK-14).
dataset_verifications.row_count.min "int" value false Absent -- Schema constraint
dataset_verifications.row_count.max "int" value false Absent -- Schema constraint
dataset_verifications.row_count.min_fraction "float" value false Absent -- Schema constraint
dataset_verifications.row_count.max_fraction "float" value false Absent -- Schema constraint
dataset_verifications.row_count.severity "verification_severity" value false "error" -- Schema constraint
intermediate_verifications.unique ["list[variable]", "intermediate_unique_arguments"] -- false Absent -- Schema constraint
dataset_unique_arguments.id "verification_id" identifier false Absent -- Schema constraint
dataset_unique_arguments.columns "list[variable]" name true Absent -- Schema constraint
dataset_unique_arguments.severity "verification_severity" value false "error" -- Schema constraint
intermediate_unique_arguments.id "verification_id" identifier false Absent -- Schema constraint
intermediate_unique_arguments.columns "list[variable]" name true Absent -- Schema constraint
intermediate_unique_arguments.severity "verification_severity" value false "error" -- LOOKUP-17
verification_id "str" identifier false Absent {"min_length": 1} Schema constraint
verification_severity "str" value false Absent {"values": ["error", "warning"]} Schema constraint