Skip to content
This repository was archived by the owner on Dec 29, 2025. It is now read-only.
This repository was archived by the owner on Dec 29, 2025. It is now read-only.

Could not map type <'json')> #87

@iosifnicolae2

Description

@iosifnicolae2
  • Clickhouse table:
CREATE TABLE default.unit_records
(
    `unit_id` String,
    `timestamp` DateTime,
    `data` Object('json')
)
ENGINE = MergeTree
PRIMARY KEY (unit_id, timestamp)
ORDER BY (unit_id, timestamp)
SETTINGS index_granularity = 8192
  • trying to run:
IMPORT FOREIGN SCHEMA "default" FROM SERVER clickhouse_svr INTO clickhouse;
  • we're getting:
ERROR:  clickhouse_fdw: could not map type <'json')>
SQL state: XX000

@ildus how can i implement proper mapping for json type?

Many thanks!

EDIT
I will try to add the mapping here, hope it solves the problem :)
https://github.com/adjust/clickhouse_fdw/blob/fd1f3ec585b73ed61afcd3334db535e79969fb83/src/pglink.c#L735

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions