clickhouse-sqlalchemy
clickhouse-sqlalchemy copied to clipboard
Does support json field ORM?
Describe the bug I want to add one json filed with table, store data like this {"a":1."b":2}, but with clickhouse-sqlalchemy ORM, raise error (in table 'tb_file', column 'count'): Compiler <clickhouse_sqlalchemy.drivers.compilers.typecompiler.ClickHouseTypeCompiler object at 0x7f9af09572b0> can't render element of type JSON
To Reproduce
from sqlalchemy import JSON
class TbFile(ChBase, CommonFields):
__tablename__ = 'tb_file'
__table_args__ = {'comment': 'File Info Table V1.0'}
created = Column(types.DateTime, server_default=F.now())
filename = Column(types.String, primary_key=True)
count = Column(JSON, nullable=False, default=[])
Expected behavior support json field ORM
Versions python==3.8.5 clickhouse-sqlalchemy==0.2.0
Json field is not supported. Feel free to make a PR.