clickhouse-sqlalchemy
clickhouse-sqlalchemy copied to clipboard
HTTP driver don't support the boolean type
Describe the bug If a column has a boolean type, then in Python it becomes a string.
To Reproduce
engine = create_engine('clickhouse+http://...')
t = Table(
'table',
Column('is_something', Boolean),
)
with engine.connect() as conn:
query = select(t.c.is_something).select_from(t)
result = list(conn.execute(query))
print(result[0][0])
Expected behavior
Bool type is converted to bool
Versions
- clickhouse-sqlalchemy v0.3.2
- Python 3.12
The proposed fix is here https://github.com/xzkostyan/clickhouse-sqlalchemy/pull/395