{"record":{"id":"2f7c3f7f23379e6b","repo":"dbt-labs/dbt-core","slug":"athena-2f7c3f","errorCode":null,"errorMessage":"Athena","messagePattern":"Athena","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/dbt-adapter/src/relation/factory.rs","lineNumber":28,"sourceCode":"\n/// Create a static relation value from an adapter type\n/// To be used as api.Relation in the Jinja environment\npub fn create_static_relation(\n    adapter_type: AdapterType,\n    quoting: ResolvedQuoting,\n) -> Option<Value> {\n    use AdapterType::*;\n    let result = match adapter_type {\n        Snowflake | Databricks | Spark | Fabric | DuckDB | LakeCompute | Exasol | Postgres\n        | Redshift | Salesforce | Bigquery | ClickHouse => {\n            let relation_type = RelationStatic {\n                adapter_type,\n                quoting,\n            };\n            StaticBaseRelationObject::new(Arc::new(relation_type))\n        }\n        Starburst => todo!(\"Starburst\"),\n        Athena => todo!(\"Athena\"),\n        Trino => todo!(\"Trino\"),\n        Dremio => todo!(\"Dremio\"),\n        Oracle => todo!(\"Oracle\"),\n        Datafusion => todo!(\"Datafusion\"),\n    };\n    Some(Value::from_object(result))\n}\n","sourceCodeStart":10,"sourceCodeEnd":36,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-adapter/src/relation/factory.rs#L10-L36","documentation":"This is a Rust `todo!()` panic from `create_static_relation` in crates/dbt-adapter/src/relation/factory.rs:28. The `Athena` arm of the adapter-type match was left unimplemented, so any call that resolves to `AdapterType::Athena` panics with the message 'Athena'. The library throws it as an explicit marker that Athena static relation creation has not been written yet.","triggerScenarios":"Calling `create_static_relation` (directly, via `get_value`/`adapter_api_value`, or via the static-relation quote-policy tests) with `adapter_type == AdapterType::Athena`.","commonSituations":"Running dbt against an Athena profile where jinja code invokes `api.Relation.create` / the static relation factory; a developer running a test matrix over all adapter types; automation enumerating AdapterType variants hits the placeholder arm.","solutions":["Implement the `Athena` match arm in `create_static_relation`, building the Athena-specific `RelationStatic` and `StaticBaseRelationObject`","Guard call sites to return an error or fallback instead of calling the factory for `AdapterType::Athena` until support lands","Exercise the factory only with implemented adapters (Snowflake, BigQuery, Redshift, Databricks-class arms that already construct a relation)"],"exampleFix":"// before\nAthena => todo!(\"Athena\"),\n// after\nAthena => {\n    let relation_type = RelationStatic { adapter_type, quoting };\n    StaticBaseRelationObject::new(Arc::new(relation_type))\n}","handlingStrategy":"validation","validationCode":"if matches!(adapter_type, AdapterType::Athena) {\n    return Err(\"create_static_relation is not implemented for Athena\".into());\n}","typeGuard":"fn static_relation_supported(t: AdapterType) -> bool {\n    !matches!(t, AdapterType::Athena | AdapterType::Starburst | AdapterType::Trino | AdapterType::Dremio | AdapterType::Oracle | AdapterType::Datafusion)\n}","tryCatchPattern":"match std::panic::catch_unwind(|| create_static_relation(adapter_type)) {\n    Ok(v) => v,\n    Err(_) => return Err(\"create_static_relation unimplemented for Athena\"),\n}","preventionTips":["Validate the adapter type before invoking the relation factory from jinja or tests","Implement or stub the Athena arm with a typed error instead of todo!() when adding new adapters","Cover each AdapterType variant in unit tests to surface placeholders early"],"tags":["rust","panic","unimplemented","adapter","athena"],"backgroundTag":"method-not-implemented","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"}