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

# Data sources

> Bring in numbers that do not come from your agents - a spreadsheet you upload, or a database you connect.

Your agents produce a lot of data, but reports usually need something they do not have: targets, rates, a list of approved suppliers, last year's figures, the exceptions someone signed off by hand.

A data source is where that lives, so your reports can use it alongside everything else.

## Two kinds

<CardGroup cols={2}>
  <Card title="Upload a spreadsheet" icon="file-excel">
    An `.xlsx` or `.csv` file. Best for numbers a person maintains - overrides, targets, reference lists. Re-upload whenever the file changes.
  </Card>

  <Card title="Connect a database" icon="database">
    A read-only connection to a database you already run. Best when the numbers are already kept somewhere systematic.
  </Card>
</CardGroup>

Both start from **New → Data Source**.

## Uploading a spreadsheet

<Steps>
  <Step title="Name it">
    Two names: one your team reads in a list, and a short **table name** used inside questions. The short one can only use lower-case letters, numbers and underscores - `duty_overrides`, not `Duty Overrides`.
  </Step>

  <Step title="Upload the file">
    The first row is treated as the column headings. If two columns share a heading, the second gets a number added so both survive.
  </Step>

  <Step title="Check the columns">
    Confirm the columns are what you expected before anyone builds a report on them.
  </Step>
</Steps>

Then anyone writing a question can read from it by its table name.

### Replacing the file

Use **Replace file** whenever your spreadsheet changes. The new contents replace the old ones completely.

<Note>
  If an upload fails, your previous file stays in place and keeps being used. You will never end up with half a spreadsheet loaded - it is either the new file or the old one.
</Note>

You can add and remove columns between uploads. A report that reads a column you removed will say so plainly rather than quietly showing blanks.

### Limits

| Limit     | Value   |
| --------- | ------- |
| File size | 25 MB   |
| Rows      | 200,000 |

Files above either limit are refused straight away, with the limit named, rather than being accepted and timing out later. If your file is bigger than this, talk to us - there is a different path for data at that scale.

### Every column is text

Whatever is in the file arrives as text, including numbers and dates. Whoever writes the question converts them to numbers or dates there.

This is deliberate: it means changing your spreadsheet - adding a row where someone typed "N/A" in a number column, say - can never break a report that was working yesterday.

## Connecting a database

Choose **New → Data Source** and enter the connection details. The connection is read-only: nothing the platform does can change data in your database.

Once connected, questions can be pointed at it the same way they are pointed at your agents' own results.

## Keeping data separate

Data sources belong to the workspace that created them. Nobody in another workspace can see one, read from one, or write a report against one.
