Skip to content

feat: Add option to automatically create per-event-type BigQuery views - #1379

Draft
vasilyl wants to merge 5 commits into
google:mainfrom
vasilyl:auto-created-views
Draft

feat: Add option to automatically create per-event-type BigQuery views#1379
vasilyl wants to merge 5 commits into
google:mainfrom
vasilyl:auto-created-views

Conversation

@vasilyl

@vasilyl vasilyl commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Please ensure you have read the contribution guide before creating a pull request.

Link to Issue or Description of Change

1. Link to an existing issue (if applicable):

  • Closes: N/A

2. Or, if no issue exists, describe the change:

Problem:
The BigQuery event log table consolidates diverse event types into a single schema where content payloads are serialized as raw JSON. Querying this raw table directly for specific event types is tedious and requires writing repetitive JSON extraction SQL queries.

Solution:
Add a configuration setting CreateViews (default true). When enabled, the plugin automatically and asynchronously creates simplified, typed BigQuery Views for each standard event type (e.g., v_user_message, v_model_request, v_tool_call). These views automatically extract JSON structures into clean, typed top-level columns (e.g., extracting prompts or tokens counts) for easy analytical querying.

Testing Plan

Added unit tests validating view creation queries are formulated correctly and executed asynchronously without blocking the main thread initialization.

Checklist

  • I have read the CONTRIBUTING.md document.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • I have manually tested my changes end-to-end.

@vasilyl
vasilyl force-pushed the auto-created-views branch from f2c3938 to 35c5082 Compare August 25, 2026 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant