{"record":{"id":"ed4decf0cb07a5c0","repo":"dbt-labs/dbt-core","slug":"catalog-relation-supports-create-or-replace-is-o","errorCode":null,"errorMessage":"catalog_relation.supports_create_or_replace() is only available under catalogs v2","messagePattern":"catalog_relation\\.supports_create_or_replace\\(\\) is only available under catalogs v2","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/dbt-adapter/src/catalog_relation.rs","lineNumber":1717,"sourceCode":"            _ => Value::from(()),\n        })\n    }\n\n    fn call_method(\n        self: &Arc<Self>,\n        _state: &minijinja::State<'_, '_>,\n        name: &str,\n        _args: &[Value],\n        _listeners: &[std::rc::Rc<dyn minijinja::listener::RenderingEventListener>],\n    ) -> Result<Value, minijinja::Error> {\n        match name {\n            \"supports_create_or_replace\" => {\n                if load_catalogs::fetch_use_catalogs_v2() {\n                    Ok(self.gate_by_adapter(vec![AdapterType::Databricks], || {\n                        Value::from(self.supports_create_or_replace())\n                    }))\n                } else {\n                    Err(minijinja::Error::new(\n                        minijinja::ErrorKind::InvalidOperation,\n                        \"catalog_relation.supports_create_or_replace() is only available under catalogs v2\",\n                    ))\n                }\n            }\n            _ => Err(minijinja::Error::new(\n                minijinja::ErrorKind::UnknownMethod,\n                format!(\"Unknown method on CatalogRelation: '{name}'\"),\n            )),\n        }\n    }\n\n    fn render(self: &Arc<Self>, f: &mut Formatter<'_>) -> std::fmt::Result {\n        write!(\n            f,\n            \"CatalogRelation(catalog={}, integration={}, type={}, format={})\",\n            self.catalog_name.as_deref().unwrap_or(\"<none>\"),\n            self.integration_name.as_deref().unwrap_or(\"<none>\"),","sourceCodeStart":1699,"sourceCodeEnd":1735,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-adapter/src/catalog_relation.rs#L1699-L1735","documentation":"This error is returned by the minijinja `call_method` dispatch on the catalog relation object when a template invokes the `supports_create_or_replace` macro/method while the catalogs v2 feature flag is disabled (`fetch_use_catalogs_v2()` returns false). It is a generic capability guard: the method only exists under catalogs v2, so any call that reaches this branch means the environment lacks the v2 catalogs runtime, and the unsupported invocation is surfaced as a minijinja error rather than a real answer.","triggerScenarios":"Thrown at crates/dbt-adapter/src/catalog_relation.rs:1717 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Enable the catalogs v2 feature flag so `fetch_use_catalogs_v2()` returns true and the method becomes available","Remove or guard the `supports_create_or_replace()` call in the Jinja macro/template so it is only invoked when catalogs v2 is active","Pass the capability down explicitly (e.g., via a variable set in the project/profile) instead of calling the gated method from the template"],"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-14T11:17:12.474Z"}