From f09eadfcb30d94191783f7bb7ef9c9a19937146a Mon Sep 17 00:00:00 2001 From: Lorenzo Mangani Date: Sat, 15 Apr 2023 19:58:57 +0200 Subject: [PATCH] Update clickhouse_query.flux Signed-off-by: Lorenzo Mangani --- scripts/clickhouse_query.flux | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) 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()")