Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Respect database specifier in connection string #18

Open
joe-bowman opened this issue Oct 28, 2019 · 4 comments
Open

Respect database specifier in connection string #18

joe-bowman opened this issue Oct 28, 2019 · 4 comments

Comments

@joe-bowman
Copy link

So I have two databases, we shall call them default and newdb containing identical tables, and if I connect to clickhouse directly using http://username:password@localhost:8123/default or http://username:password@localhost:8123/newdb I am able to submit queries to the correct database.

However, with clickhouse-bulk, the exact same connection strings as above, inserts to both databases are aggregated into the same DB.

I can (and am now) running a copy of clickhouse-bulk per database, but this seems sub-optimal. Absolute minimum case, clickhouse-bulk should reject queries sent to /newdb if it is only going to insert into a single DB.

@nikepan
Copy link
Owner

nikepan commented Oct 28, 2019

Thank you! It intresting. I will try to make this.

@joe-bowman
Copy link
Author

I've tried to work around this in a number of ways.

  1. Specifying the server to clickhouse-bulk pushes to, has zero effect (it always inserts into default) - so running multiple instances doesn't work
  2. Including the database name in the table name (e.g. INSERT INTO newdb.accounts VALUES (...) means the http requests are accepted by clikchouse-bulk (no errors, in logs or response) but nothing is ever flushed to the upstream server

@joe-bowman
Copy link
Author

I'll have a look this evening to see if I can get anything working.

@romap0
Copy link

romap0 commented May 15, 2020

Hello, @nikepan, @joe-bowman. Did you found any solution on this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants