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
Describe the bug
I get this error when trying to insert data into a a table with a dynamic type. Actually a map with Dynamic values.
Insertions without dynamic types work fine.
Schema of the table:
#
ColumnName
DataType
1
EventReceivedTime
DateTime64(3)
2
Name
LowCardinality(String)
3
Type
LowCardinality(String)
4
data
Map(LowCardinality(String), Dynamic)
Error I get:
Traceback (most recent call last):
File "C:\Users\bened\AppData\Local\Programs\Python\Python311\Lib\site-packages\clickhouse_driver\columns\service.py", line 139, in get_column_by_spec
cls = column_by_type[spec]
~~~~~~~~~~~~~~^^^^^^
KeyError: 'Dynamic'
To Reproduce
record = (
EventReceivedTime,
Name,
Type
,
json.dumps({
'clientID': clientID,
'message' : message
})
)
records.append(record)
query = f'INSERT INTO {table_name} (EventReceivedTime,Name,Type,data) VALUES'
client.execute(query, records)
Expected behavior
I would expect the code to work unless Dynamc types aren't explicitly supported.
Versions
Version of clickhouse-driver: 0.2.9
ClickHouse server version: 24.6.2.17
Python version. 3.11.4
The text was updated successfully, but these errors were encountered:
Describe the bug
I get this error when trying to insert data into a a table with a dynamic type. Actually a
map
withDynamic
values.Insertions without dynamic types work fine.
Schema of the table:
Error I get:
To Reproduce
Expected behavior
I would expect the code to work unless Dynamc types aren't explicitly supported.
Versions
The text was updated successfully, but these errors were encountered: