cloudflare / cloudflare/sqlalchemy-clickhouse
Readonly Flag Does Not Work
- Dominant language
- Python
- Stars
- 325
- Forks
- 101
- PR merge metrics
- No merged PRs in 30d
Description
Readonly flag that's implemented in the connector does not get properly handed down through the `create_engine` flag. This may be a use problem on my end and just need an example of this being used correctly, but based on this
* https://github.com/cloudflare/sqlalchemy-clickhouse/pull/5 - PR Added readonly support.
* https://github.com/cloudflare/sqlalchemy-clickhouse/issues/1 - Issue AttributeError: 'Connection' object has no attribute 'readonly'
this has been a problem area before that could use some more clarity.
Bug:
```python
import sqlalchemy as sa
engine = sa.create_engine("clickhouse://USERNAME:PASSWORD@HOSTNAME/DATABASE", readonly=True)
```
Stack Trace:
```
Traceback (most recent call last):
File "", line 1, in
File "python2.7/site-packages/sqlalchemy/engine/__init__.py", line 419, in create_engine
return strategy.create(*args, **kwargs)
File "python2.7/site-packages/sqlalchemy/engine/strategies.py", line 161, in create
engineclass.__name__))
TypeError: Invalid argument(s) 'readonly' sent to create_engine(), using configuration ClickHouseDialect/QueuePool/Engine. Please check that the keyword arguments are appropriate for this combination of components.
```
Version Information:
```
$ pip freeze
SQLAlchemy==1.2.2
sqlalchemy-clickhouse==0.1.3.post0
```
Contributor guide
Assessment
This issue has not been assessed yet.