diff --git a/ydb/sqlalchemy/__init__.py b/ydb/sqlalchemy/__init__.py index 7815a28d..5f07ba03 100644 --- a/ydb/sqlalchemy/__init__.py +++ b/ydb/sqlalchemy/__init__.py @@ -37,8 +37,8 @@ def __init__(self, dialect): ) def _requires_quotes(self, *args, **kwargs): - # Force all identifiers to get quoted. - return True + # Force all identifiers to get quoted unless already quoted. + return not (value.startswith(self.initial_quote) and value.endswith(self.final_quote)) class YqlTypeCompiler(GenericTypeCompiler): def visit_VARCHAR(self, type_, **kw):