Module exposing: isValidTableName, getClickhouseEntityType
// Source: https://github.com/langfuse/langfuse | License: MIT | Copyright 2023-2026 ClickHouse, Inc
// Provided via justclaw.it.com; keep this notice with the code.
import { LangfuseNotFoundError } from "../../errors";
import { eventTypes } from "../ingestion/types";
import { ClickhouseTableName, ClickhouseTableNames } from "./schema";
export const isValidTableName = (
tableName: string,
): tableName is ClickhouseTableName =>
Object.keys(ClickhouseTableNames).includes(tableName);
export type IngestionEntityTypes =
| "trace"
| "observation"
| "score"
| "sdk_log"
| "dataset_run_item";
export const getClickhouseEntityType = (
eventType: string,
): IngestionEntityTypes => {
switch (eventType) {
case eventTypes.TRACE_CREATE:
return "trace";
case eventTypes.OB
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key