Last active
August 20, 2023 18:03
-
-
Save tarasglek/40f3ffbeded5375a5618796ad237625f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This function executes clickhouse queries | |
* @param value Valid Clickhouse SQL query | |
*/ | |
export function runClickhouseQuery(value: string) { | |
console.log(value) | |
return fetch("https://play.clickhouse.com/?user=play", { | |
method: "POST", | |
body: `${value} FORMAT Markdown`, | |
}).then(x => x.text()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment