> For the complete documentation index, see [llms.txt](https://docs.stackai.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stackai.com/guides-and-quickstarts/workflow-builder/tabular-data-workflows.md).

# Tabular data workflows

Search Tables answers questions from tabular data. Use it to select rows or calculate results from the columns in a table.

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSQ1Sgy933krTyK0S4JpP%2Fuploads%2FBBP3bmKYSu3JgNXANaPk%2FG029.mp4?alt=media&token=df2b0b29-e753-4f94-a3de-0318cdde844e>" %}

## Before you start

Prepare a **CSV (.csv)** file. If your source is an Excel or Google Sheets workbook, export the table or sheet you need as CSV first. Use a header row with clear, distinct column names and check that values in a column use a consistent format. Start with a small table whose totals you can verify in your spreadsheet. Have a workflow ready, or complete [First input to output workflow](https://docs.stackai.com/guides-and-quickstarts/workflow-builder/first-input-to-output-workflow.md).

## Connect the table and question

Connect the question input to Search Tables and then to Output.

![Question input, Search Tables, and Output path](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/PMJwgWhIj7KYYSvWaWRA/assets/g029-g029-01-canvas.png)

The user's question determines which information is requested from the table.

Open **Search Tables → CSV File** and select **Upload CSV**. Choose your `.csv` file and wait for the upload to finish. Confirm the filename appears. If the node already has a file, use **Replace** when you intend to change its source. In a configuration that says the table is uploaded per user, supply the table through that user input instead.

Check the attached table against your source spreadsheet before asking questions.

![Attached CSV table and source columns](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/IkfEfLNnDq89ScPYme1b/assets/g029-g029-02-csv.png)

Review its columns and values so you know what questions the data can answer.

## Ask a question about the data

Ask for an aggregate such as a sum and inspect the result. Use this question pattern, replacing the bracketed terms with actual column names and a value from your table:

```
What is the sum of [numeric column] for rows where [category column] equals [value]?
```

Calculate the same total in your spreadsheet and compare it with the returned answer. If the upload fails, check that the file is a CSV; renaming an `.xlsx` file to `.csv` does not convert its contents.

![Aggregate result from a table question](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/Tp9r1yEFMuPUYPCHs2Tj/assets/g029-g029-03-west-result.png)

Compare the calculation with the relevant rows in the source table.

## Use the returned result

Map Search Tables → query\_result into Output.

![Search Tables query\_result mapping](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/6auWFOW8nDCRRyuwblY3/assets/g029-g029-04-reference.png)

Use the result field for returned data rather than a separate field containing a downloadable file URL.

Ask a question that selects specific rows and run again.

![Rows returned for a filter question](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/faoSTTbSk6MfawSqASGa/assets/g029-g029-05-east-result.png)

Check that the returned rows satisfy the requested condition in the same source table.

## Important behavior

Use query\_result for returned rows or calculated answers. Use csv\_url for the separate downloadable CSV result.

If the answer is unexpected, check the source table, column names, and question.


---

# 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://docs.stackai.com/guides-and-quickstarts/workflow-builder/tabular-data-workflows.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.
