{"record":{"id":"b97a4c003f160dcf","repo":"dbt-labs/dbt-core","slug":"get-bq-table","errorCode":null,"errorMessage":"get_bq_table","messagePattern":"get_bq_table","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/dbt-adapter/src/adapter/adapter_impl.rs","lineNumber":3234,"sourceCode":"        data_type: &str,\n    ) -> Result<Value, minijinja::Error> {\n        match self.adapter_type() {\n            Bigquery => Ok(Value::from(render_struct_projection(col_name, data_type))),\n            Postgres | Snowflake | Databricks | Redshift | Salesforce | Spark | DuckDB\n            | LakeCompute | Fabric | ClickHouse | Exasol | Starburst | Athena | Trino\n            | Datafusion | Dremio | Oracle => {\n                unimplemented!(\"only available with BigQuery adapter\")\n            }\n        }\n    }\n\n    /// BigQueryAdapter https://github.com/dbt-labs/dbt-adapters/blob/0efd8d3d1081e1ab43e38797d5104f7b424a6284/dbt-bigquery/src/dbt/adapters/bigquery/impl.py#L1187\n    pub fn get_bq_table(\n        &self,\n        _state: &State,\n        _relation: &Arc<dyn BaseRelation>,\n    ) -> Result<Value, minijinja::Error> {\n        unimplemented!(\"get_bq_table\")\n    }\n\n    /// BigQueryAdapter https://github.com/dbt-labs/dbt-adapters/blob/0efd8d3d1081e1ab43e38797d5104f7b424a6284/dbt-bigquery/src/dbt/adapters/bigquery/impl.py#L1219\n    #[allow(clippy::too_many_arguments)]\n    pub fn grant_access_to(\n        &self,\n        state: &State,\n        conn: &'_ mut dyn Connection,\n        entity: &Arc<dyn BaseRelation>,\n        entity_type: &str,\n        // _role is not used since this method only supports view\n        // and googleapi doesn't require role if the entity is view, it'll be default to READ always\n        _role: Option<&str>,\n        database: &str,\n        schema: &str,\n        token: CancellationToken,\n    ) -> AdapterResult<Value> {\n        match self.adapter_type() {","sourceCodeStart":3216,"sourceCodeEnd":3252,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-adapter/src/adapter/adapter_impl.rs#L3216-L3252","documentation":"get_bq_table is a stub that panics unconditionally. It corresponds to the BigQuery adapter's get_table hook (upstream impl.py L1187) which fetches a Google BigQuery Table resource for a relation; the Rust port has not implemented it for any adapter.","triggerScenarios":"Invoking AdapterImpl::get_bq_table(state, relation) from Jinja/macros that need BigQuery table metadata (partitioning, clustering, expiration, labels).","commonSituations":"Macros or materializations relying on the BigQuery get_table API; porting BigQuery-specific dbt packages to the Rust engine.","solutions":["Avoid macros that call get_bq_table until the hook is implemented.","Fetch table metadata through information_schema queries instead where possible.","Implement get_bq_table using the BigQuery client's tables.get in adapter_impl.rs (~line 3234)."],"exampleFix":"// before\npub fn get_bq_table(&self, _state: &State, _relation: &Arc<dyn BaseRelation>) -> Result<Value, minijinja::Error> {\n    unimplemented!(\"get_bq_table\")\n}\n// after\npub fn get_bq_table(&self, _state: &State, _relation: &Arc<dyn BaseRelation>) -> Result<Value, minijinja::Error> {\n    Err(minijinja::Error::new(\n        minijinja::ErrorKind::InvalidOperation,\n        \"get_bq_table is not yet implemented\",\n    ))\n}","handlingStrategy":"try-catch","validationCode":null,"typeGuard":"fn has_bq_table_hook(adapter: &AdapterImpl) -> bool { false /* stub until implemented */ }","tryCatchPattern":"let table = match std::panic::catch_unwind(|| adapter.get_bq_table(&state, &relation)) {\n    Ok(t) => t?,\n    Err(_) => fetch_table_metadata_via_information_schema(&relation)?,\n};","preventionTips":["Do not call get_bq_table from macros in the Rust engine yet","Prefer information_schema queries for BigQuery table metadata","Track the upstream dbt-bigquery hook port before depending on it"],"tags":["rust","adapter","bigquery","table-metadata","unimplemented"],"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"}