Access the database after disconnecting
I can able to execute queries on a ClickHouse database after disconnecting the client without encountering a NetworkError as expected.
To Reproduce
Modules
from clickhouse_driver import Client
from clickhouse_driver.errors import NetworkError
Access the database after disconnecting I can able to execute queries on a ClickHouse database after disconnecting the client without encountering a NetworkError as expected.
To Reproduce
Modules
from clickhouse_driver import Client from clickhouse_driver.errors import NetworkError
Create a ClickHouse client
client = Client( host=host, port=9000, database='ClickHouse_DB' user='default', password='pass', )
try:
Execute the first query
except NetworkError as e: print(f"Error: {e}") print("The client encountered a NetworkError.")
Disconnect the ClickHouse client
client.disconnect()
try:
Attempt to execute a query after disconnecting (this will likely raise a NetworkError)
except NetworkError as e: print(f"Error: {e}") print("The client encountered a NetworkError after disconnecting.")
Expected behavior NetworkError excepted.
Versions