{"record":{"id":"7346fc3f9fca7c99","repo":"infiniflow/ragflow","slug":"at-least-one-content-column-must-be-specified","errorCode":null,"errorMessage":"At least one content column must be specified.","messagePattern":"At least one content column must be specified\\.","errorType":"validation","errorClass":"ConnectorValidationError","httpStatus":null,"severity":"error","filePath":"common/data_source/bigquery_connector.py","lineNumber":595,"sourceCode":"        from api.db.services.connector_service import ConnectorService\n\n        updated_conf = copy.deepcopy(self._sync_config)\n        updated_conf[\"sync_cursor_value\"] = self.serialize_cursor_value(self._pending_sync_cursor_value)\n        updated_conf[\"sync_cursor_id\"] = self._pending_sync_cursor_id\n        ConnectorService.update_by_id(self._sync_connector_id, {\"config\": updated_conf})\n        self._sync_config = updated_conf\n\n    # ------------------------------------------------------------------ #\n    # Validation\n    # ------------------------------------------------------------------ #\n    def validate_connector_settings(self) -> None:\n        \"\"\"Validate settings via SELECT 1 plus a dry-run of the configured base query.\"\"\"\n        if not self._credentials:\n            raise ConnectorMissingCredentialError(\"BigQuery credentials not loaded.\")\n        if not self.project_id:\n            raise ConnectorValidationError(\"BigQuery project_id is required.\")\n        if not self.content_columns:\n            raise ConnectorValidationError(\"At least one content column must be specified.\")\n        if not self.query and not (self.dataset_id and self.table_id):\n            raise ConnectorValidationError(\"BigQuery requires either a custom query or both dataset_id and table_id.\")\n\n        try:\n            client = self._get_client()\n\n            # Cheap connectivity check.\n            client.query(\n                \"SELECT 1\",\n                job_config=self._build_query_job_config(),\n                location=self.location or None,\n            ).result()\n\n            # Free cost/validity check of the actual base query.\n            dry_run_job = client.query(\n                self._wrap_query(self._build_base_query()),\n                job_config=self._build_query_job_config(dry_run=True),\n                location=self.location or None,","sourceCodeStart":577,"sourceCodeEnd":613,"githubUrl":"https://github.com/infiniflow/ragflow/blob/554fb1133ac3861732235ad9c377eb5e0a770665/common/data_source/bigquery_connector.py#L577-L613","documentation":"validate_connector_settings requires at least one content column; content_columns defines which fields become indexed document content, so an empty list means the connector would ingest nothing meaningful.","triggerScenarios":"content_columns empty or missing from config during validation.","commonSituations":"User configures only metadata/id/timestamp columns; form serialization drops empty arrays; key typo like contentColumns.","solutions":["Set content_columns to one or more columns present in the base query, e.g. ['body']","Verify the key is exactly content_columns and the list is non-empty"],"exampleFix":"// before\nconfig = {\"content_columns\": [], ...}\n\n// after\nconfig = {\"content_columns\": [\"title\", \"body\"], ...}","handlingStrategy":"validation","validationCode":"if not config.get(\"content_columns\"):\n    raise ValueError(\"content_columns must list at least one column to ingest\")","typeGuard":null,"tryCatchPattern":"try:\n    conn.validate_connector_settings()\nexcept ConnectorValidationError as e:\n    if \"content column\" in str(e):\n        config[\"content_columns\"] = infer_content_columns(schema); revalidate()\n    else:\n        raise","preventionTips":["Make content_columns a required field in connector-creation UIs","Reject empty arrays at form-submit time"],"tags":["bigquery","configuration","validation"],"backgroundTag":null,"analyzedSha":"554fb1133ac3861732235ad9c377eb5e0a770665","analyzedAt":"2026-08-15T09:20:16.380Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}