# scheduled\_query\_run

From **Stripe API**.

If you have [scheduled a Sigma query](https://stripe.com/docs/sigma/scheduled-queries), you'll
receive a `sigma.scheduled_query_run.created` webhook each time the query
runs. The webhook contains a `ScheduledQueryRun` object, which you can use to
retrieve the query results.

- Type: `object`

## Properties

### `created`

- Required: true
- Type: `integer`
- Format: `unix-time`

Time at which the object was created. Measured in seconds since the Unix epoch.

### `data_load_time`

- Required: true
- Type: `integer`
- Format: `unix-time`

When the query was run, Sigma contained a snapshot of your Stripe data at this time.

### `error`

- Required: false
- Type: `object`

### `file`

- Required: false
- Nullable: true

The file object representing the results of the query.

### `id`

- Required: true
- Type: `string`
- maxLength: `5000`

Unique identifier for the object.

### `livemode`

- Required: true
- Type: `boolean`

Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.

### `object`

- Required: true
- Type: `string`
- Allowed values: `"scheduled_query_run"`

String representing the object's type. Objects of the same type share the same value.

### `result_available_until`

- Required: true
- Type: `integer`
- Format: `unix-time`

Time at which the result expires and is no longer available for download.

### `sql`

- Required: true
- Type: `string`
- maxLength: `100000`

SQL for the query.

### `status`

- Required: true
- Type: `string`
- maxLength: `5000`

The query's execution status, which will be `completed` for successful runs, and `canceled`, `failed`, or `timed_out` otherwise.

### `title`

- Required: true
- Type: `string`
- maxLength: `5000`

Title of the query.

## JSON Schema

```json
{"description":"If you have [scheduled a Sigma query](https://stripe.com/docs/sigma/scheduled-queries), you'll\nreceive a `sigma.scheduled_query_run.created` webhook each time the query\nruns. The webhook contains a `ScheduledQueryRun` object, which you can use to\nretrieve the query results.","properties":{"created":{"description":"Time at which the object was created. Measured in seconds since the Unix epoch.","format":"unix-time","type":"integer"},"data_load_time":{"description":"When the query was run, Sigma contained a snapshot of your Stripe data at this time.","format":"unix-time","type":"integer"},"error":{"$ref":"#/components/schemas/sigma_scheduled_query_run_error"},"file":{"anyOf":[{"$ref":"#/components/schemas/file"}],"description":"The file object representing the results of the query.","nullable":true},"id":{"description":"Unique identifier for the object.","maxLength":5000,"type":"string"},"livemode":{"description":"Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.","type":"boolean"},"object":{"description":"String representing the object's type. Objects of the same type share the same value.","enum":["scheduled_query_run"],"type":"string"},"result_available_until":{"description":"Time at which the result expires and is no longer available for download.","format":"unix-time","type":"integer"},"sql":{"description":"SQL for the query.","maxLength":100000,"type":"string"},"status":{"description":"The query's execution status, which will be `completed` for successful runs, and `canceled`, `failed`, or `timed_out` otherwise.","maxLength":5000,"type":"string"},"title":{"description":"Title of the query.","maxLength":5000,"type":"string"}},"required":["created","data_load_time","id","livemode","object","result_available_until","sql","status","title"],"title":"ScheduledQueryRun","type":"object","x-expandableFields":["error","file"],"x-resourceId":"scheduled_query_run"}
```
