MCPcopy
hub / github.com/questdb/questdb / execute_sql

Function execute_sql

compat/src/test/python/runner_parquet.py:96–103  ·  view source on GitHub ↗

Execute SQL query via QuestDB HTTP API.

(host: str, port: int, sql: str)

Source from the content-addressed store, hash-verified

94
95
96def execute_sql(host: str, port: int, sql: str) -> dict:
97 """Execute SQL query via QuestDB HTTP API."""
98 url = f"http://{host}:{port}/exec"
99 params = {"query": sql}
100 response = requests.get(url, params=params, timeout=120)
101 if not response.ok:
102 raise RuntimeError(f"SQL failed: {response.text}")
103 return response.json()
104
105
106def export_parquet(host: str, port: int, query: str, output_path: str) -> None:

Callers 11

runMethod · 0.85
setupMethod · 0.85
teardownMethod · 0.85
setupMethod · 0.85
teardownMethod · 0.85
setupMethod · 0.85
runMethod · 0.85
teardownMethod · 0.85
setupMethod · 0.85
runMethod · 0.85
teardownMethod · 0.85

Calls 1

getMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…