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

Feature: Add ClickHouse REST handler #4568

Closed
BohuTANG opened this issue Mar 25, 2022 · 0 comments · Fixed by #4613
Closed

Feature: Add ClickHouse REST handler #4568

BohuTANG opened this issue Mar 25, 2022 · 0 comments · Fixed by #4613
Assignees
Labels
A-api Area: databend REST/Admin and JDBC driver C-feature Category: feature
Milestone

Comments

@BohuTANG
Copy link
Member

Summary

Endpoint:

/v1/clickhouse

Query

Uri:

/v1/clickhouse/?query=<sql>

Example:

echo 'SELECT 1' | curl 'http://localhost:8123/?query=' --data-binary @-
1

Insert

Uri:

/v1/clickhouse/?query=<insert into {db}.{table} format {foramt}> 

format:
1. Values
2. JSONEachRow

Example(values format):

echo '(7),(8),(9)' | curl 'http://localhost:8000/v1/clickhouse/?query=INSERT%20INTO%20t%20FORMAT%20Values' --data-binary @-

Example(JSONEachRow format):

echo '{"foo":"bar"}' | curl 'http://localhost:8000/v1/clickhouse/?query=INSERT%20INTO%20test%20FORMAT%20JSONEachRow' --data-binary @-
@BohuTANG BohuTANG added the C-feature Category: feature label Mar 25, 2022
@BohuTANG BohuTANG added the A-api Area: databend REST/Admin and JDBC driver label Mar 29, 2022
@Xuanwo Xuanwo added this to the v0.8 milestone May 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-api Area: databend REST/Admin and JDBC driver C-feature Category: feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants