Skip to main content
POST
Error

Path Parameters

projectUuid
string
required

Body

application/json

Python run(inputs, params) over other async queries' results, executed in a sandbox.

references
object
required

Results of other async queries exposed to the code as DataFrames, keyed by input name: {"orders": ""} is read as inputs["orders"]. Typed Record<string, UUID> for the same TSOA reason as compose SQL.

code
string
required

Python source defining run(inputs: dict[str, pandas.DataFrame], params: dict) -> pandas.DataFrame. Each key of references is exposed in inputs as a DataFrame.

parameters
object

Construct a type with a set of properties K of type T

usePreAggregateCache
boolean
invalidateCache
boolean
context
enum<string>
Available options:
dashboardView,
autorefreshedDashboard,
exploreView,
filterAutocomplete,
chartView,
chartHistory,
sqlChartView,
sqlRunner,
viewUnderlyingData,
alert,
scheduledDelivery,
csvDownload,
gsheets,
gsheetsAddon,
scheduledGsheetsChart,
scheduledGsheetsDashboard,
scheduledGsheetsSqlChart,
scheduledChart,
scheduledDashboard,
calculateTotal,
calculateSubtotal,
embed,
ai,
mcp.run_metric_query,
mcp.run_sql,
mcp.search_field_values,
api,
cli,
metricsExplorer,
preAggregateMaterialization,
composeSqlRunner,
pythonRunner,
multiSourceQuery,
dataAppSample,
desktop
limit
number<double>

Maximum rows kept from the returned DataFrame; the rest are dropped and the result marked truncated.

Response

Success

results
object
required
status
enum<string>
required
Available options:
ok