run_a_query
Query Formula 1 data tables with custom columns, joins, and filters to retrieve specific race, lap, or result information.
Instructions
Execute custom queries with joins and filters on F1 data tables.
Args: main_table: Name of the main table to query (e.g 'fct_lap_times', 'fct_results' etc) columns: Dictonary mapping table name to list of columns. Format: {'table_name': ['col1','col2']}. Main table must be included joins: List of joins. Format:[{"table": "dim_table", "join_column": "id", "on_column": "fk_id"}] filters: List of filters. Format: [{"column": "col_name", "operator": "=", "value": "value"}]. (Make sure value is proper format int/string/float) (Use list[number, number] for between operator) filter_logic: Combine filters with "AND" or "OR" limit: Max rows to return (default: 20, max)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| join | No | ||
| limit | No | ||
| columns | Yes | ||
| filters | No | ||
| main_table | Yes | ||
| filter_logic | No | AND |