ClickHouse / ClickHouse/dbt-clickhouse

adding the ability to authorize via a custom API path

Open
#451 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
362
Forks
177
Avg merge
2d 10h
Merged PRs (30d)
8

Description

In Clickhouse you can authorize via HTTP, in the current state there is no way to specify a custom API. My configuration:
````
dns_transfer:
target: dns_transfer
outputs:
dns_transfer:
type: clickhouse
driver: http
schema: logging
host: clickweb.example.com/clickhouse1/ # my test from custom api
port: 80
user: user-clickhouse
password: 'password'
secure: False
````

configurationg nginx proxy to clickhouse:

````
server {
listen 80;
server_name clickweb.example.com;

location ~ ^/clickhouse1 {
rewrite ^/clickhouse1/(.*) /$1 break;
proxy_pass http://192.168.0.25:8123;
proxy_redirect http://192.168.0.25:8123/ /;
proxy_set_header Host $host;
proxy_connect_timeout 10s;
proxy_read_timeout 300s;
}
}

````
when using such a configuration, of course there will be an error connecting to a custom path:

Database Error
HTTPDriver for http://clickweb.example.com/clickhouse1/:80 returned response code 404

Please add the ability to specify another path url to connect to clickhouse use http port.

Contributor guide

Open the contributing guide

Research direction

No file or test is named in the issue. Start by tracing the ClickHouse HTTP driver’s connection configuration and how the host is turned into a request URL; verify the existing adapter tests before checking the nginx custom-path example. Done means a configured API path is accepted and requests reach the ClickHouse endpoint behind that path.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
databases
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.