MCPcopy Create free account
hub / github.com/AgentOps-AI/agentops / clickhouse_create

Function clickhouse_create

app/api/agentops/exporter/processor.py:391–406  ·  view source on GitHub ↗

Create a record in ClickHouse

(data: list[dict])

Source from the content-addressed store, hash-verified

389
390
391async def clickhouse_create(data: list[dict]) -> None:
392 """Create a record in ClickHouse"""
393 client = await get_async_clickhouse()
394
395 for i, row in enumerate(data):
396 for key, value in row.items():
397 data[i][key] = clickhouse_escape_value(value)
398
399 if not DRY_RUN:
400 await client.insert(
401 table=IMPORT_TABLE_NAME,
402 data=[list(row.values()) for row in data],
403 column_names=list(data[0].keys()),
404 )
405 else:
406 print(data)
407
408
409async def clickhouse_create_trace(trace: Trace) -> None:

Callers 3

clickhouse_create_traceFunction · 0.85
clickhouse_create_spanFunction · 0.85
clickhouse_update_spanFunction · 0.85

Calls 3

get_async_clickhouseFunction · 0.90
clickhouse_escape_valueFunction · 0.85
insertMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…