clickhouse-driver icon indicating copy to clipboard operation
clickhouse-driver copied to clipboard

clickhouse_driver.errors.UnknownTypeError: Code: 50. Unknown type Object('json')

Open mike-luabase opened this issue 2 years ago • 5 comments

driver doesn't support new JSON type added in 22.3 (I'm using 22.3.3.44 )

mike-luabase avatar Apr 17 '22 14:04 mike-luabase

Looks like I should be able to add something like this, but unclear which create_ is best to start as a base

elif spec.startswith('Object'):
        print('Object.....', spec)
        return create_tuple_column(spec, column_options)

mike-luabase avatar Apr 17 '22 14:04 mike-luabase

Hi.

You've figured out an "entrypoint" for new columns. Usually new column is the combination of an existing columns. But this is not always true. Some columns are tough nuts to crack.

If you're not scared of C++/reversing you should inspect ClickHouse server sources or use wireshark / tcpdump to see what's going on "the wire".

A brief how to is placed here: https://github.com/mymarilyn/clickhouse-driver/blob/master/clickhouse_driver/columns/base.py#L139

xzkostyan avatar Apr 18 '22 21:04 xzkostyan

+1 for this feature request.

matheosz1 avatar Aug 15 '22 14:08 matheosz1

Now there is official docs https://clickhouse.com/docs/en/native-protocol

konnectr avatar Sep 07 '22 10:09 konnectr

@konnectr do you see JSON listed there yet? I was unable to locate documentation for JSON as of right now.

(not really sure if I would be able to implement it even if it was documented, but I am curious to try)

hauthorn avatar Sep 28 '22 13:09 hauthorn

+1 for this - does anyone have a workaround?

acmeguy avatar Dec 01 '22 06:12 acmeguy

+1 for this

rejochandran avatar Dec 06 '22 10:12 rejochandran

Has anyone used any workarounds for this?

rejochandran avatar Dec 21 '22 11:12 rejochandran

I used clickhouse-connect library instead and it worked fine @rejochandran

MeteHanC avatar Dec 22 '22 16:12 MeteHanC

Version 0.2.6 has json support

xzkostyan avatar May 02 '23 13:05 xzkostyan