Represents an ad-hoc execution of a Sigma query via the API
Attributes
- idstring
Unique identifier for the object.
- objectstring
String representing the object’s type. Objects of the same type share the same value.
- createdtimestamp
Time at which the object was created. Measured in seconds since the Unix epoch.
- finalized_
atnullable timestamp Timestamp describing when a Query run reached the terminal status.
- livemodeboolean
Has the value
true
if the object exists in live mode or the valuefalse
if the object exists in test mode. - sqlstring
The sql statement that is run.
- statusnullable enum
The status of the query run. Possible values are
succeeded
,pending
,running
, andfailed
.
{ "id": "qry_0R9c43589O8STxCGUZXU3I6T", "object": "sigma.sigma_query_run", "created": 1743641728, "error": null, "finalized_at": 1743641733, "livemode": true, "result": { "file": "file_0R9c49589O8KAxR9askNs8JQ" }, "sql": "SELECT * FROM balance_transactions LIMIT 4", "status": "completed"}
Create a query run to be executed.
Parameters
- from_
saved_ querystring The unique id of a previously saved query to be run. Note that only one of
sql
orfrom_
should be provided.saved_ query - sqlstring
The sql statement to run. This should be a valid Trino SQL statement that can be run in Sigma. Note that only one of
sql
orfrom_
should be provided.saved_ query
Returns
Returns a Query Run object.
{ "id": "qry_0R9c43589O8STxCGUZXU3I6T", "object": "sigma.sigma_query_run", "created": 1743641728, "error": null, "finalized_at": 1743641733, "livemode": true, "result": { "file": "file_0R9c49589O8KAxR9askNs8JQ" }, "sql": "SELECT * FROM balance_transactions LIMIT 5", "status": "completed"}
Retrieve the status of Query Run
Parameters
- idstringRequired
The
id
of the query run to retrieve. This should be a validid
that was previously created.
Returns
Returns the specified Query Run object.
{ "id": "qfl_0R46kn589O8KAxCGtbTjfolP", "object": "sigma.sigma_api_query", "created": 1742329729, "livemode": true, "sql": "SELECT * FROM balance_transactions LIMIT 5", "name": "Select balance transactions"}
The Report Run object represents an instance of a report type generated with specific run parameters. Once the object is created, Stripe begins processing the report. When the report has finished running, it will give you a reference to a file where you can retrieve your results. For an overview, see API Access to Reports.
Note that certain report types can only be run based on your live-mode data (not test-mode data), and will error when queried without a live-mode API key.