Tables and fields
events
AI event records (user message + agent response), with signals, properties, tool calls, errors, token usage, and user context. Recent reprojections can temporarily expose multiple physical versions until background merges settle.project_id(string): Owning project id — selectable and filterable inside the server-injected read scopeevent_id(string): Internal Raindrop database event id — accepted by get_event and used for joins and exact countstimestamp(datetime): Event time (UTC)event_name(string): Instrumented event name (e.g. chat_message)user_id(string): End-user idconvo_id(string): Conversation idcustom_event_id(string): Caller-supplied public event id — shown as id by get_event when presentai_input(string): User input textai_output(string): AI response textai_model(string): Model that produced the responsesignals(array(string)): Signal ids attached to this event — use has(signals, ’…’) or arrayJoin(signals)properties(map(string)): Custom event properties — access with properties.my_keyuser_traits(map(string)): User traits at event time — access with user_traits.planfeature_flags(map(string)): Feature flags at event time — access with feature_flags.my_flaguser_plan(string): User plan at event timeuser_created_at(datetime): When the user was first seenis_internal(boolean): Marked as internal trafficis_excluded_user(boolean): User is on the exclusion listinput_words(number): Word count of ai_inputoutput_words(number): Word count of ai_outputtool_calls(array(json)): Tool calls made during the event (JSON)tool_names(array(string)): Names of tools called during the eventtool_call_count(number): Number of tool calls in the eventerror_spans(array(json)): Error spans recorded on the event (JSON)error_names(array(string)): Span names that errored during the eventerror_count(number): Number of error spans on the eventhas_errors(boolean): Event has at least one error spantoken_usage(array(json)): Per-span token usage (JSON)input_tokens(number): Total input tokens across the event’s LLM callsoutput_tokens(number): Total output tokens across the event’s LLM callstotal_tokens(number): Total tokens (input + output) across the event’s LLM calls
traces
OTel span records — LLM calls, tool executions, and agent steps, joinable to events by event_id. Recent reprojections can temporarily expose multiple physical versions until background merges settle.project_id(string): Owning project id — selectable and filterable inside the server-injected read scopeevent_id(string): Owning event idtrace_id(string): OTel trace idspan_id(string): OTel span idparent_span_id(string): Parent span idspan_type(string): Span type: LLM_GENERATION, LLM_GENERATION_STREAM, TOOL_CALL, or INTERNAL — filter LLM calls with span_type LIKE ‘LLM%’span_name(string): Span namestatus(string): Span status (OK / ERROR)timestamp(datetime): Span start time (UTC)end_timestamp(datetime): Span end time (UTC)duration_ms(number): Span duration in millisecondsinput_payload(string): Span input payloadoutput_payload(string): Span output payloadinput_tokens(number): Input tokens (LLM spans)output_tokens(number): Output tokens (LLM spans)provider(string): LLM provider (e.g. openai.chat)model(string): LLM model iduser_id(string): End-user id (from the owning event when the span doesn’t carry one)convo_id(string): Conversation id (from the owning event when the span doesn’t carry one)attributes(map(string)): String span attributes — access with attributes.my_attrattributes_num(map(number)): Numeric span attributes — access with attributes_num.my_attr
users
One row per project and end-user from the maintained user-activity rollup — activity, plan, traits, and signals.project_id(string): Owning project iduser_id(string): End-user idevent_count(number): Approximate distinct events from this userfirst_seen(datetime): First event timelast_seen(datetime): Most recent event timeactive_days(number): Distinct days with activityplan(string): Latest known plantraits(map(string)): Latest user traits — access with traits.my_traitsignals(array(string)): All signal ids seen across the user’s events
conversations
One row per project and conversation from the maintained conversation rollup — anchor event, user, activity window, message count, and signals.project_id(string): Owning project idconvo_id(string): Conversation idevent_id(string): Most recent event id, used as the conversation’s clickable anchoruser_id(string): User id on the most recent eventstart_ts(datetime): First event timeend_ts(datetime): Most recent event timemessage_count(number): Rollup event rows; use uniqExact(event_id) on events for an exact distinct countduration_seconds(number): Seconds between the first and most recent eventsignals(array(string)): All materialized signal ids seen in the conversation
Functions
count()(aggregate): Number of rowscountIf(cond)(aggregate): Rows matching a conditioncountDistinct(x)(aggregate): Exact distinct count (alias of uniqExact)uniq(x)(aggregate): Approximate distinct countuniqExact(x)(aggregate): Exact distinct countuniqExactIf(x, cond)(aggregate): Exact distinct count for rows matching a conditionsum(x)(aggregate): SumsumIf(x, cond)(aggregate): Conditional sumavg(x)(aggregate): AverageavgIf(x, cond)(aggregate): Conditional averagemin(x)(aggregate): MinimumminIf(x, cond)(aggregate): Conditional minimummax(x)(aggregate): MaximummaxIf(x, cond)(aggregate): Conditional maximummedian(x)(aggregate): Approximate medianquantile(0.95)(x)(aggregate): Approximate quantilequantiles(0.5, 0.9, 0.99)(x)(aggregate): Multiple quantilesany(x)(aggregate): Any value in the groupargMin(x, order)(aggregate): x at the minimum of orderargMax(x, order)(aggregate): x at the maximum of ordergroupArray(x)(aggregate): Collect values into an arraygroupUniqArray(x)(aggregate): Collect distinct values into an arraytopK(10)(x)(aggregate): Approximate top-K most frequent valuestoStartOfMinute(t)(date): Truncate to minutetoStartOfHour(t)(date): Truncate to hourtoStartOfDay(t)(date): Truncate to daytoStartOfWeek(t)(date): Truncate to weektoStartOfMonth(t)(date): Truncate to monthtoDate(t)(date): Cast to datetoDateTime('2026-01-31 00:00:00', 'UTC')(date): Cast a value to a whole-second UTC datetime; direct datetime-column string comparisons are converted automaticallytoDateTime64('2026-01-31 00:00:00.123', 3, 'UTC')(date): Cast a value to a UTC datetime with fractional-second precisiontoHour(t)(date): Hour of day (0-23)toDayOfWeek(t)(date): Day of week (1=Mon)now()(date): Current timestamptoday()(date): Current dateyesterday()(date): Yesterday’s datedateDiff('hour', a, b)(date): Difference between two datetimesdateAdd('day', 1, t)(date): Add an interval — or just use t + INTERVAL 1 DAYdateSub('day', 1, t)(date): Subtract an interval — or just use t - INTERVAL 1 DAYformatDateTime(t, '%Y-%m-%d')(date): Format a datetimetoUnixTimestamp(t)(date): Datetime to unix secondsfromUnixTimestamp(n)(date): Unix seconds to datetimeage('hour', a, b)(date): Full units between datetimeslower(s)(string): Lowercaseupper(s)(string): Uppercaselength(x)(string): String or array lengthsubstring(s, from, len)(string): Substring (1-based)substr(s, from, len)(string): Alias of substring (1-based)concat(a, b, ...)(string): Concatenate stringstrim(s)(string): Strip whitespacesplitByChar(',', s)(string): Split into an arrayreplaceAll(s, from, to)(string): Replace all occurrencesreplaceRegexpAll(s, re, to)(string): Regex replaceextract(s, re)(string): First regex capturematch(s, re)(string): Regex testposition(haystack, needle)(string): 1-based substring position (0 = absent)positionCaseInsensitive(haystack, needle)(string): Case-insensitive positionstartsWith(s, prefix)(string): Prefix testendsWith(s, suffix)(string): Suffix testempty(x)(string): True when emptynotEmpty(x)(string): True when not emptyhas(arr, x)(array): Array contains valuehasAny(arr, [a, b])(array): Array contains any of the valueshasAll(arr, [a, b])(array): Array contains all of the valuesarrayJoin(arr)(array): Explode an array into rowsarrayCount(x -> cond, arr)(array): Count matching elementsarrayFilter(x -> cond, arr)(array): Filter elementsarrayMap(x -> expr, arr)(array): Transform elementsarrayExists(x -> cond, arr)(array): Any element matchesarrayDistinct(arr)(array): Distinct elementsarraySort(arr)(array): Sort elementsarraySlice(arr, from, len)(array): Slice an arrayarrayElement(arr, n)(array): Element at index (1-based)arrayStringConcat(arr, sep)(array): Join array to stringindexOf(arr, x)(array): 1-based index of value (0 = absent)JSONExtractString(json, 'key')(json): Extract a string fieldJSONExtractInt(json, 'key')(json): Extract an integer fieldJSONExtractFloat(json, 'key')(json): Extract a float fieldJSONExtractBool(json, 'key')(json): Extract a boolean fieldJSONExtractRaw(json, 'key')(json): Extract raw JSONJSONExtractArrayRaw(json)(json): JSON array to array of raw JSONJSONExtractKeys(json)(json): Keys of a JSON objectJSONHas(json, 'key')(json): JSON field existstoJSONString(x)(json): Serialize a value to JSONmapKeys(m)(map): Keys of a mapmapValues(m)(map): Values of a mapmapContains(m, 'key')(map): Map has keyif(cond, then, else)(conditional): ConditionalmultiIf(c1, r1, c2, r2, else)(conditional): Multi-branch conditionalcoalesce(a, b, ...)(conditional): First non-null valueifNull(x, alt)(conditional): Fallback when nullnullIf(a, b)(conditional): Null when equalassumeNotNull(x)(conditional): Treat as non-nullisNull(x)(conditional): Is nullisNotNull(x)(conditional): Is not nullround(x, n)(math): Roundfloor(x)(math): Floorceil(x)(math): Ceilingabs(x)(math): Absolute valuegreatest(a, b, ...)(math): Largest argumentleast(a, b, ...)(math): Smallest argumentexp(x)(math): e^xlog(x)(math): Natural loglog2(x)(math): Base-2 logsqrt(x)(math): Square rootpow(x, y)(math): x^yintDiv(a, b)(math): Integer divisiontoString(x)(type): Cast to stringtoInt64(x)(type): Cast to integertoFloat64(x)(type): Cast to floattuple(a, b)(misc): Tuple constructorbar(x, min, max, width)(misc): Unicode bar chart of a valueformatReadableQuantity(n)(misc): 1234567 -> 1.23 millionformatReadableTimeDelta(sec)(misc): Seconds -> human duration