# The Scheduled Query object

### The Scheduled Query object

```json
{
  "id": "sqr_1NpIuH2eZvKYlo2CP72f3rLR",
  "object": "scheduled_query_run",
  "created": 1694472517,
  "data_load_time": 1694217600,
  "file": {
    "id": "file_1BE4yZ2eZvKYlo2C9MeXgqcB",
    "object": "file",
    "created": 1508284799,
    "expires_at": null,
    "filename": "path",
    "links": {
      "object": "list",
      "data": [],
      "has_more": false,
      "url": "/v1/file_links?file=file_1BE4yZ2eZvKYlo2C9MeXgqcB"
    },
    "purpose": "sigma_scheduled_query",
    "size": 500,
    "title": null,
    "type": "csv",
    "url": "https://files.stripe.com/v1/files/file_1BE4yZ2eZvKYlo2C9MeXgqcB/contents"
  },
  "livemode": false,
  "result_available_until": 1726012800,
  "sql": "SELECT count(*) from charges",
  "status": "completed",
  "title": "Count all charges"
}
```

## Attributes

- `id` (string)
  Unique identifier for the object.

- `object` (string)
  String representing the object’s type. Objects of the same type share the same value.

- `created` (timestamp)
  Time at which the object was created. Measured in seconds since the Unix epoch.

- `data_load_time` (timestamp)
  When the query was run, Sigma contained a snapshot of your Stripe data at this time.

- [`error`](https://docs.stripe.com/api/sigma/scheduled_queries/object.md?query=error) (object, nullable)
  If the query run was not successful, this field contains information about the failure.

- [`file`](https://docs.stripe.com/api/sigma/scheduled_queries/object.md?query=file) (object, nullable)
  The file object representing the results of the query.

- `livemode` (boolean)
  If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.

- `result_available_until` (timestamp)
  Time at which the result expires and is no longer available for download.

- `sql` (string)
  SQL for the query.

- `status` (string)
  The query’s execution status, which will be `completed` for successful runs, and `canceled`, `failed`, or `timed_out` otherwise.

- `title` (string)
  Title of the query.
