> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/cortex-xsiam/configure-cortex-xsiam/data-management/archived-data/building-xql-archived-data-queries.md).

# Building XQL archived data queries

Build XQL queries for archived data in Cortex XSIAM.

{% hint style="warning" %}

### Prerequisite

Archived cold storage, in addition to a Period-Based Retention - Cold Storage add-on license, requires compute units (CU) to run archived cold storage queries. Cortex XSIAM provides a free daily quota of compute units (CU) allocated according to your license size. Queries run without enough quota will fail. To expand your investigation capabilities, you can purchase additional CU by enabling the Compute Unit add-on. Ensure that you have enough CU to run your archived cold storage data. For more information on CU and running cold storage queries, see [Manage compute units](/cortex-xsiam/configure-cortex-xsiam/data-management/manage-compute-units.md).

For information on the CU add-on license, see [Cortex XSIAM product licenses](/cortex-xsiam/learn-about-cortex-xsiam/cortex-xsiam-product-licenses.md).
{% endhint %}

Each data source that is imported to Cortex XSIAM is available as a cold storage dataset and can be accessed using Cortex Query Language (XQL). These datasets are a new type of archived dataset. After being imported to cold storage, the datasets are renamed using the format `archive_<dataset name>`, and can be queried as any other cold storage dataset, with one exception that makes them unique. You can query these datasets during the hot retention period. Typically, this isn't enabled for cold storage datasets, as during the hot storage period, the cold storage data isn't relevant. Yet, for this type of data, you can query the archived data in cold storage during the hot storage period using CU.

You can perform queries on archived cold storage data using the dataset format:

```programlisting
cold_dataset = archive_<dataset name>
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://cortex-docs.paloaltonetworks.com/cortex-xsiam/configure-cortex-xsiam/data-management/archived-data/building-xql-archived-data-queries.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
