{"record":{"id":"1d30cc90303e69ee","repo":"windmill-labs/windmill","slug":"failed-to-parse-dbt-descriptor-e","errorCode":null,"errorMessage":"Failed to parse dbt descriptor: {e}","messagePattern":"Failed to parse dbt descriptor: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"backend/parsers/windmill-parser-yaml/src/dbt.rs","lineNumber":269,"sourceCode":"/// spreads over the run's arguments to read them — a placeholder of the same\n/// name would be shadowed there, and the script could never be run (`select` is\n/// an array, and interpolating one into a string is not something any invocation\n/// can satisfy).\npub const RESERVED_ARG_NAMES: &[&str] = &[\n    \"command\",\n    \"select\",\n    \"exclude\",\n    \"vars\",\n    \"full_refresh\",\n    \"dbt_command\",\n    \"dbt_retry_job\",\n    \"model\",\n    \"limit\",\n];\n\npub fn parse_dbt_descriptor(inner_content: &str) -> anyhow::Result<DbtDescriptor> {\n    let d = serde_yml::from_str::<DbtDescriptor>(inner_content)\n        .map_err(|e| anyhow::anyhow!(\"Failed to parse dbt descriptor: {e}\"))?;\n    if let Some(name) = placeholders(&d)\n        .into_iter()\n        .find(|n| RESERVED_ARG_NAMES.contains(&n.as_str()))\n    {\n        return Err(anyhow::anyhow!(\n            \"`{{{{ {name} }}}}` collides with the run argument `{name}` this runtime already \\\n             defines ({}); rename the placeholder\",\n            RESERVED_ARG_NAMES.join(\", \")\n        ));\n    }\n    Ok(d)\n}\n\n/// The workspace warehouse a descriptor gets when it names none — spelled like\n/// the default lake (`ducklake://main.orders`), so one workspace concept reads\n/// the same across kinds.\npub const DBT_DEFAULT_WAREHOUSE: &str = \"main\";\n","sourceCodeStart":251,"sourceCodeEnd":287,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/backend/parsers/windmill-parser-yaml/src/dbt.rs#L251-L287","documentation":"parse_dbt_descriptor deserializes a dbt descriptor YAML string into DbtDescriptor via serde_yml. Malformed YAML or fields that do not fit the descriptor schema raise this error wrapping serde's diagnostic; a second validation layer afterwards also rejects placeholders that collide with reserved run argument names.","triggerScenarios":"parse_dbt_sig / dbt_arg_schema called with inner_content that is not valid YAML (bad indentation, tabs, duplicate keys) or whose structure does not match DbtDescriptor's schema (wrong types, unexpected field shapes).","commonSituations":"Hand-edited dbt descriptor files in scripts, copy-pasted YAML with tabs instead of spaces, an editor converting indentation, or referencing a schema version whose fields changed.","solutions":["Fix the YAML syntax per the serde error in the message (check indentation/tabs around the reported line)","Validate the YAML with a linter (yamllint) before saving","Confirm field names and types match the DbtDescriptor schema (only known descriptor fields are allowed)","Remove any `{{{{ reserved_name }}}}` placeholders if the follow-up validation fires"],"exampleFix":"# before (tab indentation)\ndescriptor:\n\tname: my_model\n# after\ndescriptor:\n  name: my_model","handlingStrategy":"validation","validationCode":"// validate descriptor YAML before deploy (JS example)\nconst yaml = require('js-yaml');\ntry { yaml.load(descriptorYaml); } catch (e) { throw new Error('Invalid dbt descriptor YAML: ' + e.message); }","typeGuard":"function isValidDescriptorYaml(s) { try { return typeof yaml.load(s) === 'object'; } catch { return false; } }","tryCatchPattern":"try {\n  parseDbtDescriptor(yamlStr);\n} catch (e) {\n  if (String(e).includes('Failed to parse dbt descriptor')) {\n    // surface serde's message (it names the YAML line/problem)\n  } else throw e;\n}","preventionTips":["Use spaces, never tabs, in descriptor YAML","Lint YAML (yamllint) before saving","Keep descriptor fields to the documented DbtDescriptor schema","Avoid `{{{{ reserved }}}}` placeholders colliding with run argument names"],"tags":["yaml","dbt","serde","descriptor","validation"],"backgroundTag":"yaml-parse-failed","analyzedSha":"e474e8803ce2ff5c2df09a58dab51d45f5c922ca","analyzedAt":"2026-09-03T12:38:19.024Z","contentChangedAt":"2026-09-03T12:38:19.024Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}