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

# Build a forecast input app that writes to your data warehouse

> Collect forecast numbers with an input column and an app, and store them in a table that you name in your data warehouse.

[All guides](https://docs.omni.co/guides.md)

Progress

%

Category

workbooks

Last updated

November 2026

# Build a forecast input app that writes to your data warehouse

Many teams collect forecasts by emailing spreadsheets, then load the numbers back into the data warehouse by hand. This guide shows how to collect those numbers in Omni instead. An [input column](https://docs.omni.co/analyze-explore/input-columns.md) stores each entry in a table that you name, and an [app](https://docs.omni.co/visualize-present/apps) gives people one screen to type, paste, or upload their numbers.

The example is a quarterly sales forecast with one value for each market, business, and month. The same steps work for other values that people enter against rows of modeled data, such as targets, budgets, or adjustments.

![A forecast input app with a list of markets on the left, a grid of editable monthly forecast cells for Germany, a CSV upload panel, an activity list, and a bar along the bottom that names the warehouse table the entries are saved to.](https://mintcdn.com/omni-e7402367/ke4uidG7_zzR0vER/guides/workbooks/images/forecast-input-app-finished.png?fit=max\&auto=format\&n=ke4uidG7_zzR0vER\&q=85\&s=62d786c9085f59e01ed89336e32063fe)

## Requirements

To follow the steps in this guide, you'll need:

* A **table upload schema** on a Postgres, Snowflake, Databricks, BigQuery, Redshift, Databricks Lakebase, or SQL Server connection. Omni creates the input column's table in this schema. Refer to the [setup guide for your database](https://docs.omni.co/connect-data/setup) for instructions.
* **Restricted Querier**, **Querier**, or **Connection Admin** permissions to create the input column. Viewers can enter values after the column exists.
* **The [Upload data ability](https://docs.omni.co/share.md#controlling-document-interactivity) enabled** for the [organization](https://docs.omni.co/administration/content-permissions.md) and in the document's settings.
* A [topic](https://docs.omni.co/modeling/topics) that contains the data people plan against, such as actuals and budget.

## How it works

The app reads a workbook query on your topic and writes only through the input column. Omni stores the entered values in a table in the upload schema and joins them back to the query on the key columns. Your modeled data stays read-only.

```mermaid theme={null}
flowchart LR
    T[Topic: actuals and budget] -->|read| A[App]
    A -->|write| I[Input column]
    I --> W[(Named table in the upload schema)]
```

## Build the forecast input app

### 1. Model the grain people plan at

The input column needs one row for each combination that people enter a value for. In this example, that is one row for each market, business, and month, with measures for actuals, budget, and the same month last year.

1. Build a table at that grain in your database, or as a [query view](https://docs.omni.co/modeling/query-views), and add it to a topic.
2. If different people own different markets, add an [access filter](https://docs.omni.co/modeling/topics/parameters/access-filters.md) on the market field and connect it to a [user attribute](https://docs.omni.co/administration/users/attributes). The last step of this guide depends on this filter.
3. In a workbook, create a query on the topic that contains the key fields and the measures to show next to the forecast. Filter it to the months people forecast.
4. Give the tab a name, such as `Forecast input`. The app refers to the query by this name.

### 2. Add the input column

[Add an input column](https://docs.omni.co/analyze-explore/input-columns.md#adding-an-input-column) to the query with these settings:

| Setting | Value in this example | Notes |
| - | - | - |
| **Column name** | `Forecast FC1 2027 EUR` | The label people see. |
| **Data type** | **Number** | Can't be changed later. |
| **Edit mode** | **Published** | People enter values in the published document. |
| **Key columns** | Market, business, and month | Together, these must identify one row. Can't be changed later. If the topic has an access filter, its field is selected for you and can't be removed. |
| **Track edit history** | On | Omni adds columns that record who created and who last edited each row, and when. Can't be turned off later. Refer to [Tracking edit history](https://docs.omni.co/analyze-explore/input-columns.md#edit-history). |
| **Custom table name** | `fc1_2027_forecast` | The name of the table in your data warehouse. Can't be changed later. If you leave it blank, Omni generates a name. |

Each input column is stored in its own table. To collect a reason with each number, add a second input column with the **Text** data type and the same key columns. This example uses `Forecast comment`, with the table name `fc1_2027_forecast_comment`.

Publish the document when both columns exist.

### 3. Check the table in your data warehouse

[Enter a value](https://docs.omni.co/analyze-explore/input-columns.md#editing-values) in the input column and save it. Then query the table in your upload schema:

```sql Read the forecast table theme={null}
select *
from <upload_schema>."fc1_2027_forecast"
order by "omni_updated_at" desc;
```

The table contains these columns:

| Column | Contains |
| - | - |
| One column for each key column, such as `sales_org`, `business`, and `fiscal_month_month` | The key of the row. |
| `forecast_fc1_2027_eur` | The value that was entered. |
| `omni_updated_at`, `omni_updated_by` | When the row was last edited, and the email address of the person who edited it. |
| `omni_created_at`, `omni_created_by` | When the row was first entered, and the email address of the person who entered it. |

> [!NOTE]
>
> Omni creates the table and column names in lower case. In a database that changes unquoted names to upper case, such as Snowflake, put the names in double quotes.

Anyone with access to the schema can query this table without Omni. For example, you can join it to actuals in a dbt model or load it into a planning system.

In Omni, the input column is a field in the query, next to the measures from your topic. It stays editable in each query that contains the key columns. In a query at a different grain, such as market by quarter, it is read-only.

### 4. Build the app

People can enter values in the workbook or on a dashboard. For a planning cycle with many contributors, an app gives them a screen made for the task.

[Create an app](https://docs.omni.co/visualize-present/apps#creating-apps) in the same document. To start from the app in this guide, open [Forecast Desk](https://docs.omni.co/library.md?item=forecast-desk) in the app library. Copy its rebuild prompt into the Omni Agent, or copy its HTML, then follow its setup notes.

To build your own app, describe it to the Omni Agent or edit the HTML yourself. In both cases, the app must do the following:

* Read the `Forecast input` query and show one editable cell for each row.
* Write each changed cell to the input column, with the key values of its row.
* After a write, run the query again and show the value as saved only when it reads back.
* Tell the person when a write fails.

To show who last edited each cell, add the input column's `omni_updated_at` and `omni_updated_by` fields to the `Forecast input` query.

If you edit the HTML yourself, a write is one call. The example below writes one value for Germany, Industrial, January 2027:

```javascript Write a value to the input column theme={null}
const result = await omni
  .query('Forecast input')
  .inputColumn('input_forecast_fc1_2027_eur.forecast_fc1_2027_eur')
  .upsert([
    {
      'plan.sales_org': 'DE01',
      'plan.business': 'Industrial',
      'plan.fiscal_month[month]': '2027-01',
      'input_forecast_fc1_2027_eur.forecast_fc1_2027_eur': 32853000,
    },
  ]);

if (result && result.failed) {
  // Tell the person that the value was not saved.
}

await omni.runQueries(['Forecast input']);
```

When you write to an input column from an app:

* **Send the key fields with each row.** Use the field names and the values that the query returned.
* **Write `null` to clear a cell.** There is no separate delete call.
* **Don't send the edit history fields.** Omni sets them.
* **Send many rows in one call.** `upsert` takes a list of rows.
* **Send only rows that the person can access.** If one row in the call is outside the person's row-level access, Omni refuses the whole call.
* **Wait for the value to read back.** A query run that starts immediately after a write can return the earlier value. Run the query again until the new value appears.

Writes follow the input column's edit mode and the person's row-level access. Refer to [Writing to input columns](https://docs.omni.co/visualize-present/apps#writing-to-input-columns) for more information.

### 5. Add CSV upload

Some people already have their numbers in a spreadsheet. The app can read a CSV file in the browser and write its rows with the same `upsert` call as typed values.

Before the app writes anything, show a preview with three groups of rows:

* **Rows to add**, where no value exists.
* **Rows to overwrite**, with the saved value and the new value side by side.
* **Rows to reject**, each with a reason: a market the person can't access, an unknown business, a month outside the forecast period, or a value that isn't a number.

![An upload preview dialog that lists 50 rows read from a CSV file: 45 to add, 3 that overwrite a saved value with the old and new numbers shown, and 2 rejected with their reasons. An Import 48 rows button is at the bottom.](https://mintcdn.com/omni-e7402367/ke4uidG7_zzR0vER/guides/workbooks/images/forecast-input-app-upload-preview.png?fit=max\&auto=format\&n=ke4uidG7_zzR0vER\&q=85\&s=3cabc33d9ed1f2802c88cc990918c147)

Then write the accepted rows in one `upsert` call. Test with the largest file you expect before you rely on it.

To record where an uploaded number came from, write the file name to the comment column for each uploaded row that has no comment.

### 6. Limit each person to their own rows

The access filter from the first step controls who can read and write each row. The app doesn't need its own permission logic.

* **Reading.** The query returns only the markets that the person's user attribute allows, so the app shows only those markets.
* **Writing.** The access filter field is part of the input column's key, and Omni refuses a write to a row outside the person's row-level access.
* **Uploading.** Build the list of accepted rows from the rows that the query returned. A CSV row for another market then appears in the rejected group.

![The same forecast input app for a person whose access is limited to Germany. The list of markets is replaced by a summary of Germany, and a note says that Omni filters the plan and the forecast table to the person's scope.](https://mintcdn.com/omni-e7402367/ke4uidG7_zzR0vER/guides/workbooks/images/forecast-input-app-single-market.png?fit=max\&auto=format\&n=ke4uidG7_zzR0vER\&q=85\&s=90dba432f9923978472a59917c186e09)

[Share the document](https://docs.omni.co/share.md) with the people who enter forecasts. To check the result, open the app as a user who has access to one market, save a value, and query the table again. The row shows that user's email address in `omni_updated_by`.

## Limitations

* **Edit history records the last change only.** The table shows who last edited each row and when, not earlier values. To keep earlier values, take a snapshot of the table on a schedule in your data warehouse.
* **Some settings are permanent.** You can't change the data type, key columns, or table name, and you can't turn off edit history. To change them, [delete the column](https://docs.omni.co/analyze-explore/input-columns.md#delete-column) and create it again. This also deletes its values.
* **Each input column is one table.** A value and its comment are two tables with the same key.
* **Input columns belong to the workbook.** You can't promote them to the shared model.

## Next steps

* [Input columns](https://docs.omni.co/analyze-explore/input-columns.md) - Edit modes, key columns, and supported data types
* [Writing data from apps](https://docs.omni.co/visualize-present/apps#writing-data) - Input column writes and table writes
* [Access filters](https://docs.omni.co/modeling/topics/parameters/access-filters.md) - Row-level access by user attribute
* [Forecast Desk in the app library](https://docs.omni.co/library.md?item=forecast-desk) - The HTML, setup notes, and rebuild prompt for the app in this guide
