# Extract

## Introduction

Extraction is the process by which USE (Unified Scriptable Extractor) retrieves data from external locations. The following types of data source are supported:

| Type         | Description                                                                                                                                                                             |
| ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **APIs**     | Typically, usage data is retrieved from the API or APIs provided by the cloud (or clouds) for which reports need to be generated. This is usually a REST API accessed via HTTP/S.       |
| **Files**    | A file on the local file-system or on a shared volume. This is usually a CSV, JSON or XML file.                                                                                         |
| **Exivity**  | In some cases it is useful to retrieve information from Exivity itself, such that accounts and usage data that were created historically can be incorporated into the daily processing. |
| **Database** | Arbitrary SQL queries can be executed against an SQL server either via a direct connection string or via an ODBC DSN.                                                                   |
| **Web**      | Arbitrary HTTP queries can be invoked in order to retrieve information from any web page accessible from the Exivity server.                                                            |

## USE script

A *USE script* is required for USE to operate. Further information can be found via the links below:

An introductory overview of the scripting language:

{% content-ref url="/pages/-LfOfNl3cfMrbqA3tm7m" %}
[Script basics](/2.10.2/data-pipelines/extract/basics-1.md)
{% endcontent-ref %}

A reference guide for the USE scripting language:

{% content-ref url="/pages/-LfOfNl5ARiDR1LKyOuQ" %}
[Language](/2.10.2/data-pipelines/extract/language.md)
{% endcontent-ref %}

How to parse XML and JSON data

{% content-ref url="/pages/-LfOfNl44QMDwkZeqSOF" %}
[Parslets](/2.10.2/data-pipelines/extract/parslets.md)
{% endcontent-ref %}

Template scripts that can be used as starting points for common data sources:

{% content-ref url="/pages/-LfOfNl2ZtT2-sSV1c4V" %}
[Templates](/2.10.2/data-pipelines/extract/templates.md)
{% endcontent-ref %}


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://olddocs.exivity.io/2.10.2/data-pipelines/extract.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
