-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
insert human eval scores to clickhouse (#163)
* insert human eval scores to clickhouse * don't setup env vars
- Loading branch information
1 parent
070afeb
commit 6e4cc4e
Showing
6 changed files
with
72 additions
and
2 deletions.
There are no files selected for viewing
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 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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { createClient } from "@clickhouse/client"; | ||
import { config } from "dotenv"; | ||
|
||
config({ path: ".env" }); // or .env.local | ||
|
||
// https://clickhouse.com/docs/en/cloud/bestpractices/asynchronous-inserts -> Create client which will wait for async inserts | ||
// For now, we're not waiting for inserts to finish, but later need to add queue and batch on client-side | ||
export const clickhouseClient = createClient({ | ||
url: process.env.CLICKHOUSE_URL, | ||
username: process.env.CLICKHOUSE_USER, | ||
password: process.env.CLICKHOUSE_PASSWORD ?? "", | ||
database: "default", | ||
clickhouse_settings: { | ||
async_insert: 1, | ||
wait_for_async_insert: 0, | ||
}, | ||
}); |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.