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

# How imported data loads

> The rules cfo.ai follows when it loads synced and uploaded data: CSV format and date parsing, how columns become Variables and Dimensions, starting formulas, accounting statement columns, saved query rules and limits, when data refreshes, how much history loads, and sync setup limits.

This page lists the rules that decide how a source's rows become numbers in your Model: how a CSV is read, what each column becomes, when data refreshes, and how much history loads. A saved query is the query that brings a source's rows into your Model; see [Saved queries](#saved-queries). For the path data takes, read [How connected data reaches your Model](https://docs.cfo.ai/concepts/connected-data.md). For a file's or a connection's messages, see [Connection statuses and actions](https://docs.cfo.ai/reference/connection-statuses.md).

## CSV files

A CSV you upload as a data source loads as one table.

| Rule | Detail |
| - | - |
| File type | `.csv` only, not empty, up to 500 MB per file; one row holds up to 16 MiB |
| Encoding | UTF-8, or UTF-16 with a byte order mark, which is how spreadsheet tools save "Unicode text". A UTF-16 file without a byte order mark loads with a `?` between its characters. |
| Where the table is | cfo.ai reads the file to find the line of column names, the last line of the table, and the separator, so a report with title lines above the table loads its table alone. A line that totals rows that are each a person, customer, vendor, invoice, or transaction, such as the **Grand Total** under a payroll report, is left out, whatever its columns or the file's name. A total line of a financial statement or an account schedule, such as **Investment Accounts Total** under a list of accounts, is one of the schedule's rows and loads. When cfo.ai cannot find a table, it reads the whole file as a comma-separated table from its first line. |
| Separator | Comma, or the separator the file uses, such as a semicolon or a tab |
| Rows | Every record has as many fields as the line of column names. A quoted field may hold line breaks, so one record can span several lines. |
| Text cells | Keep the line breaks and tabs inside them; a line break or tab at either end is trimmed with the surrounding whitespace. Any other control character loads as `?`. |
| Empty cells | A cell is empty when, ignoring case and surrounding spaces, it is exactly `NULL` or a spreadsheet error value such as `#N/A`, `#REF!`, `#DIV/0!`, `#VALUE!`, `#SPILL!`, or `#TIMEOUT!`. Text that only begins like one, such as `Nullable` or `#REFUND batch`, stays text. A number column keeps its type when some of its cells hold such a value, on the first load and on a reload alike; only a value that is text changes it, as [Replacing the file](#csv-files) describes. |
| Codes and IDs | A column loads as numbers only when every value that is not empty is a number with at most 15 digits before its decimal point and no leading zero. A column that holds a code such as `00123`, `$007`, or `1234567890123456789` loads as text, with every character as written, so it becomes a text Dimension. Digits after the decimal point do not count toward the 15, so a ratio such as `0.30000000000000004` stays a number. |
| Replacing the file | A column that holds values keeps its stored type or widens it, never narrows it: whole numbers can become decimals, dates can gain times, and a column that receives a value that is not a number, date, yes/no, or an empty value as defined above becomes text, keeping every value, so an ID such as `C-1003` stays. A column that became text stays text even when the next file holds only numbers, so a saved query that read it as a number needs a cast. A column with no values in the current table is typed again from the new file. |
| Decimal commas | cfo.ai reads how the file writes numbers. In a file with a decimal comma, `1.234,56` and `1 234,56` load as 1234.56. For dates, see [Dates in CSV files](#dates-in-csv-files). |
| Repeated column name | Still loads. Names are compared without letter case, and the later column is stored under its name and its own column number, so a second `Amount` in the fourth column becomes `Amount (column 4)`. |
| Blank column name | Stored as `COLUMN_` and the column's number, such as `COLUMN_4` for the fourth column |
| Each file | Becomes its own data source, named after the file until you rename it |
| Refresh | Never. A new upload of the file replaces its rows. |

A file fails with **The file couldn’t load**, followed by what was wrong, when a record has more or fewer fields than the line of column names. To load it, fix those records or let Ari clean up a copy; see [Upload a CSV as a data source](https://docs.cfo.ai/guides/upload-a-csv.md). When the table cfo.ai located ends before the file's records do, the load succeeds with the located records only, and Ari's note on the load says how many records loaded out of how many the file holds.

The **Upload** button does not take Excel workbooks or PDFs. Attach those to a chat and ask Ari to load the table you need.

## Dates in CSV files

cfo.ai decides how to read dates for a whole column at once.

* It reads every value in the column and picks the one day and month order that reads them all. A column that holds `13/04/2026` is read day-first throughout.
* A column whose values all read either way, such as `03/04/2026`, follows the day and month order the file's other date columns use. When no other column settles it, the column is read month-first and the load note says the order was unsettled.
* A column that needs both orders is not a date column, and it loads as text.
* A date with a clock, such as `2026-09-25 00:56`, loads as a timestamp. A clock with a numeric time-zone offset, such as `2025-10-06 16:08:40 -0400`, loads as the same instant in UTC, `20:08:40`; a clock with no zone, with `Z`, or with `UTC` loads as written. A column that holds a zone abbreviation, such as `EST` or `CST`, is not a date column and loads as text, because the abbreviation does not name one offset.
* Plain digit strings, such as `2024` or `20240229`, stay numbers unless the column's name says it holds dates. A column named exactly `yyyyMMdd`, or whose name has "date" as a word of its own, reads eight-digit values such as `20260105` as dates when every value that is not empty is a real calendar date. Spaces, punctuation, and changes of letter case separate the words, so `EcritureDate`, `Posting Date`, `invoice_date`, and `DATE` match, while `Order ID`, `Update`, `Candidate`, `Mandate`, `Dates`, and an all-capitals name such as `ECRITUREDATE` do not. A column the connection already holds as numbers keeps that type when you replace the file.

A row whose date is empty has no place in a table that shows the source's dates by week, month, quarter, or year, so it is left out of those rows and columns; it still counts in totals that do not break down by date, and it appears under an empty item only when the date Dimension is shown without a grain.

A date before January 1, 1900 or after December 31, 2299, such as a typo like `10/30/3036`, loads as written from any source, but a formula or table that reads the column by month, quarter, or another period leaves that row out. A filter on the exact date still matches it. After an import, Ari is told how many dates in each column fall outside that range, with one example and its row in the query result, so it can explain missing rows without changing the values. Fix the date in the source and refresh.

A column named `Date` does not place the rows on the calendar by itself. Tell Ari which column dates the rows, such as an invoice date or a period column, and Ari saves it as the source's date column. A table that shows a source with no date column by month cannot calculate it; see [Table calculation notices](https://docs.cfo.ai/reference/formula-errors.md#table-calculation-notices).

## How columns become Variables and Dimensions

Each column a saved query returns becomes a Variable or a Dimension when it first loads.

| Column | Becomes |
| - | - |
| Numbers | A Variable that adds up, unless its name marks it as an identifier |
| Numbers with an identifier name | A text Dimension, so a leading zero in `00400` and every digit of a long ID stay as written |
| Text | A Dimension, unless the column has more than 10,000 different values |
| Text with more than 10,000 different values, such as record IDs or sync timestamps | A Variable that keeps the latest value. The values stay readable, but a table cannot break down by the column. To group by it anyway, ask Ari to load it as a Dimension. |
| Fivetran's sync bookkeeping columns, such as `_fivetran_synced` or **Source Synced At** | A Variable, even when the column holds dates |
| Dates | Dates, however many different values, so the time axis stays available |
| Text from a database query (`TEXT`, `VARCHAR`, `STRING`, or `CHAR`) | A text Dimension, whatever its name and even when every value looks like a number, unless the column has more than 10,000 different values. A cast in the saved query, such as `to_varchar(stage_order)`, decides the role before the first load. Text whose values are all dates still loads as dates. |

A name marks an identifier when its last word is "id", including a camel-case ending such as `dealId`, or when it ends in "account number" or "account code". `Customer ID`, `deal_id`, `P&L Account Number`, and `SalesDefaultAccountCode` load as Dimensions. `Amount Paid`, `Account Balance`, and `Number of Accounts` still add up.

The first load fixes each column's role and stored type, and later loads keep them, including a column that has since grown past 10,000 values; a CSV reload can widen a stored type, as [CSV files](#csv-files) describes, but never narrows one. To change a column's role, ask Ari, for example "Load Store Code as a Dimension instead." Ari switches it in place, so formulas, tables, and filters that use the column keep working. The stored type does not change, so a number column that becomes a Dimension has number items; to keep leading zeros, the query must return the column as text under a new name. A column that feeds a Dimension other queries also feed cannot switch roles for one query.

## Starting formulas

When a column first loads, its Variable or Dimension gets a saved starting formula, which you can open, edit, or delete like any other formula:

| Loads as | Starting formula |
| - | - |
| Variable | `sum` over the source column |
| A Variable made from a text column with more than 10,000 different values, or from a Fivetran sync column | `last` over the source column, because text cannot be summed |
| Dimension | `last` over the source column: the value with the latest date when the source has a date column. Without one, rows are ranked the same way in every calculation, but not by the source's row order; see [last](https://docs.cfo.ai/reference/functions.md#last) |
| A roster field from an HR source, such as pay rate | Each employee's latest value in each period. A period with no value carries the previous one forward, and an explicit zero replaces it. Department and company totals add each employee's latest value once. |

A starting formula has no [formula range](https://docs.cfo.ai/reference/glossary.md#formula-range), but while it is exactly the `sum` or `last` over the source column it reads the way a Variable or Dimension with no formula does: it reads source rows through [Last close](https://docs.cfo.ai/reference/glossary.md#last-close) and shows its type's default after that, 0 for a number or an empty value. A Forecast formula that reads the column, or any other expression, reads the rows dated in each period it applies to. A Variable with no saved formula, because it loaded before starting formulas existed or someone deleted its formula, also reads its source only through Last close. See [How formulas work](https://docs.cfo.ai/concepts/formulas.md).

## Accounting statement columns

| Source | Saved queries | Columns |
| - | - | - |
| QuickBooks Online | **QuickBooks Profit & Loss**, **QuickBooks Balance Sheet** | Amounts split into **Revenue**, **Cost of Goods Sold**, **Expense**, **Other Income**, **Other Expense**, and **Unclassified P\&L Amount**, with the account, **Vendor**, **Entity**, and **Currency**. Both are on the company's accounting basis, cash or accrual; see [QuickBooks Online](https://docs.cfo.ai/reference/integrations.md#quickbooks-online) for how the basis is read and switched. Each report is as QuickBooks returned it when a sync last wrote the month; [How much history loads](#how-much-history-loads) says which months a refresh rewrites. The balance sheet dates each month's balances by the month's last day, so the month in progress keeps one **Period** from its first sync until it closes. |
| Xero | **Xero Income Statement** or **Xero Income Statement by Tracking Category**, **Xero Balance Sheet** | Amounts by account, with **Entity** and **Currency**. The tracking-category statement has one row per journal line and up to three tracking categories as numbered column pairs. How the balance sheet files each account is in [Xero](https://docs.cfo.ai/reference/integrations.md#xero). |
| NetSuite SuiteAnalytics | **NetSuite Income Statement**, **NetSuite Balance Sheet** | Amounts by account. Income Statement rows also carry **Subsidiary** and **Currency Name**. |
| Rillet | **Rillet Income Statement**, **Rillet Balance Sheet** | One set of rows per subsidiary, with **Entity** and **Currency** |

An amount whose account has no classification loads into the statement's unclassified amount, which stays part of the statement's total. Normal activity is positive within its category, and refunds and reversals reduce it.

**Entity** holds the company's name, so each company's rows stay apart. When a second connection of the same integration loads for the first time, such as a second QuickBooks Online company, its compatible Dimensions, such as **Entity**, **Currency**, and the account, join the ones the first connection created, so both companies share one Entity Dimension. Dimensions from different integrations, such as QuickBooks Online and Xero, do not join on their own. See [Dimension mappings and shared Dimensions](https://docs.cfo.ai/concepts/dimension-mappings.md) and [Consolidate entities](https://docs.cfo.ai/guides/consolidate-entities.md).

## Source logos

A Variable or Dimension shows its integration's logo on table row and column labels and in formula reference chips when every reference in its formulas reads imported columns of one integration. Two connections of the same integration count as one. A formula that mixes integrations, or reads another Variable, shows no logo. An MCP server or API added by its address shows its company's logo when the address is a public company domain.

## Saved queries

| Rule | Detail |
| - | - |
| Who writes them | cfo.ai adds them for supported sources, and Ari writes the rest. You see them read-only on the connection's page under **Queries**. |
| An uploaded CSV's first query | An upload starts with a query named **Uploaded CSV** that loads every column as it is. When Ari then writes its own query for the file, with business names and types, that query takes the place of **Uploaded CSV**, so the file loads once, under one set of Variables and Dimensions. The starting query stays beside Ari's query only when something already reads it: a formula, a table, or a value you changed in one of its columns. |
| Scenarios | Saved queries belong to Main. Every ordinary Scenario reads Main's latest query and result. A Snapshot keeps the query and result it was pinned with. You cannot test a query change in one Scenario alone. |
| Planning time limit | When a query is saved, the warehouse runs it once to count its rows and read its columns, for at most 40 seconds. A query that runs longer is refused and nothing is saved. |
| Fewer rows than the source | Can be on purpose: a query may filter the source to what you asked for. Ask Ari what the query keeps. |
| A reserved word as a column name | Every saved query runs in Snowflake, which refuses one of its reserved words, such as `ROWS` or `ROW`, as a bare column alias. A query written as `COUNT(*) AS ROWS` or `COUNT(*) ROWS` is saved and run as `COUNT(*) AS "ROWS"` or `COUNT(*) "ROWS"`, which names the same column; Ari's save result says which aliases were quoted. Only a column alias is rewritten: the word after `AS`, or the word that ends a select-list item before a comma or `FROM`. A statement that repeats the word elsewhere, such as `ORDER BY ROWS`, still fails with Snowflake's own error. So does one that ends its select list with the bare alias and no `FROM`. Text inside quotes or comments is never changed. |
| Updates to cfo.ai's own queries | A query cfo.ai installed that nobody edited moves to cfo.ai's current version at the next sync. A query you or Ari edited keeps its text. An update never drops a column the query already loaded. |
| Removing a query | Ari first lists what the removal retires: the Variables and Dimensions the query owns and the formulas and tables that read them. It deletes the query only after you confirm. The connection and its other queries stay. If the query is loading, the load finishes first. |
| Changing a query | An edit that would drop columns your Model uses is refused until you approve the exact list of what it retires: columns read by a formula, a table, a chart, a Canvas block, a setting, a hand-added item, or a custom formula on the column itself, including formulas that read the source column directly and formulas in Scenarios that inherit the edit. An edit that stops loading a column nothing uses saves without asking, so Ari's background repair can retire such a column on its own. An edit cannot change the type of a column that already loaded. |
| Time to load a result | 15 minutes on the first attempt, 30 on the second, and 60 on the third and last. A load that runs out of time is tried again; the failure Ari reads names the limit and the attempt, such as **timed out after 60 minutes on attempt 3 of 3**, and how many rows had loaded when the query's result was still loading. |

## Refresh schedule

| Source | When it refreshes |
| - | - |
| Integrations | Once a day, in a shared nightly run that starts at 02:00 UTC (7 PM Pacific the evening before during daylight saving time, 6 PM in winter); each workspace's connections start at the workspace's own fixed point within the following hour. The run reruns the saved queries once every source has finished syncing, or at the four-hour cutoff for the sources that have; a source still syncing then gets its queries within about two minutes after its sync ends, checked for up to 20 hours. A query already refreshed after its source's latest sync does not run again. |
| A connection with its own refresh time | Once a day at that time of day, in its time zone, keeping that clock time across daylight saving changes. A new time applies from the next nightly run. |
| Google Sheets and Google Drive | Nightly and when you ask Ari. An unchanged file starts no update. |
| CSV uploads | Never |
| MCP servers and APIs | Live when Ari calls them. A saved sync setup refreshes nightly, like an integration. |
| Any source, on request | When you ask Ari to refresh it, or when someone who manages connections selects **Sync now** on a linked integration's page; see [Refresh data](https://docs.cfo.ai/guides/refresh-data.md). |

The nightly refresh and refreshes you ask for work the same on every active plan, including a trial. A workspace with no plan, or whose billing is locked, does not refresh until it has an active plan again. A connection's last loaded time counts only syncs that finished; a failed or canceled sync does not move it.

## How much history loads

| Source | History |
| - | - |
| QuickBooks Online, Xero | From January 1 of last year through today. The three most recent complete months load first, and the rest follows in the background. |
| QuickBooks Online, Xero, full-history import | From a year you name, 2015 or later. The months it imports stay through later refreshes. A QuickBooks import also takes the balance sheet of the month before that year. |
| Plaid, Stripe (Direct), Rillet, full-history refresh | The connection's whole history, re-read from the source with no year to name, and the connection's saved queries rerun into Main. Other sources refuse a full-history refresh. |
| QuickBooks Online, nightly refresh | The last three months: the current month and the two before it. The whole range when the connection has not synced for more than a month. Also, for a company that reports in one currency, the older months of the current fiscal year when the balance sheet's year-to-date net income differs from the stored months by one constant amount; see [QuickBooks Online](https://docs.cfo.ai/reference/integrations.md#quickbooks-online). |
| Xero, nightly refresh | The whole range |
| Sources through Fivetran | The full history of each selected table. A newly added table loads its full history. |
| Stripe (Direct) | Every object on the first sync, then Stripe's changes since the last sync |

## Sync setups for MCP servers and APIs

A sync setup copies the results of one read-only tool or endpoint into your data on each sync. Ari creates and edits them; the connection's page lists them under **Syncs** as **Enabled** or **Paused**, with **Last warehouse sync** or **Not synced to the warehouse yet.** A setup saves the tool's definition as the server described it when Ari saved the setup, and each sync page checks the server's current definition against it. When the server changes the tool, that page stops without saving a result, and cfo.ai compares the saved setup with the new definition: a change the saved request still fits, such as new wording or a response that still holds the records where the setup reads them, keeps the setup **Enabled** for its next run; a change that needs a different request or record selection turns it to **Paused**, and Ari's background worker for the connection repairs it, asking you only when it cannot choose the repair itself. [Connection statuses and actions](https://docs.cfo.ai/reference/connection-statuses.md#messages-about-mcp-servers-and-apis) has the exception for a changed tool whose permission came from cfo.ai's own read-or-write classification. Ari cannot save an enabled setup while the server's tool list cannot be read.

A tool answer that puts a status line beside its data, as separate text blocks, still imports: the setup reads the records from the block that holds them, and the whole answer is never saved as one record.

| Type | What it keeps |
| - | - |
| **Replace · Keeps the latest result** | The latest complete result |
| **Snapshot · Keeps each capture** | Every successful capture, stamped with when it was taken |
| **Upsert · Adds and updates matching records** | New records, and updates to records it already holds. It does not remove records a later response leaves out. |
| **Append · Adds new records and keeps existing ones** | New records only. A record it already holds never changes. |

| Limit | Value |
| - | - |
| Pages in one sync | 10,000. Each page is one source response: up to 1 MiB from an API, 2 MiB from an MCP server |
| Replace and snapshot, without a changes-since filter | Written page by page, so only the page limits apply. The pages are published together when the sync finishes, so a sync that stops at a limit publishes none of them. The pages it saved are kept: the next attempt, including the nightly refresh, continues from the last saved page as long as the first page is less than 48 hours old. Older pages are discarded and the sync starts over, as it does after Ari edits the setup |
| Upsert, append, or any sync with a changes-since filter | 16 MiB in all, because the whole result is held before it is saved |
| One tool call in a sync page from an MCP server | 45 seconds. Connecting to the server, listing its tools, and the call each get 45 seconds. A time limit the tool's own description names is the server's own; cfo.ai's applies either way. |
| One sync | 10 minutes |

A sync that reaches a limit stops without publishing a partial result, and the data from the last complete sync stays. The tool or endpoint must be set to **Allow**.

## Related

* [How connected data reaches your Model](https://docs.cfo.ai/concepts/connected-data.md)
* [Check that your numbers match your books](https://docs.cfo.ai/guides/check-imported-data.md)
* [Refresh data or change when it refreshes](https://docs.cfo.ai/guides/refresh-data.md)
* [Upload a CSV as a data source](https://docs.cfo.ai/guides/upload-a-csv.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.