> For the complete documentation index, see [llms.txt](https://water-strategy.gitbook.io/waterstrategy/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://water-strategy.gitbook.io/waterstrategy/modeling-basics/recorders/file-recorders/tables-recorder.md).

# Tables Recorder

## General Description

A recorder that saves to PyTables CArray

This Recorder creates a CArray for every node passed to the constructor. Each CArray stores the data for all scenarios on the specific node. This is useful for analysis of Node statistics across multiple scenarios. [API Reference](https://pywr.github.io/pywr-docs/master/api/generated/pywr.recorders.TablesRecorder.html)

## Attributes

<table><thead><tr><th width="175">Name</th><th width="395">Description</th><th>Required</th></tr></thead><tbody><tr><td>model</td><td>The model to record nodes from</td><td>Optional</td></tr><tr><td>h5file</td><td>The tables file handle or filename to attach the CArray objects to. If a filename is given the object will open and close the file handles</td><td>Required</td></tr><tr><td>nodes</td><td>Nodes to save in the tables database. Can be an iterable of Node objects or node names. It can also be a iterable of tuples with a node specific where keyword as the first item and a Node object or name as the second item. If an iterable of tuples is provided then the node specific where keyword is used in preference to the where keyword (see below)</td><td>Required</td></tr><tr><td>parameters</td><td>Parameters to save. Similar to the nodes keyword, except refers to Parameter objects or names thereof</td><td>Required</td></tr><tr><td>where</td><td>Default path to create the CArrays inside the database</td><td>Required</td></tr><tr><td>time</td><td>Default full node path to save a time tables.Table. If None no table is created</td><td>Optional</td></tr><tr><td>scenarios</td><td>Default full node path to save a scenarios tables.Table. If None no table is created</td><td>Optional</td></tr><tr><td>routes_flows</td><td>Relative (to <em>where</em>) node path to save the routes flow CArray. If None (default) no array is created</td><td>Optional</td></tr><tr><td>routes</td><td>Full node path to save the routes tables.Table. If None not table is created</td><td>Optional</td></tr><tr><td>filter_kwds</td><td>Filter keywords to pass to tables.open_file when opening a file</td><td>Required</td></tr><tr><td>mode</td><td>Model argument to pass to tables.open_file. Defaults to ‘w’</td><td>Optional</td></tr><tr><td>metadata</td><td>Dict of user defined attributes to save on the root node (<em>root._v_attrs</em>)</td><td>Required</td></tr><tr><td>create_directories</td><td>If a file path is given and create_directories is True then attempt to make the intermediate directories. This uses os.makedirs() underneath</td><td>Optional</td></tr></tbody></table>

## Example

coming soon...

```json
{

}
```


---

# 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 dynamically by asking a question.

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

```
GET https://water-strategy.gitbook.io/waterstrategy/modeling-basics/recorders/file-recorders/tables-recorder.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
