{"record":{"id":"9b195c63b4646c6f","repo":"microsoft/semantic-kernel","slug":"identifier-cannot-be-empty","errorCode":null,"errorMessage":"Identifier cannot be empty","messagePattern":"Identifier cannot be empty","errorType":"exception","errorClass":"VectorStoreOperationException","httpStatus":null,"severity":"error","filePath":"python/semantic_kernel/connectors/oracle.py","lineNumber":487,"sourceCode":"                oracledb.DB_TYPE_RAW,\n                arraysize=cursor.arraysize,\n                outconverter=lambda b: uuid.UUID(bytes=b) if b is not None else None,\n            )\n\n        return None\n\n    @override\n    def _serialize_dicts_to_store_models(self, records: Sequence[dict[str, Any]], **kwargs: Any) -> Sequence[Any]:\n        \"\"\"Serialize a list of dicts of the data to the store model. Pass the records through without modification.\"\"\"\n        return records\n\n    def _validate_identifiers(self, name: str) -> None:\n        \"\"\"Validate Oracle identifier to disallow embedded double quotes.\n\n        Since quoted identifiers are not allowed, any double quote is invalid.\n        \"\"\"\n        if not name:\n            raise VectorStoreOperationException(\"Identifier cannot be empty\")\n\n        if '\"' in name:\n            raise VectorStoreOperationException(f\"Invalid identifier with quotes: {name}\")\n\n    def _build_check_table_exists_query(self) -> tuple[str, dict[str, str]]:\n        \"\"\"Build SQL + bind variables for checking table existence.\n\n        - If schema is provided, query ALL_TABLES.\n        - If no schema, query USER_TABLES.\n        \"\"\"\n        if self.db_schema:\n            sql = \"\"\"\n                SELECT 1\n                FROM   all_tables\n                WHERE  owner = :owner\n                AND    table_name = :tbl\n            \"\"\"\n            bind_vars = {","sourceCodeStart":469,"sourceCodeEnd":505,"githubUrl":"https://github.com/microsoft/semantic-kernel/blob/c028a0c7dc4f0814cdcbaba9d998f187a41197bf/python/semantic_kernel/connectors/oracle.py#L469-L505","documentation":"Thrown by OracleCollection._validate_identifiers when an Oracle identifier (collection/table name, schema, or a field's storage_name/name) is empty. The connector validates names up front because Oracle rejects empty identifiers and they would produce malformed quoted SQL.","triggerScenarios":"collection_name='' (or omitted where the table name is required); db_schema='' ; a VectorStoreField whose name and storage_name both resolve to ''.","commonSituations":"Forgetting to set collection_name; definition missing field names; loading names from config that came back empty; programmatically generating names that yielded ''.","solutions":["Provide a non-empty collection_name (the Oracle table name)","Ensure every field has a non-empty name (and storage_name if set)","Provide a non-empty db_schema only if you intend to use one","Sanitize config-derived names before passing them to the collection"],"exampleFix":"# before\nOracleCollection(record_type=MyModel, collection_name='')  # raises 1513\n\n# after\nOracleCollection(record_type=MyModel, collection_name='documents')","handlingStrategy":"validation","validationCode":"def is_valid_identifier(name: str | None) -> bool:\n    return bool(name) and isinstance(name, str)\n\nfor name in [collection_name, db_schema, *(f.storage_name or f.name for f in all_fields)]:\n    if name is not None and not is_valid_identifier(name):\n        raise ValueError(f'Identifier cannot be empty')","typeGuard":"def is_nonempty_identifier(name: object) -> bool:\n    return isinstance(name, str) and len(name.strip()) > 0","tryCatchPattern":"from semantic_kernel.exceptions import VectorStoreOperationException\n\ntry:\n    collection = OracleCollection(record_type=MyModel, collection_name=name)\nexcept VectorStoreOperationException as e:\n    if 'Identifier cannot be empty' in str(e):\n        # supply a non-empty collection_name / field names\n        ...","preventionTips":["Always set a non-empty collection_name (table name)","Ensure every field has a non-empty name/storage_name","Validate config-derived names before passing them to the collection"],"tags":["oracle","validation","schema"],"backgroundTag":null,"analyzedSha":"c028a0c7dc4f0814cdcbaba9d998f187a41197bf","analyzedAt":"2026-08-13T13:48:05.040Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}