{"record":{"id":"509541ff8af21965","repo":"dbt-labs/dbt-core","slug":"invalid-relation-type-s","errorCode":null,"errorMessage":"Invalid relation type: {s}","messagePattern":"Invalid relation type: (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/dbt-schemas/src/dbt_types.rs","lineNumber":119,"sourceCode":"}\n\nimpl From<&str> for RelationType {\n    fn from(s: &str) -> Self {\n        match s {\n            \"table\" => RelationType::Table,\n            \"view\" => RelationType::View,\n            \"cte\" => RelationType::CTE,\n            \"materialized_view\" => RelationType::MaterializedView,\n            \"ephemeral\" => RelationType::Ephemeral,\n            \"external\" => RelationType::External,\n            \"pointer_table\" => RelationType::PointerTable,\n            \"dynamic_table\" => RelationType::DynamicTable,\n            \"streaming_table\" => RelationType::StreamingTable,\n            \"metric_view\" => RelationType::MetricView,\n            \"function\" => RelationType::Function,\n            \"interactive_table\" => RelationType::InteractiveTable,\n            \"dictionary\" => RelationType::Dictionary,\n            _ => panic!(\"Invalid relation type: {s}\"),\n        }\n    }\n}\n\n#[cfg(test)]\nmod tests {\n    use super::*;\n    use std::collections::HashMap;\n\n    #[test]\n    fn dictionary_relation_type_round_trips() {\n        let rt = RelationType::from(\"dictionary\");\n        assert_eq!(rt, RelationType::Dictionary);\n        assert_eq!(rt.to_string(), \"dictionary\");\n    }\n\n    #[test]\n    fn spark_real_types_resolve_to_table_or_view() {","sourceCodeStart":101,"sourceCodeEnd":137,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-schemas/src/dbt_types.rs#L101-L137","documentation":"Catch-all arm of From<&str> for RelationType: the string being converted is not one of the recognized relation-type literals ('table', 'view', 'cte', 'materialized_view', 'ephemeral', 'external', 'pointer_table', 'dynamic_table', 'streaming_table', 'metric_view'), so relation-type data coming from manifest JSON or user YAML cannot be mapped onto the enum.","triggerScenarios":"Thrown at crates/dbt-schemas/src/dbt_types.rs:119 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Correct the relation type string in the source YAML/manifest to one of the supported literals","Add the new literal as a match arm (plus a RelationType variant) if a genuinely new relation kind was introduced","Normalize the input (trim, lowercase) before calling RelationType::from"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0267ce9170576975b76b64ce856b2e5848e96617","analyzedAt":"2026-09-07T21:53:39.732Z","contentChangedAt":"2026-09-07T21:53:39.732Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}