SQL Editor

SQL Editor

The SQL Editor provides a powerful interface to query your logs using standard SQL syntax. It features intelligent autocompletion, scheduled queries, and AI-powered query suggestions.

Key Features

SQL Editor Interface

  • Autocomplete: Intelligent suggestions based on your log fields
  • Query Input: Large editor area with syntax highlighting
  • Run Controls: Execute queries immediately or at set intervals
  • Results Table: Paginated view of query results with sortable columns

Query Execution Options

  • Run Query: Execute your query immediately
  • Interval Options:
    • Off (Run once)
    • 15s (Run every 15 seconds)
    • 30s (Run every 30 seconds)

AI Query Suggestions

The right panel provides AI-generated SQL queries based on common log analysis patterns and your data structure.

Table Schema

Common fields available in your logs:

  • raw_log: Complete Raw Log entry
  • offset: Log entry position
  • date_ts: Timestamp
  • source_id: Source identifier
  • team_id: Team identifier
  • source_type: Type of log source
  • source_name: Name of log source
  • level: Log level
  • message: Log message
  • etl_ts: ETL timestamp
  • etl_date: ETL date

Navigation

Access the SQL Editor by clicking the database icon (fourth icon) in the left navigation bar.

Tips

  • Use the autocomplete feature to explore available fields and functions
  • Save frequently used queries as Views for quick access
  • Use the AI suggestions for common query patterns
  • Click “Load more” at the bottom of results to view additional pages