MCPcopy Create free account
hub / github.com/Chainlit/cookbook / execute_query

Function execute_query

bigquery/app.py:64–75  ·  view source on GitHub ↗
(query)

Source from the content-addressed store, hash-verified

62
63@cl.step(type="tool")
64async 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")

Callers 1

chainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected