KeyError: 'Nullable(String)'
See original GitHub issueI get the following error with one column, even thoI do have other empty columns which do notcause any errors (such as aircraftCategory is a string and is NaN)
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
<ipython-input-19-d531a02e1a3b> in <module>()
2
3 connection = {'host': 'http://localhost:8123'}
----> 4 df = ph.read_clickhouse('SELECT hex, flight, recorded_date, recorded_datetime,recorded_longitude, recorded_latitude, recorded_squawk, recorded_altitude, recorded_verticalRate,recorded_track,recorded_speed,aircraftCategory FROM flightLog_MT LIMIT 1000000', connection=connection)
~/.pyenv/versions/3.6.2/envs/general_362/lib/python3.6/site-packages/pandahouse/core.py in read_clickhouse(query, tables, index, connection, **kwargs)
56 lines = execute(query, external=external, stream=True,
57 connection=connection)
---> 58 return to_dataframe(lines, **kwargs)
59
60
~/.pyenv/versions/3.6.2/envs/general_362/lib/python3.6/site-packages/pandahouse/convert.py in to_dataframe(lines, **kwargs)
60 dtypes, parse_dates, converters = {}, [], {}
61 for name, chtype in zip(names, types):
---> 62 dtype = CH2PD[chtype]
63 if dtype == 'object':
64 converters[name] = decode_escapes
KeyError: 'Nullable(String)'
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:14 (5 by maintainers)
Top Results From Across the Web
how to file.write() an empty string if dictionary produces a ...
The problem is, sometimes a field is not in json, and it produces a KeyError While I can trap this with a try:...
Read more >ClickHouse tips #10: Null behavior with LowCardinality columns
If you have LowCardinality(String) column, inserting a NULL value will work fine. It will just treat it like you just have inserted an...
Read more >Functions for Working with Nullable Values | ClickHouse Docs
Functions for Working with Nullable Values. isNull. Checks whether the argument is NULL. isNull(x). Alias: ISNULL . Arguments.
Read more >What is KeyError in Python? Dictionary and Handling Them
This article will provide you with a detailed and comprehensive knowledge of how to resolve KeyError in Python in Dictionary.
Read more >clickhouse-driver Documentation - Read the Docs
NOTE: formatting queries using Python's f-strings or ... Currently clickhouse-driver can't handle empty enum value due to Python's Enum ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@inkrement I’d suggest to use clickhouse-driver or https://github.com/ibis-project/ibis @haakonvt Sadly I don’t have time to implement it, however Ibis has support for it. I highly recommend to try ibis until We have a native Apache Arrow database interface for clickhouse.
I had rather similar problem
It solved, when I deleted all comments from query, comments like “-- Убрать это” don’t work correctly in pandahouse