diff --git a/scripts/clickhouse_query.flux b/scripts/clickhouse_query.flux index c8ad7b1..e118b27 100644 --- a/scripts/clickhouse_query.flux +++ b/scripts/clickhouse_query.flux @@ -1,10 +1,5 @@ -import "csv" -import "experimental/http/requests" -import "strings" +import "contrib/qxip/clickhouse" -url = "https://play@play.clickhouse.com" -query = "SELECT 'hello' as _value, 100 as _data FORMAT CSVWithNames" -response = requests.get(url:url, params: ["query": [query]]) +option clickhouse.defaultURL = "https://demo:demo@github.demo.trial.altinity.cloud:8443" -csv.from(csv: string(v: response.body), mode: "raw") -|> keep(columns: ["_value","_data"]) +clickhouse.query(query: "SELECT version()")