{"record":{"id":"c09fe0935825f275","repo":"risingwavelabs/risingwave","slug":"cannot-find-column-name","errorCode":null,"errorMessage":"Cannot find column_name","messagePattern":"Cannot find column_name","errorType":"exception","errorClass":"SinkError::BigQuery","httpStatus":null,"severity":"error","filePath":"src/connector/src/sink/big_query.rs","lineNumber":614,"sourceCode":"\n        let rs = client\n            .job()\n            .query(\n                &self.config.common.project,\n                QueryRequest::new(format!(\n                    \"SELECT column_name, data_type FROM `{}.{}.INFORMATION_SCHEMA.COLUMNS` WHERE table_name = '{}'\",\n                    project_id, dataset_id, table_id,\n                )),\n            ).await.map_err(|e| SinkError::BigQuery(e.into()))?;\n        let mut rs = ResultSet::new_from_query_response(rs);\n\n        let mut big_query_schema = HashMap::default();\n        while rs.next_row() {\n            big_query_schema.insert(\n                rs.get_string_by_name(\"column_name\")\n                    .map_err(|e| SinkError::BigQuery(e.into()))?\n                    .ok_or_else(|| {\n                        SinkError::BigQuery(anyhow::anyhow!(\"Cannot find column_name\"))\n                    })?,\n                rs.get_string_by_name(\"data_type\")\n                    .map_err(|e| SinkError::BigQuery(e.into()))?\n                    .ok_or_else(|| {\n                        SinkError::BigQuery(anyhow::anyhow!(\"Cannot find column_name\"))\n                    })?,\n            );\n        }\n\n        self.check_column_name_and_type(big_query_schema)?;\n        Ok(())\n    }\n}\n\npub struct BigQuerySinkWriter {\n    pub config: BigQueryConfig,\n    #[expect(dead_code)]\n    schema: Schema,","sourceCodeStart":596,"sourceCodeEnd":632,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/sink/big_query.rs#L596-L632","documentation":"During BigQuery sink validation, RisingWave queries INFORMATION_SCHEMA.COLUMNS and reads each row via the gcp-bigquery-client ResultSet. This error is thrown when the 'column_name' column exists in the query result but its value for this row is NULL, so the map of the remote table schema cannot be built. It indicates an unexpected/NULL schema response from BigQuery for the target table.","triggerScenarios":"Calling validate() on a BigQuery sink where the INFORMATION_SCHEMA.COLUMNS query returns a row whose column_name value is NULL - e.g. a corrupted or partially-created table entry, or a query result whose rows contain null column_name values.","commonSituations":"Target table exists but was created/altered externally in an inconsistent state; querying a shadow/system table with NULL column names; stale or mocked responses.","solutions":["Confirm the target table is healthy: run `SELECT column_name, data_type FROM <project>.<dataset>.INFORMATION_SCHEMA.COLUMNS WHERE table_name='<table>'` in BigQuery console and check for NULLs.","If the table is corrupt or unexpected, drop and recreate it (or set auto_create=true so RisingWave recreates it).","Verify the service account has metadata read permission on the dataset so the correct COLUMNS view is returned.","Pin/upgrade the gcp-bigquery-client crate and retry validation."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"-- Run against BigQuery before creating the sink:\nSELECT column_name, data_type\nFROM `<project>.<dataset>.INFORMATION_SCHEMA.COLUMNS`\nWHERE table_name = '<table>';  -- ensure no NULL column_name rows","typeGuard":null,"tryCatchPattern":"match sink_creation {\n    Err(SinkError::BigQuery(e)) if e.to_string().contains(\"Cannot find column_name\") => {\n        // inspect/repair remote table metadata, then retry\n    }\n    other => other?,\n}","preventionTips":["Verify the remote table exists and has a sane schema before creating the sink.","Prefer auto_create=true so RisingWave builds the table itself.","Grant the service account metadata read permissions on the dataset.","Recreate externally-managed tables if their INFORMATION_SCHEMA rows look abnormal."],"tags":["bigquery","schema-validation","null-value","rust"],"backgroundTag":"null-argument","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}