I'm having trouble with the clickhouse target :thr...
# troubleshooting
d
I'm having trouble with the clickhouse target đź§µ
âś… 1
Copy code
2024-10-12 13:00:28,981 | INFO     | target-clickhouse    | Target 'target-clickhouse' completed reading 354 lines of input (2 schemas, 349 records, 0 batch manifests, 3 state messages).
2024-10-12 13:00:28,996 | INFO     | target-clickhouse.public-practitioners | Inserting with SQL: INSERT INTO public.practitioners
(id, team_id, user_id, active, position, specialty, created_at, updated_at)
VALUES (:id, :team_id, :user_id, :active, :position, :specialty, :created_at, :updated_at)
2024-10-12 13:00:28,999 | INFO     | target-clickhouse.public-forms | Inserting with SQL: INSERT INTO public.forms
(id, name, published, save_to_datacollections, available_incall, available_precall, available_presession, available_postcall, available_to_guests, platform_id, organisation_id, team_id, creation_level, created_user_id, last_modified_user_id, exportable, public_id, created_at, updated_at, deleted_at, deleted_by, app_id)
You can see there that it's trying to insert into a table
public.forms
.
The data comes from tap-postgresql as a stream named "public-forms".
I'm getting an error
Copy code
clickhouse_sqlalchemy.exceptions.DatabaseException: Orig exception: Code: 81. DB::Exception: Database public does not exist. (UNKNOWN_DATABASE) (version 24.6.2.17 (official build))
So, it looks like it's trying to store stream
public-forms
into table
forms
in db
public
. I don't have a db called public - my db is called
warehouse
and I've put that config in meltano.yml. With I run meltanolabs target-postgres and the ticketswap target-redshift with the same data, they both store this into a table called
public_forms
in a schema name derived from the tap.
Am I doing something wrong here or is there a bug in the tap?
Hmmm... I think this sounds the same as https://github.com/shaped-ai/target-clickhouse/issues/200
e
Maybe setting
default_target_schema
would fix this?
d
Yep. That worked.
Thank you!
I'm new to clickhouse. Just curious about the tech. One interesting thing is that it doesn't have the notion of a "schema" within a database like Postgres, Redshift and others do.
đź‘€ 1
e
So it's just a flatter hierarchy of
database > table
, more similar to mysql?
d
Yep
👍 1
l
I am struggling with this. This is the error
If you have installed ClickHouse and forgot password you can reset it in the configuration file.
even if the password is correct. Is there anything am missing?
Copy code
- name: target-clickhouse
    variant: shaped-ai
    pip_url: git+<https://github.com/shaped-ai/target-clickhouse.git>
    config:
      host: gptai7k7fx.us-east-1.aws.clickhouse.cloud
      port: 8443
      database: default
      username: default
      password: test
      secure: true
      verify: false