You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With logs attribute, there is some trouble when creating cluster table.
Use batch function batch_create_tables to batch create all tables with ChBase attribute showed as below.
ckuser="ckuser"ckpwd="ckpwd"ckip="ckip"ckport="8123"ckdbname='ckdb1'uri=f"clickhouse://{ckuser}:{ckpwd}@" \
f"{ckip}:{ckport}/{ckdbname}"engine=create_engine(uri, echo=False)
session=sessionmaker(bind=engine)()
#session.execute('SELECT 1')batch_create_tables(engine)
# or create single table TableXXXCluster.__table__.create(engine)
Can create cluster table TableXXXCluster on db ckdb1 and with Cluster cluster,
But if I want to create with Cluster 'test_shard_localhost' or some else,
I need to change the code from logs='cluster' to logs='test_shard_localhost', this is a very bad coding behavior.
Is there something like default='currentDatabase()' config, so can create cluster with extra clustername parameter like
The text was updated successfully, but these errors were encountered:
flyly0755
changed the title
Create a cluster table orm class with engines.Distributed which has a logs attribute, how use variable to indicate it?
Create a cluster table orm class with engines.Distributed which has a logs attribute, how to use variable to indicate it?
Mar 13, 2024
For example, one cluster table orm class as below:
With logs attribute, there is some trouble when creating cluster table.
Use batch function batch_create_tables to batch create all tables with ChBase attribute showed as below.
Can create cluster table TableXXXCluster on db ckdb1 and with Cluster cluster,
But if I want to create with Cluster 'test_shard_localhost' or some else,
I need to change the code from logs='cluster' to logs='test_shard_localhost', this is a very bad coding behavior.
Is there something like default='currentDatabase()' config, so can create cluster with extra clustername parameter like
The text was updated successfully, but these errors were encountered: