add clickhouse pushing
parent
f2711a1386
commit
ef2185af3b
@ -0,0 +1,26 @@
|
||||
import { createClient } from "@clickhouse/client";
|
||||
import dotenv from "dotenv";
|
||||
import { Env } from "@humanwhocodes/env";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
const env = new Env();
|
||||
const CLICKHOUSE_USERNAME = env.require("CLICKHOUSE_USERNAME");
|
||||
const CLICKHOUSE_PASSWORD = env.require("CLICKHOUSE_PASSWORD");
|
||||
|
||||
export const client = createClient({
|
||||
username: CLICKHOUSE_USERNAME,
|
||||
password: CLICKHOUSE_PASSWORD,
|
||||
clickhouse_settings: {
|
||||
async_insert: 1,
|
||||
output_format_json_quote_32bit_integers: 0,
|
||||
output_format_json_quote_64bit_integers: 0,
|
||||
output_format_json_quote_64bit_floats: 0,
|
||||
output_format_json_quote_32bit_floats: 0,
|
||||
},
|
||||
});
|
||||
|
||||
client.insert({
|
||||
table: "option_quotes",
|
||||
values: [],
|
||||
});
|
Loading…
Reference in New Issue