graflo.cli.run_tigergraph_queries¶
Run installed TigerGraph queries with JSON parameters.
Reads a JSON spec, runs each parameter set against an installed query via REST++, and writes structured JSON results.
Connection settings are loaded from environment variables via
:class:~graflo.db.TigergraphConfig (default TIGERGRAPH_*; use --prefix for
qualified names such as USER_TIGERGRAPH_URI).
Input formats (root object or array of objects):
Single query, multiple parameter sets::
{
"query": "my_installed_query",
"params": [
{"limit": 10},
{"limit": 20}
]
}
Multiple queries::
{
"runs": [
{"query": "q1", "params": [{}]},
{"query": "q2", "params": [{"id": "x"}]}
]
}
params may be omitted (runs once with no parameters), a single object (one run),
or aliased as payload / payloads.
Example
$ export TIGERGRAPH_URI=http://localhost:14240 $ export TIGERGRAPH_USERNAME=tigergraph $ export TIGERGRAPH_PASSWORD=tigergraph $ export TIGERGRAPH_DATABASE=my_graph $ uv run run_tigergraph_queries -i runs.json -o results.json
QueryBatchResult
¶
QueryRunResult
¶
Bases: BaseModel
Outcome for a single parameter set.
Source code in graflo/cli/run_tigergraph_queries.py
QueryRunSpec
¶
Bases: BaseModel
One installed query and zero or more parameter payloads.
params is None means the key was omitted — run once with no parameters.
An empty list means run zero times.
Source code in graflo/cli/run_tigergraph_queries.py
RunOutput
¶
parse_query_runs(data)
¶
Parse JSON input into one or more query run specifications.
Source code in graflo/cli/run_tigergraph_queries.py
run_query_batch(conn, *, graph_name, specs)
¶
Execute all specs and collect structured results.
Source code in graflo/cli/run_tigergraph_queries.py
run_tigergraph_queries(input_path, inline_json, output_path, graph, prefix, ssl_verify, verbose)
¶
Run installed TigerGraph queries from a JSON parameter spec.
Source code in graflo/cli/run_tigergraph_queries.py
250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 | |