> ## Documentation Index
> Fetch the complete documentation index at: https://docs.riggery.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# State import from file

> Import extract tables into a State collection.

Import tables from a **Files extract** result into a State collection.

**File id** is the same opaque id you passed to Files extract (`artifactId` in the extract summary). It is not `{{Files extract.text}}`. See [Previous nodes](/graph/previous-nodes#tools) and [Files extract](/graph/tools/files-extract#output).

<h2 id="input">
  Input
</h2>

Inspector **Settings**. Empty-field rules for the Graph: [Previous nodes](/graph/previous-nodes). This inspector has no **Insert value**; you can type `{{…}}`.

On an Agent Tool, **File id** and **Collection** can be **Agent decides** or **Fixed**.

| Field                  | Required | Empty       | Notes                                                                                                  |
| ---------------------- | -------- | ----------- | ------------------------------------------------------------------------------------------------------ |
| **File id**            | Yes      | Fail        | Same id as Files extract. Not `{{Files extract.text}}`. [Details](/graph/tools/files-extract#file-id). |
| **Collection**         | Yes      | Fail        |                                                                                                        |
| **Replace collection** | No       | Default: No | **Yes** or **No**.                                                                                     |

<h2 id="output">
  Output
</h2>

On the next node, **Previous nodes** lists **`State import from file`: Result** (`{{State import from file.text}}` while the name is unique).

| Output | In menu | Type | Next node gets                                                                                                          |
| ------ | ------- | ---- | ----------------------------------------------------------------------------------------------------------------------- |
| Result | Yes     | Text | A status line such as `Imported 42 record(s) into "rates" from artifact …`. The rows live in State, not in this Result. |
