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

Basic ClickHouse HTTP query wrapper #8

Merged
merged 5 commits into from
Sep 9, 2024
Merged

Conversation

lmangani
Copy link
Owner

@lmangani lmangani commented Jul 20, 2024

WIP to emulate the following macro in the extension. Currently missing optional/default parameters support.

CREATE OR REPLACE MACRO clickhouse(query, server := 'https://play.clickhouse.com', user := 'play', format := 'JSONEachRow') AS TABLE
    SELECT * FROM read_json_auto(concat(server, '/?default_format=', format, '&user=', user, '&query=', query));


SELECT * FROM clickhouse("SELECT number as once, number *2 as twice FROM numbers(10)")

Checklist

@lmangani lmangani marked this pull request as ready for review September 9, 2024 18:50
@lmangani lmangani merged commit 2e68607 into main Sep 9, 2024
22 checks passed
@lmangani lmangani deleted the clickhouse-query-macro branch September 9, 2024 20:37
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

Successfully merging this pull request may close these issues.

1 participant