(query)
| 62 | |
| 63 | @cl.step(type="tool") |
| 64 | async def execute_query(query): |
| 65 | # Execute the SQL query |
| 66 | query_job = client.query(query) |
| 67 | |
| 68 | # Wait for the query to complete |
| 69 | query_job.result() |
| 70 | |
| 71 | # Get the query results |
| 72 | results = query_job.to_dataframe() |
| 73 | markdown_table = results.to_markdown(index=False) |
| 74 | |
| 75 | return markdown_table |
| 76 | |
| 77 | |
| 78 | @cl.step(type="tool") |