{"record":{"id":"764ffe3c741ee1d9","repo":"dbt-labs/dbt-core","slug":"version-does-not-meet-the-required-format","errorCode":null,"errorMessage":"Version '{:?}' does not meet the required format","messagePattern":"Version '(.+?)' does not meet the required format","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/dbt-parser/src/resolve/resolve_properties.rs","lineNumber":801,"sourceCode":"        }\n    }\n}\n\n// Collect and build a properites config for all versions of a model\npub fn collect_model_version_info(\n    model: &MinimalSchemaValue,\n) -> Vec<(String, Option<VersionInfo>)> {\n    if let Some(versions) = &model.versions {\n        let mut version_entries = versions\n            .iter()\n            .map(|v| {\n                let version = match &v.v {\n                    dbt_yaml::Value::String(s, _) => Some(s.to_string()),\n                    dbt_yaml::Value::Number(n, _) => Some(n.to_string()),\n                    _ => None,\n                }\n                .unwrap_or_else(|| {\n                    panic!(\"Version '{:?}' does not meet the required format\", v.v);\n                });\n\n                let versioned_name = format!(\"{}_v{}\", model.name, version);\n\n                let defined_in = v\n                    .defined_in\n                    .as_deref()\n                    .map(|s| s.strip_suffix(\".sql\").unwrap_or(s).to_string());\n\n                let version_config = v.config.clone();\n\n                (\n                    version,\n                    defined_in.unwrap_or(versioned_name),\n                    version_config,\n                )\n            })\n            .collect::<Vec<_>>();","sourceCodeStart":783,"sourceCodeEnd":819,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-parser/src/resolve/resolve_properties.rs#L783-L819","documentation":"When collecting version info for models defined in a properties YAML file, dbt accepts a `version` field only as a YAML string or number. Any other YAML type (boolean, sequence, mapping, null, date) makes this code panic with the raw value, because no valid version string can be derived from it.","triggerScenarios":"Declaring `version:` in a model's properties YAML with a non-string/non-number value, e.g. `version: true`, `version: null`, `version: [1]`, `version: {latest: 1}`, or a YAML value parsed as a boolean/date (like `version: yes` or an unquoted value that YAML coerces).","commonSituations":"Writing `version: latest` intending the literal word without quotes (parses as string, fine) versus `version: yes` (parses as boolean true); leaving the version key empty; copy-pasting a nested version config from dbt Cloud docs into an unsupported property file shape.","solutions":["Quote the version as a string: `version: '1'` or use a plain number: `version: 1`.","Remove or fix `version: null` / empty version entries in the properties file.","Check for YAML type coercion: `yes/no/on/off/true/false` become booleans — quote them or use numbers.","Validate the properties YAML against dbt's expected schema before running parse."],"exampleFix":"# before (models/properties.yml)\nmodels:\n  - name: my_model\n    version: true\n\n# after\nmodels:\n  - name: my_model\n    version: 1","handlingStrategy":"validation","validationCode":"import yaml\nprops = yaml.safe_load(open('models/properties.yml'))\nfor m in props.get('models', []):\n    v = m.get('version')\n    assert v is None or isinstance(v, (str, int, float)), f'model {m[\"name\"]}: bad version {v!r} (must be string or number)'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Quote version strings and avoid bare yes/no/true/false values that YAML coerces to booleans.","Use a number (version: 2) or quoted string (version: '2.0') only.","Run `dbt parse` or a YAML linter on properties files in CI before full builds.","Never leave the version key empty; remove it or give a valid value."],"tags":["yaml","parser","model-version","config"],"backgroundTag":"invalid-argument-format","analyzedSha":"0267ce9170576975b76b64ce856b2e5848e96617","analyzedAt":"2026-09-07T21:53:39.732Z","contentChangedAt":"2026-09-07T21:53:39.732Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}