Appearance
Inline table Preview
An inline table is a small table stored in a notebook. You can edit its values directly in a sheet and join them with connection data from a SQL block. Columns can also have formulas, or references that look up values from the results of SQL blocks in the same notebook or from external services (agent connectors).
INFO
This feature is in preview. To request access, contact Codatum support.
Inline table editor
When you open an inline table, the inline table editor appears. Select Show CSV in the view tab row to edit the CSV text. Select a view tab to return to the sheet. Both ways edit the same table.
- In the sheet, you edit cells directly, as in a spreadsheet app. You can set formulas and references on columns.
- With Show CSV, you edit the CSV text and the table definition (YAML) directly. The definition includes columns, data types, the key, formulas, and references.
Use the tabs at the bottom of the editor to switch to another inline table in the same notebook.
Select Go to a SQL block that uses this table in the editor menu to go to a SQL block that references this inline table. From that SQL block's result, you can open Explorer. If no SQL block references the inline table, the editor stays on the current page.
Creating and editing an inline table
You need edit permission on the notebook. When the notebook's lock is set to anything other than Unlocked, the inline table is view-only. Even when it's view-only, you can view the Revision history, go to a SQL block that uses this table, and download the table from the editor menu. You can't write to Google Sheets when it's view-only. Inline tables in a version are view-only.
Creating an inline table in a sheet
- In Inline tables in the left sidebar, open Add, then select Create new under Inline table.
- Select Add column at the right end of the headers.
- Enter Name, Display name (optional), and Data type. SQL and formulas refer to the column by Name.
- Select Add.
- Enter values in the sheet. Use Add row at the end of the table to add rows.
- Select Save.
You can change the data type later with Data type in the column menu.
To enter values in CSV format instead, skip steps 2 to 5, select Show CSV, enter the CSV, and specify each column's data type with type in Definition (YAML).
Creating an inline table from a CSV or Excel file
- In Inline tables in the left sidebar, open Add, then select Upload CSV or Excel under Inline table.
- Select a CSV file (encoded in UTF-8, Shift_JIS, or UTF-16 with a BOM) or an Excel file (.xlsx).
- For an Excel file, specify the following in the dialog that appears, then select Create.
- Sheet: The worksheet to import. Shown when the workbook has two or more worksheets.
- Header row: The number of the row to use as column names. The default is the first row that has values.
The dialog shows the first 20 rows of the table to import and the number of rows and columns. If a header can't be used as a column name (for example, it's empty or duplicated), or the table to import has more than 2,000 rows, an error is shown and you can't create the table.
All columns are created as strings (STRING). To change a data type, use Data type in the column menu of the sheet, or type in the definition (YAML) after you select Show CSV.
An Excel file is imported as follows:
- Rows above the header row, and rows and columns without values, aren't imported.
- Line breaks, tabs, full-width spaces, and consecutive spaces in a header cell become a single half-width space. Leading and trailing spaces are removed.
- Formula cells import the calculated values saved in the file.
- Date cells become
YYYY-MM-DD, and cells that include a time becomeYYYY-MM-DDTHH:MM:SS. Fractions of a second are dropped. Time-only cells and duration cells (date and time values before March 1, 1900) becomeHH:MM:SS, and the hours can exceed 24 (such as25:00:00). - Number cells import the digits of the value saved in the file. Exponential notation (such as
1.2E+19) is expanded into digits, and trailing zeros after the decimal point are removed (12000.0becomes12000). - Text cells, including values with leading zeros, are imported as they are.
- Boolean cells become
trueorfalse. - Error cells (such as
#N/Aand#DIV/0!) become empty. - In merged cells, only the top-left cell has a value, and the other cells are empty.
Creating an inline table from a query result
You can save the result of a SQL block as an inline table. Referencing it from SQL on another connection lets you join data across connections. You need execute permission on the connection.
- Run SQL in a SQL block.
- Select the Save result as inline table icon at the top right of the SQL block.
- Enter a name.
- Select an option under How to keep the data.
- If you select Reference this SQL block, select the Key columns.
- Select Save.
The icon appears once you run the SQL and the result is displayed. If the block already has linked inline tables, select the Inline tables icon, then select Save result as inline table. On mobile, select it from the menu at the top right.
If a column in the displayed result has a value in every row without duplicates, Reference this SQL block is selected under How to keep the data, and that column under Key columns, from the start.
| How to keep the data | Description |
|---|---|
| Reference this SQL block | Rows are matched by the key columns, and the other columns reference this block. Columns you add by hand or with formulas stay when you refresh the references. |
| Copy the values | Saves the values of the result. Later, you can re-run this block with refresh and replace the whole inline table with the new result. Use this when no columns identify each row. |
With Reference this SQL block, every row needs a value in the key columns, and no two rows can share the same key. You can't save the result if a key column is empty in some row or if two rows have the same key.
You can open an inline table saved from a query result from the Inline tables icon at the top right of the SQL block. Selecting the icon shows the list of linked inline tables. If only one inline table is linked and you can't save the result (for example, there is no result or you don't have edit permission), that inline table opens directly. You can link multiple inline tables to one SQL block.
You can save results with up to 2,000 rows. You can't save results from PostgreSQL, ClickHouse, or SQLite. You can't save results that contain columns whose types aren't supported as inline table data types, such as ARRAY or STRUCT. Cast them in the SQL to save the result.
An inline table belongs to its notebook. You can change its name and content from the inline table editor.
Creating an inline table from a connector
You can create an inline table from a table in an external service that you can read with a connector reference. You can create either an inline table that references the source or an inline table with a copy of the values.
You need the same things as for a connector reference.
- In Inline tables in the left sidebar, open Add, then select Create from connector under Inline table.
- Select How to keep the data.
- Select the Connector.
- Select the source. You select it in the same way as for a connector reference.
- If you select Reference the source, select the columns that identify each row in Key columns.
- In Columns, select the columns to include in the inline table.
- Check the Name.
- Select Create.
When you create the table, Codatum reads the source with the connector access that you can use, and the inline table opens with its values filled in.
| How to keep the data | Description |
|---|---|
| Reference the source | Selected by default. Rows are matched by the key columns, and the other columns reference the source. The rows follow the rows of the source and are added or removed when you refresh the source. Columns you add by hand or with formulas stay when you refresh. |
| Copy the values | Saves the values that were read as they are. The inline table has no source, and you can't read the source again. You don't choose key columns. |
- For kintone,
$idis selected in Key columns by default. For Notion,page_idis selected. For Google Sheets and files, you select the key columns yourself. - All columns are selected in Columns by default. The checkbox above the list selects or clears them together. Its label is Clear all when every column is selected, and Select all otherwise. With Reference the source, you can't clear the key columns. Clear all clears every column except the key columns.
- The default Name is the source name shown in Settings (the spreadsheet or file name with the sheet name, the app name, or the data source name). For kintone, if you enter kintone query (optional), " (query)" is added after the app name.
- Each column gets the data type read as described in Connector source columns and rows. A column that contains values that don't match its type becomes a string (STRING) column.
- With Reference the source, rows with an empty key column don't become rows of the inline table.
- With Copy the values, the rows that were read become rows of the inline table as they are. However, rows where all the included columns are empty don't become rows of the inline table.
You can't create the table in the following cases. The dialog shows the reason, and it disappears when you select the source or columns again.
- With Reference the source, the source has multiple rows with the same key. However, if the only column you include is the key columns, rows with the same key are merged into one row.
- With Reference the source, the source has rows, but none of them has a value in the key columns.
- The source has more than 2,000 rows.
- You select more than 100 columns.
- The source can't be read (for example, you aren't a user of the connector, or your account isn't connected to a personal auth connector).
For the limits, see Limits.
Creating an inline table with the AI agent
You can ask the AI agent to create inline tables from the chat. It can also save a SQL result, a tool result from an agent connector, or a CSV, TSV, JSON, or Excel file attached to the chat directly as an inline table, without pasting the data back into the chat.
- When the agent saves a SQL result, each column gets the data type of the corresponding result column.
- When the agent saves a tool result or an attached file, the data is converted into a table, and column data types are inferred from the values.
- Inline tables saved by the AI agent aren't linked to a SQL block, so you can't refresh them.
Setting a formula
A formula on a column calculates that column's values from other columns. You set a formula on a column, not on a cell, and it applies to every row in the column.
- In the sheet, select a cell in the column.
- Type
=followed by an expression. A formula editor opens over the cell and suggests columns and explains functions. You can also start with=in the formula bar. - Press
Enter.
You can also enter an expression in Formula in the column menu and select Apply. In the column menu, enter the expression without =.
- When you select a cell that uses the formula value, the formula bar shows the column's formula starting with
=. PressEnterorF2, or double-click the cell, to edit the formula in the formula editor over the cell. The change applies to every row in the column. - If you type in the formula bar without starting with
=, only that cell uses the manual value. In a cell that uses the formula value, select the manual icon in the formula bar to start entering a manual value for that cell. - When you set a formula on a column that doesn't have one and the column has manual values, choose whether to replace them with the formula (Replace) or keep them (Keep manual values). Kept manual values take precedence over the formula.
- In a column with a reference, the formula gives the value for rows that have no match in the source.
- Press
Escto cancel editing.
For formula syntax and calculation rules, see Formulas.
Looking up values from a SQL block
A reference on a column looks up values from the result of a SQL block in the same notebook, matching rows by the key. You need the following:
- Edit permission on the notebook. You can use this only when the notebook's lock is set to Unlocked.
- Execute permission on the connection of the source SQL block.
- Key columns that identify each row. Tables without a key can't use references.
- To the left of Save, select Settings.
- Under Key, select the columns that identify each row.
- Select Apply.
- Select the header of the column that should receive values.
- Open Reference in the column menu.
- In Source, choose the SQL block to look up under Add a SQL block as a source. To use a source you've already added, choose it under Sources.
- When adding a new source, under Match rows by, choose the SQL block column that has the same values as each key column of this table. A column with the same name is selected by default.
- Select Column in the source.
- Select Apply.
- Select the refresh icon for that source at the right end of the view tab row. You can also reopen Reference in the column menu and select Refresh this reference.
- Select Save.
A column whose reference was set or changed and hasn't been refreshed since has no values yet. The reference icon in its header and that source at the right end of the view tab row are shown in a warning color, and the number of such columns is shown as references not refreshed at the bottom of the sheet. Select it to refresh the sources of those columns. Changing the key column mapping of a source, or the table's key columns, also marks the columns that use references as not refreshed.
You can also refresh each source with Refresh this source in Settings. For how sources are shown and refreshed, see References.
Looking up values from a connector
When you use an agent connector as a source, you can look up values from a table in an external service, matching rows by the key. You can use the following connectors as sources.
| Connector | Source file |
|---|---|
| Google Sheets (API, MCP) | A sheet in a Google Sheets spreadsheet. |
| Google Drive (API, MCP) | A .csv file, or a worksheet in an .xlsx file or a Google Sheets spreadsheet, in Google Drive. |
| kintone (API) | The records of a kintone app. |
| Notion (API) | A Notion data source (a table in a database). |
The only MCP connectors you can use as sources are Google Sheets and Google Drive. You choose sources the same way as with the API connectors, and they're read with the OAuth authentication of the connector (your account connected to it). The OAuth scopes used to read are https://www.googleapis.com/auth/spreadsheets for Google Sheets and https://www.googleapis.com/auth/drive.readonly for Google Drive. For Notion, use the API connector, not the MCP connector.
To check whether a connector supports inline tables, see Inline table support for agent connectors.
You need the following:
- Edit permission on the notebook. You can use this only when the notebook's lock is set to Unlocked.
- You're a user of the connector. No AI profile permission is needed.
- For a personal auth connector, your account connected to it. Connect it in Connector authentication.
- For a shared auth Google Sheets or Google Drive connector, the target file shared with the service account of the connector.
- For a Google Sheets or Google Drive MCP connector, the Google Sheets API (for Google Drive, the Google Drive API) enabled in the Google Cloud project of the connector's own OAuth app.
- For kintone, an API token issued in the target app with the permission to view records, set in the connector.
- For Notion, the target database shared with the internal connection of the connector.
- Key columns that identify each row.
- To the left of Save, select Settings.
- Under Key, select the columns that identify each row.
- Select Apply.
- In the selector for adding a source under Sources, choose a connector under Connectors. Personal auth connectors that your account isn't connected to show Connection required.
- Choose the source. How you choose it depends on the connector (see the table below).
- Under Match rows by, choose the Source column that has the same values as each key column of this table. A column with the same name is selected by default.
- Select Add source.
- Select the header of the column that should receive values.
- In Reference in the column menu, choose the Source and the Column in the source.
- Select Apply.
- In Reference in the column menu, select Refresh this reference.
- Select Save.
| Connector | Choosing the source |
|---|---|
| Google Sheets (API, MCP) | In Spreadsheet, enter the URL or ID of the spreadsheet and select Load. Then choose the sheet in Sheet in (spreadsheet name). |
| Google Drive (API, MCP) | Choose a file from the File (.csv / .xlsx / Google Sheets) list, or enter the URL, ID, or name of the file and select Load. The list shows up to 100 .csv and .xlsx files and Google Sheets spreadsheets, most recently modified first. When you enter a name, files that have a word in the name beginning with what you entered are listed. Matching doesn't start in the middle of a word. For an .xlsx file or a Google Sheets spreadsheet, choose the worksheet in Worksheet in (file name). |
| kintone (API) | Choose an app from the App list, or enter the URL or ID of the app and select Load. If the API token of the connector can't read the list of apps, the list isn't shown. The list shows only the first 1,000 apps; to use any other app, enter its URL or ID. To filter records, enter the conditions of a kintone query in kintone query (optional). |
| Notion (API) | Choose a data source from the Data source list, or enter the URL of a database, the ID of a data source, or a name and select Load. The list shows only the first 1,000 data sources shared with the connector. When you enter a name, all data sources shared with the connector are searched by name with Notion search. A data source may not be found from characters in the middle of its name. If the database has several data sources, or several data sources are found by name, choose one from the list. |
You can add the sheet, file, app, or data source that a source points to (the source file) to a table only when that source file can be read with the connector authentication available to you. This is checked when you add a source or change its source file to another one. If the source file can't be read, the inline table isn't saved, and the reason is shown. Changing the Column in the source, rows, keys, and other settings within a source file that's already in the table isn't checked. Reverting to a revision, restoring a version, and copying a notebook aren't checked either, because they only carry over source files already in the table, so they work even if the connector has been deleted.
As a result, once a source file is added to a table, editors of the notebook can change which of its columns and rows the table references. The columns, rows, and keys that an editor sets are read with the authentication of someone who can read the source file when that person refreshes it, and the values come into the table. This follows the same idea as a SQL block on a connection: an editor can change the SQL to query any table of the connection, and the results come in when someone with execute permission runs it.
For how columns and rows are read, see Connector source columns and rows.
For how connector sources are refreshed, see References.
Refreshing an inline table
For an inline table saved with Copy the values from the result of a SQL block, you can update its data by re-running the linked SQL block. To change the query, edit the linked SQL block. For an inline table saved with Reference this SQL block, and to look up values again from the sources of a sheet, see Looking up values from a SQL block.
To go to the linked SQL block, select the Go to the linked SQL block icon in the Inline tables list in the left sidebar, or select Go to the linked SQL block in the inline table editor.
- Open the inline table editor.
- Select Refresh.
Refresh runs with the following specification:
- SQL runs with the permissions of the user who refreshed. You need execute permission on the connection.
- SQL always runs again without using cached results.
- If the SQL uses parameters, they're resolved with the values saved on the page.
- The result is saved as a new revision.
- If you have unsaved changes, you're asked whether to discard them before the refresh.
If the linked SQL block was deleted or the SQL fails, the refresh fails and the inline table content doesn't change. You can't refresh when the linked SQL block references this inline table itself.
Refresh replaces the CSV values. Sheet settings are kept, and the table is handled as described in CSV changes outside the sheet.
If the refreshed result doesn't match the sheet settings (you added columns or changed data types in the sheet, or the key becomes empty or duplicated), a confirmation is shown, and refreshing removes the sheet settings (formulas, notes, views, and so on). To keep columns added in the sheet, create the table with Reference this SQL block. If the removed settings were saved, you can restore them from the revision history.
Revisions
Each time you save or refresh an inline table, its content at that point is recorded as a revision. A revision includes the CSV, the column data types, and the sheet settings. You can revert to a past revision as follows:
- Open the menu in the inline table editor, then select Revision history.
- Select Revert to this revision on the revision you want to restore.
Reverting saves the content of the selected revision as a new revision. The sheet settings also return to the state of the selected revision. Later revisions aren't deleted by reverting.
Old revisions that aren't referenced from anywhere might be deleted automatically. The 5 most recent revisions of each inline table and revisions referenced from versions and other resources are retained.
Downloading an inline table
You can download the values of an inline table as a CSV file or an Excel file (.xlsx).
- Open the menu in the inline table editor, then select Download as CSV or Download as Excel (.xlsx).
Downloads work as follows:
- The download contains the current values in the editor, including unsaved changes. In the sheet, formula and reference columns contain the calculated values.
- Sorting, filters, and grouping in views aren't applied. All rows and columns are written in the CSV row order.
- The file name is the inline table name. Characters that can't be used in file names are replaced with
_. - The CSV uses UTF-8 with a BOM.
- In the Excel file, number, boolean, date, and datetime columns become cells of those types. Fractional seconds in datetimes are truncated. TIMESTAMP columns and values that Excel can't hold (integers with 16 or more digits, and dates and datetimes before March 1, 1900) become text cells. The sheet name is the inline table name. Characters that can't be used in Excel sheet names are replaced with
_, and the name is cut to 31 characters. - If a text value exceeds the limit of 32,767 characters per cell, the table can't be downloaded as an Excel file. The message shows the column and row, so download it as CSV instead. For details, see Limits.
Writing to Google Sheets
You can write the saved values of an inline table to a sheet in a Google Sheets spreadsheet. You either overwrite an existing sheet or add a sheet to the spreadsheet.
You can write with the MCP version of Google Sheets, or with Google Sheets (API) with shared (service account) authentication. Either way, you need edit permission on the notebook and to be a User of the connector. You can't write when the notebook's lock is set to anything other than Unlocked.
With the MCP version of Google Sheets, writing uses the permissions of your Google account connected to the connector. No permission from the connector admin is needed. Your connected Google account needs edit access to the destination spreadsheet.
With Google Sheets (API) with shared authentication, writing uses the connector's shared credentials. You also need the following:
- Allow writing from inline tables turned on by the connector admin in the connector settings (off by default)
- The destination spreadsheet shared with the connector's service account as an Editor
Google Sheets (API) connectors with personal authentication are read-only and can't be used for writing.
- Open the menu in the inline table editor, then select Write to Google Sheets.
- Select a Connector.
- Enter the URL or ID of the spreadsheet.
- Select Load.
- Select Overwrite an existing sheet or Add a sheet.
- To overwrite, select the sheet. To add a sheet, enter the Sheet name.
- Select Overwrite sheet or Add sheet.
- If you're overwriting, select Overwrite sheet again in the confirmation dialog.
Writing works as follows:
- The saved values are written. If you have unsaved changes, nothing is written. Save them first, then write. If someone else saved the table after you opened it, nothing is written. Reload the table, then write it again.
- Column names are written in the first row, and rows start from the second row. Sorting, filters, and grouping in views aren't applied. All rows and columns are written in the CSV row order. In the sheet, formula and reference columns contain the calculated values.
- Number, boolean, date, and datetime columns become cells of those types. Dates use the
yyyy-mm-ddformat, and datetimes use theyyyy-mm-dd hh:mm:ssformat. Fractional seconds in datetimes are truncated. TIMESTAMP columns, integers with 16 or more digits, and dates and datetimes before March 1, 1900 become text cells. - String values become text cells. Values that start with
=don't become formulas, and values such as00123don't become numbers. - Overwrite an existing sheet clears all values in the sheet before writing. Formatting such as cell colors is kept. The number format of each written cell is set again to match the value type. If the sheet doesn't have enough rows or columns, rows and columns are added to the sheet. Overwriting can't be undone.
- Add a sheet adds a sheet at the end of the spreadsheet. If the inline table has rows, the first row is frozen. You can't add a sheet if a sheet with the same name exists, including a name that differs only in case.
- A cell can hold up to 50,000 characters. The table can have up to 1 million cells (rows, excluding the column name row, × columns). After writing, the spreadsheet can have up to 10 million cells. If any of these limits is exceeded, nothing is written. For details, see Limits.
- Even within 1 million cells, nothing is written if the data to send is larger than about 70MB. Dates, datetimes, and long strings take more space than short values.
- A large table can take a long time to write, and Codatum might report that it couldn't confirm the result. If writing a large table fails partway, the sheet contains the rows written before the failure. Overwrite the sheet again.
- If Codatum can't confirm the result, for example because Google Sheets doesn't respond in time, it says so instead of reporting a failure. The values may have been written, so open the spreadsheet and check it before writing again. Writing isn't retried automatically.
Referencing an inline table from SQL
Enter /inline-table/ in a SQL block and select an inline table. Inline tables are supported in SQL for BigQuery, Snowflake, Databricks, and Redshift.
Select an inline table reference to change its Alias. Turn off Assign alias to the end to use an AS clause entered directly in the SQL.
SQL reads the values of the saved CSV. Values calculated by formulas and references in the sheet are written to the CSV as of the last save.
Inline table values are included in the SQL sent for execution. The values might also appear in query history for the connection.
Deleting an inline table doesn't remove its references from SQL blocks. A reference to a deleted inline table becomes unresolved, and you can't run that SQL.
Sheet specification
Cell value priority
Each cell in the sheet takes the highest-priority value of the following three.
| Priority | Value | Description |
|---|---|---|
| 1 | Reference | The value looked up by key from the source (the result of a SQL block, or a connector). If the source has no matching row, the next value is used. |
| 2 | Manual | The value you entered in the cell. |
| 3 | Formula | The value calculated by the column formula. For a numeric parent column without a formula, it's the sum of the numeric child columns. |
- When you turn on Let manual values override the reference in Reference in the column menu, manual values take precedence over the reference in that column.
- When you enter a value in a cell that uses the reference value, you're asked whether to turn on Let manual values override the reference for the column. Select Override and enter to turn it on and enter the value. Only the cells with manual values change; other rows keep the reference value.
- When you type in a cell of a formula column without starting with
=, only that cell uses the manual value. When you select a cell that uses a manual value, select Back to formula (Back to reference in a reference column) at the right of the formula bar to clear it. - When you select a cell, the area above the sheet shows which value is used. Select the Cell details and note icon at the right end above the sheet, or right-click a cell and select Details and note, to see the reference, manual, and formula values and which one is used.
- You can add a note to a cell that has a manual value.
Key
A key is a set of columns that identifies each row. You set it in Key in Settings, and you can combine multiple columns. You can also use Add to key and Remove from key in the column menu.
- Only columns without a reference, formula, or parent-child relationship can be key columns. Folder columns can't be key columns.
- When you add a date (DATE) column with Add to key in the column menu and the table has no period, the column becomes a period with the Month grain.
- You can't set a key when any row has an empty or duplicate key value.
- You can't edit cells in key columns. To change them, add or delete rows.
- A table without a key identifies rows by their order. Tables without a key can't use references or periods.
Formulas
A formula is an expression that applies to every row of a column. Each row is calculated from the column values in the same row. Example: $clicks / NULLIF($impressions, 0)
Syntax
| Syntax | Description |
|---|---|
$name | The value of a column in the same row. Use this form when the column's name contains only letters, digits, and _. |
${name} | The value of a column in the same row. Use this form for names that contain spaces or symbols. Write } inside the name as }}. |
123 1.5 | Numbers. |
'text' | Text. Write ' inside text as ''. |
DATE '2026-04-01' TIMESTAMP '2026-04-01 09:00:00' | A date or a timestamp. With an offset (-14:00 to +14:00) such as TIMESTAMP '2026-04-01 09:00:00+09:00', it's treated as the UTC time. |
TRUE FALSE NULL | True, false, and empty. |
+ - * / | Arithmetic. |
|| | Joins text. |
= <> != < > <= >= | Comparisons. <> and != mean not equal. |
AND OR NOT | Combine conditions. |
IN (…) BETWEEN … AND … LIKE IS NULL | Matches one of the values, is within a range (inclusive), matches a pattern (% is any text), or is empty. |
CASE WHEN … THEN … ELSE … END | Chooses a value by conditions, checked from the top. |
INTERVAL 1 MONTH | An interval to add to a date. The unit is DAY, WEEK, MONTH, QUARTER, or YEAR. |
Neighboring rows and total
| Syntax | Description | Example |
|---|---|---|
PREV($column) | The value in the previous period's row among rows with the same non-period key values. PREV($column, n) returns the value n periods before (n is 1 to 1000). In a table without a period, it returns the value n rows before in row order. If there is no previous period's row (the first period or a missing period), the value is empty, or 0 in a numeric column. If a period has more than one row, it uses the row with the latest period value. | PREV($balance) + $change |
TOTAL($column) | The sum of all rows in the column. Same as SUM($column). | $spend / TOTAL($spend) |
RUNNING_SUM($column) | The running total up to this row, in the same order as PREV. | RUNNING_SUM($sales) |
MOVING_AVG($column, n) | The average of the last n rows including this row (n is 1 to 1000), in the same order as PREV. | MOVING_AVG($sales, 3) |
NEXT($column) | The value in the next row. NEXT($column, n) returns the value n rows later (n is 1 to 1000). Uses the same order as PREV. Empty if there is no later row or the next row's value is empty. | NEXT($plan) - $plan |
The same order as PREV means the period order among rows with the same non-period key values in a table with a period, and row order otherwise. PREV counts periods, so it doesn't find the period before a missing period. NEXT, RUNNING_SUM, and MOVING_AVG count rows, so they skip a missing period and use the next row. Like aggregates over rows, RUNNING_SUM, MOVING_AVG, and NEXT can be narrowed with WITHIN $column.
Aggregates over rows
Aggregate functions calculate over the rows of a column and put the result in each row. No rows or columns are added. For example, SUM($amount) puts the same total in every row.
Add WITHIN $column after the arguments of an aggregate to calculate over the rows with the same value as each row. For example, SUM($amount WITHIN $dept) puts the total of the rows in the same department in each row. To narrow by several columns, write WITHIN $dept, $year.
| Function | Description | Example |
|---|---|---|
SUM(value) | The sum. | $amount / SUM($amount WITHIN $dept) |
AVG(value) | The average. | $score - AVG($score WITHIN $team) |
MIN(value) / MAX(value) | The smallest or largest value. | $sales / MAX($sales) |
MEDIAN(value) | The median. | $price - MEDIAN($price WITHIN $category) |
COUNT(value) | The number of rows where the value isn't empty. | COUNT($customer_id WITHIN $owner) |
SUMIF(value, condition) | The sum over the rows that match the condition. | SUMIF($amount, $stage = 'won' WITHIN $owner) |
AVGIF(value, condition) | The average over the rows that match the condition. | AVGIF($lead_time, $status = 'done') |
COUNTIF(condition) | The number of rows that match the condition. | COUNTIF($status = 'open' WITHIN $owner) |
RANK(value) | The rank, largest first (1 is the largest). Rows with the same value share a rank. | RANK($sales WITHIN $region) |
- Aggregates are calculated over all rows of the table. Filtering the sheet doesn't change what they include.
- Aggregates don't count empty values.
AVGaverages the rows that aren't empty, andRANKdoesn't rank empty rows. - You can't put an aggregate,
PREV, orTOTALinside an aggregate.
Functions
Function names are case-insensitive. Arguments in [ ] are optional.
| Function | Description | Example |
|---|---|---|
ROUND(value, [digits]) | Rounds a number. digits is the number of decimal places. It defaults to 0, and negative values round to tens, hundreds, and so on. | ROUND($price * 1.1, -1) |
FLOOR(value) | Rounds down to an integer. | FLOOR($hours) |
CEIL(value) | Rounds up to an integer. Also written as CEILING. | CEIL($stock / $per_box) |
ABS(value) | The absolute value. | ABS($actual - $budget) |
POWER(base, exponent) | Raises a number to a power. Empty if the result is too large. | POWER(1 + $rate, 12) |
SQRT(value) | The square root. Empty for negative numbers. | SQRT($lead_time) |
EXP(value) | e raised to the value. Empty if the result is too large. | EXP($rate) |
LN(value) | The natural logarithm. Empty for 0 or less. | LN($value) |
LOG(value) / LOG(base, value) | The logarithm. With one argument, the base is 10. With two, the first is the base. Empty for 0 or less. | LOG($value) |
GREATEST(value, …) | The largest of the values. Empty values are ignored. | GREATEST($stock - $reserved, 0) |
LEAST(value, …) | The smallest of the values. Empty values are ignored. | LEAST($achievement, 1.3) |
IF(condition, then, else) | then when the condition is true, else otherwise. | IF($billing = 'annual', $price * 12, $price) |
COALESCE(value, …) | The first value that is not empty. | COALESCE($discount, 0) |
NULLIF(value, empty_if) | Empty when the two values are equal. Use it to avoid dividing by 0. | $clicks / NULLIF($impressions, 0) |
CONCAT(value, …) | Joins values as text. Empty values are skipped. | CONCAT($last_name, ' ', $first_name) |
UPPER(text) / LOWER(text) | Converts to uppercase or lowercase. | UPPER($code) |
TRIM(text) | Removes spaces at both ends. | TRIM($name) |
LENGTH(text) | The number of characters. | LENGTH($comment) |
LEFT(text, count) / RIGHT(text, count) | The first or last characters. | LEFT($code, 3) |
SUBSTRING(text, start, [length]) | Part of the text. start is 1 for the first character, and omitting length takes the rest. Also written as SUBSTR. | SUBSTRING($code, 2, 3) |
CONTAINS(text, search) | Whether the text contains the search text (true or false). | CONTAINS($email, '@example.com') |
STARTS_WITH(text, prefix) | Whether the text starts with the prefix (true or false). | STARTS_WITH($code, 'JP') |
YEAR(date) / QUARTER(date) / MONTH(date) / DAY(date) | The year, calendar quarter (1-4), month, or day of a date. | YEAR($close_date) |
FISCAL_YEAR(date) / FISCAL_QUARTER(date) | The fiscal year (the year it starts) and fiscal quarter (1-4), using the fiscal year start month of the period. With an April start, March 2026 is Q4 of fiscal year 2025. Tables without a period use a January start. | FISCAL_YEAR($month) |
DATE_DIFF(unit, start, end) | The number of days, months, and so on between two dates. unit is 'day', 'week', 'month', 'quarter', or 'year'. Also written as DATEDIFF. | DATE_DIFF('day', $start_date, $end_date) |
DATE_ADD(date, interval) | Adds an interval to a date. | DATE_ADD($start_date, INTERVAL 30 DAY) |
DATE_TRUNC(unit, date) | Truncates a date to the start of a month, quarter, and so on. unit is the same as in DATE_DIFF. | DATE_TRUNC('month', $order_date) |
STRFTIME(date, format) | Formats a date as text. The format can use %Y (year), %m (month), %d (day), %H (hour), %M (minute), %S (second), and others. | STRFTIME($month, '%Y/%m') |
CAST(value AS type) | Converts a value to another type. type is VARCHAR, DOUBLE, BIGINT, INTEGER, BOOLEAN, DATE, or TIMESTAMP. Values that can't be converted become empty. | CAST($code AS INTEGER) |
Calculation rules
- In a formula, empty values in numeric columns are treated as 0 when used in calculations and comparisons. Aggregations (
SUM,AVG,COUNT,MIN,MAX, and so on) don't count empty values. Also, empty values stay empty when a column is passed as is toCOALESCE,GREATEST,LEAST, orCONCAT, and when you check it with$column IS NULL. - Rows that can't be calculated, such as dividing by 0, taking the logarithm of 0 or less, exceeding the integer range, or producing a date outside the years 1 to 9999, are empty. Other rows are still calculated.
- A decimal result in an integer column is rounded half away from zero (
2.5becomes 3, and-2.5becomes -3). - A wrong number of function arguments, an unsupported unit in
DATE_TRUNCorDATE_DIFF, an unsupported format inSTRFTIME, a formula that ends with a keyword such asANDor an operator, andCASTwithoutAS typecause an error as you type. - If a change to a formula, the key, a data type, or similar makes the whole table impossible to calculate, the change is undone and the reason is shown. Press
⌘⇧Z/Ctrl+Shift+Zto redo it. - A column's own value can be used only inside
PREV. Using it inTOTALor an aggregate such asSUMwould make the column depend on itself, so it isn't allowed. - If you leave the formula of a numeric parent column empty, it becomes the sum of its numeric child columns. Non-numeric child columns aren't included in the sum.
- Folder columns can't be used in formulas.
- When you change a column's name, formulas that use the column are updated automatically.
- You can't delete a column that's used in a formula.
- A formula can be up to 2,000 characters.
- If a column with manual values gets a formula, the manual values still take precedence. To clear them, turn on Clear manual values and use the formula and apply.
Input assistance
The formula input helps you write formulas as follows.
- Below the input, the basics of the syntax and example formulas that use this table's columns are shown.
- Type
$to see column suggestions, or type a name to see function, keyword, and column suggestions. Press⌃Space/Ctrl+Spaceto show suggestions at any time. The selected suggestion is described on the right. - Inside a function's parentheses, the function's syntax and a description of the current argument appear below the input.
- Columns used in the formula are tinted in the sheet. Hover over a column in the formula or in Uses to highlight it further and show its details in a tooltip.
- Columns that don't exist, functions that can't be used, and errors in the expression are underlined with a wavy line.
- Type
/func/followed by words to search functions by name, description, or common terms (such as "moving average" or "cumulative"), in English or Japanese. Type/var/followed by words to search columns by name or display name. Type just/to see these two options. - Select Open syntax and functions to show the syntax, calculation rules, common examples, and the list of functions below the formula help, where you can scroll through them while you type the formula. You can search functions, and select Insert to insert a function at the cursor in the formula.
- Press
⌘Enter/Ctrl+Enterto apply.
References
Set the following items in Reference in the column menu.
| Item | Description |
|---|---|
| Source | The SQL block or connector to look up values from. Choose a source you added, or a SQL block under Add a SQL block as a source. When you add a new one, also set Match rows by. Connector sources are added in Settings. |
| Column in the source | Choose from the columns of the source result. If the source result has a column with the same name as the column you're setting, that column is selected from the start. If the columns of the source can't be read, enter the column name. |
| When the source has several rows for a key | The default is Expect one row (error if several), and cells that match several rows show an error. Select Any one of them to use the value of one of the matching rows. Which row is used isn't defined, so use it when the matching rows have the same value (for example, a customer name repeated on detail rows). Select Count, Sum, Max, or Min to aggregate the matching rows. Not available for connector sources, which always expect one row. |
| Let manual values override the reference | When turned on, manual values take precedence over reference values in the column. |
To stop using the reference, select None (do not look up) in Source, then select Apply.
At the right end of the view tab row, Sources is followed by each source's name and a refresh icon. The name is the name of the SQL block for a SQL block source. For a connector source, it's the names of the spreadsheet and the sheet, the Google Drive file (for .xlsx and Google Sheets, the file and the worksheet), the kintone app, or the Notion data source. Select the name of a SQL block to open it. Select the refresh icon to refresh references from that source. Add and edit sources under Sources in Settings.
In Sources in Settings, for each column under Key in this table, choose the corresponding SQL block column (Source column for a connector source).
SQL block sources are refreshed as follows:
- The SQL of the source SQL block runs with the permissions of the user who refreshed. You need execute permission on the source connection.
- SQL always runs again without using cached results.
- If the SQL uses parameters, they're resolved with the values saved on the page.
- The result is applied to the sheet but isn't saved. Select Save to save it as a new revision.
- If some sources fail to refresh, the results of the successful sources are still applied.
- If you change settings such as the key, sources, or columns during a refresh, the result isn't applied. Refresh again.
- You can't refresh when the source SQL block references this inline table itself.
- If a query doesn't finish in time, the refresh of that source fails and the running query is canceled.
Connector sources are refreshed as follows:
- The source is read with the connector authentication available to the person who refreshes. A shared auth connector uses its shared credentials, and a personal auth connector uses the connection of the person who refreshes.
- If people can see different data, the result depends on who refreshes. The source in Settings shows the last refresh time and who refreshed.
- The last refresh time and the person show the last time values were read from the source. If you change the CSV values afterward, they stay as they were.
- If your account isn't connected to a personal auth connector, the refresh of that source fails. Connect it with Open connector authentication on the source in Settings.
- If you aren't a user of the connector, or the connector is disabled, the refresh of that source fails.
- If the source has more than 2,000 rows, the refresh of that source fails. For kintone, you can filter the records to 2,000 rows or fewer with kintone query (optional).
- Values are converted to the data type of the table column. Cells with values that can't be converted show an error. If a key value can't be converted, the refresh of that source fails. For how string values are read, see Connector source columns and rows.
When you select Match the rows of (SQL block name) (refreshing adds and removes rows; manual values are kept) in Rows in Settings, each refresh adds and removes rows to match the keys in the source result. For a connector source, the option is shown as Match the rows of (source name) (refreshing adds and removes rows; manual values are kept), and the rows follow the order of the source rows (Connector source columns and rows). If the refresh of that source fails, no rows are added or removed and the row order doesn't change.
Manual values in removed rows are kept and are used again if a row with the same key returns. Up to the 5,000 most recent are kept.
Connector source columns and rows
Each connector reads the columns and rows of a source as follows.
| Connector | Columns | Row order |
|---|---|---|
| Google Sheets (API, MCP) | The first row of the sheet is read as column names, and the rows after it are read as rows. Empty rows aren't read. | The order of the sheet. |
| Google Drive (API, MCP) | The first row of the file (for .xlsx and Google Sheets, the worksheet) is read as column names, and the rows after it are read as rows. Empty rows aren't read. | The order of the file. |
| kintone (API) | Field codes are used as column names. The first column, $id, contains the record number. | Ascending record number. |
| Notion (API) | Property names are used as column names. The first column, page_id, contains the ID of the page. | Ascending page creation time. |
The kintone $id and the Notion page_id don't change unless the record or page is recreated, so you can use them to match keys. Multiple values (check boxes, user selections, multi-selects, and so on) are read as one string separated by , (a comma and a space). For every connector, leading and trailing spaces are removed from column names, and ", `, \, and control characters such as line breaks and tabs in column names are replaced with _.
String values from the source aren't read as numbers or dates if they contain commas, spaces in the middle, currency symbols (¥ or $), or %, or if they're dates with only the year and month (2026-04). However, numbers with correct thousands separators (1,234 or 12,345.6) are read as numbers without the separators. This way, multiple values separated by a comma and a space, such as 1200, 800, aren't read as one number. This rule applies when values from the source are converted to the data type of the table column, and when the type of values is inferred.
For Google Sheets and Google Drive columns, and for Notion date, formula, rollup, and ID columns, the type of each column is inferred from the values read. Every connector uses the same rules, and the type is the one that all non-empty values in the column fit.
- Boolean (BOOLEAN) if all values are
true/false(case-insensitive). - Integer (INTEGER) if all values are integers, and float (FLOAT) for integers and decimals. Numbers with leading zeros (such as
00123), numbers that start with+, numbers with leading or trailing spaces, and exponent notation such as1e3aren't read as numbers. A column with integers too large for INTEGER is read as strings (STRING). - Date (DATE) if all values are
YYYY-MM-DDorYYYY/MM/DD(the month and day can be one digit). Formats such as4/1/2026aren't read as dates. - Datetime (DATETIME) for datetimes without a time zone offset such as
YYYY-MM-DD HH:MM:SS(the separator can be/orT, and the seconds can be omitted), alone or mixed with dates. Dates become datetimes at midnight. - Timestamp (TIMESTAMP) if all values are datetimes with a time zone offset (such as
2024-05-10T09:15:25.022Zor2024-05-10 18:15:25+09:00). A column that mixes datetimes with and without an offset is read as strings. - String (STRING) for columns with any other values, and for columns whose values are all empty.
Google Sheets (API, MCP)
- Only Google Sheets files can be read. Add .csv and .xlsx files in Google Drive with the Google Drive connector.
- A column whose first row is empty gets the sheet's column letter (such as
C) as its name. If several columns have the same name, including names that differ only in case, the second and later ones get a suffix such as_2. - Numbers are read without the cell's display format (thousands separators, currency, percent, and so on). For example,
15%is read as0.15and¥1,200as1200. - The type of each column is inferred with the rules above. Number and boolean cells are read as numbers and booleans, and text cells are read from how they're written.
- Date, datetime, and time cells are read by the type of the cell's number format, regardless of the display format or the spreadsheet's locale. Cells with a date format become
YYYY-MM-DD, and cells with a datetime format becomeYYYY-MM-DDTHH:MM:SS(fractions of a second are rounded to the nearest second), so columns displayed as4/1/2026or2026年4月1日are also read as dates (DATE) and datetimes (DATETIME). Cells with a time or duration format becomeHH:MM:SStext. - Dates entered as text, such as
4/1/2026, aren't read as dates, so they show an error in a date column, and in a key column the refresh of that source fails. Enter the values you use in date columns or keys as dates in the sheet, or in theYYYY-MM-DDform.
Google Drive (API, MCP)
- .csv (UTF-8, Shift_JIS, or UTF-16 with a BOM) files, .xlsx files, and Google Sheets spreadsheets can be read. Other Google files, such as Google Docs and Google Slides, can't be read.
- Files larger than 10MiB can't be read. An .xlsx file can't be read either if its expanded size is larger than 50MiB.
- A Google Sheets spreadsheet is exported as an Excel file (.xlsx) and then read. Cells are read and limited in the same way as an .xlsx file, so the values might differ from those read with the Google Sheets connector.
- A Google Sheets spreadsheet can't be read if the exported .xlsx is larger than 10MiB or exceeds the Google export limit (about 10MB). In that case, add it with the Google Sheets connector.
- A Google Drive shortcut reads the file it points to.
- A .csv file is read in the same format as Creating an inline table from a CSV or Excel file. It can't be read if a column name in the first row is empty or duplicated, or if rows have different numbers of columns. If several column names differ only in case, the second and later ones get a suffix such as
_2. It can have up to 1,000 columns, and an inline table can include up to 100 columns. - Cells in an .xlsx file are read in the same way as Creating an inline table from a CSV or Excel file. Unlike a .csv file, an empty column name in the first row becomes the Excel column letter (such as
C), and a duplicated column name gets a suffix such as_2. Like a .csv file, it can have up to 1,000 columns. - The type of each column is inferred with the rules above, the same rules as the Google Sheets connector. Values in .csv and .xlsx files are read as text, and the type is determined from how they're written.
- Values with currency symbols or
%(¥1,200or15%) aren't read as numbers, so export numeric columns to .csv without currency symbols or%.
kintone (API)
- Apps in guest spaces aren't supported.
- The type of each column is determined by the field type.
| Field | Type |
|---|---|
| Number, Calculated (number format) | Decimal (FLOAT). |
| Date, Calculated (date format) | Date (DATE). |
| Date and time, Created datetime, Updated datetime, Calculated (date and time format) | Timestamp (TIMESTAMP). |
| Check box, Multi-choice, Categories | The selected values as a separated string (STRING). |
| User selection, Department selection, Group selection, Created by, Updated by, Assignee | The display names as a separated string (STRING). |
| Attachment | The file names as a separated string (STRING). |
| Table, Related records | Not read. |
| Others (Text, Rich text, Drop-down, Radio button, Time, Link, Status, Record number, Calculated (other formats), and so on) | String (STRING). Rich text is read as HTML. |
- In kintone query (optional), enter the conditions of a kintone query (for example,
Status in ("Won")). You can't specify the order or the number of records (order by,limit,offset). - The filter is set when you add the source. To change it, remove the source and add it again.
- Empty fields and calculated fields with an error are read as empty cells.
Notion (API)
- The type of each column is determined by the property type. For dates, formulas, rollups, and IDs, the type is determined for each column from the values read.
| Property | Type |
|---|---|
| Number | Decimal (FLOAT). |
| Checkbox | Boolean (BOOLEAN). |
| Created time, Last edited time | Timestamp (TIMESTAMP). |
| Date | Only the start is read. Date (DATE) when all values in the column are dates without a time, timestamp (TIMESTAMP) when all have a time, and string (STRING) when they're mixed. A date with a time and a time zone is read as the time in that time zone. |
| Formula, Rollup | Inferred from the results with the rules above (a number is integer or decimal, a boolean is boolean, and a date is read like the date property. Text results are also read from how they're written). List results are read as a separated string. |
| ID | Integer (INTEGER) without a prefix, or a prefix-number string (STRING) with a prefix. |
| Multi-select | The option names as a separated string (STRING). |
| Person, Created by, Last edited by | The names as a separated string (STRING). A user whose name can't be read appears as the user's ID. |
| Relation | The IDs of the related pages as a separated string (STRING). |
| Files & media | The file names as a separated string (STRING). |
| Title, Text, Select, Status, URL, Email, Phone, Verification | String (STRING). |
| Button, and any other type not listed above | Not read. |
- For relations, people, titles, and text, up to the first 25 items of each page are read. For details, see Limits.
- All pages of the data source are read. You can't filter them.
Periods
When the key includes a date (DATE) column, you can set Period in Settings. With a period, you can use Add next period, PREV, and grouping by fiscal year and quarter.
| Item | Description |
|---|---|
| Period column | The column that represents the period. Choose from the date (DATE) columns in the key. |
| Grain | Choose from Day, Month, Quarter, and Year. The default is Month. |
| Fiscal year starts in | A month from 1 to 12. The default is 1. |
Add next period adds a row for the period after the latest one for each combination of non-period key values. Columns without a reference, formula, or child columns carry over the previous period's values. You can't use it in a table whose grain is Day.
Views
A view is a way to show the same inline table differently. Switch views with the tabs at the top of the sheet. There is only one set of data, so changing a value in any view changes the same table. The CSV, references from SQL, and formulas always use all rows and columns, regardless of views.
The following settings are saved per view:
- The layout (Table, Kanban, or Timeline) and its settings.
- Row grouping and sorts and filters.
- Column visibility.
- The title column of Kanban and Timeline, the order of cards and rows you arranged by hand, the order of Kanban lanes, and the Timeline scale and Fit to scale.
Column settings such as column order, data type, and format are shared by all views.
You can work with views as follows:
- Select Add view to the right of the tabs and choose a layout to add a view. A new view starts with no grouping, sorts, or filters. A table starts with no hidden columns. Kanban and Timeline start by showing only the title and four columns, so cards and bars stay short.
- Select the tab of the open view to show the following menu. You can also double-click a tab to rename it.
- Rename
- Layout: Changes the layout of the open view.
- Duplicate
- Move left
- Move right
- Delete view: You can't delete the last view.
- A view without a name is shown with the name of its layout, such as Table.
- An inline table can have up to 30 views.
- Views are saved in the sheet settings and appear the same to everyone who opens the inline table. When you open an inline table, the first view is shown. If you can only view the inline table, you can switch views but can't add or change them.
Kanban
Kanban places rows as cards in lanes, one lane for each value of a column. Set how rows are split into lanes with Lanes in the toolbar. As with row grouping, you can choose a text, checkbox, number, or date column, group a date column by a unit such as Month, and group a number column by width.
- For a column with choices, lanes follow the order of the choices. For a boolean column, lanes are
trueand thenfalse. Values not in the choices and values of other columns follow in value order. Rows with an empty value are in the last lane, (Empty). When there are no empty rows, (Empty) isn't shown, and Add is placed at the right when you can add rows. With row grouping, (Empty) is shown in a narrow width even when it has no cards. - To change the order of lanes, drag the header of a lane, or drag the list in Lanes. Select Reset to go back to the default order. The order of lanes is saved per view and doesn't change the order of the choices.
- The title of a card shows the value of the column chosen in Title in the toolbar. If none is chosen, it's the first shown column other than the lane column. Below the title, the shown columns that have values are listed. To choose the columns shown on cards, use Shown columns in the toolbar to show or hide them.
- Drag a card to another lane to change the row's value to the lane's value. Moving a card to (Empty) clears the value. When there are no empty rows, moving a card to Add at the right clears the value. For a cell that uses a reference value, you're asked whether to prioritize manual input, the same as in the table.
- When you move a card to a lane grouped by a date unit, the date shifts by the difference between the lanes. For example, with Month lanes, moving April 17 to June makes it June 17. A day past the end of the month becomes the last day of that month (January 31 moved to February becomes February 28). The time of a date and time column doesn't change. A row with an empty date gets the first day of the lane (the 1st for Month, Monday for Week).
- You can't move cards to lanes grouped by a number width, because the value to enter isn't determined. You can move them to (Empty). When lanes are split by a key column, cards can't be moved between lanes.
- Drag a card within a lane to change the order of cards. When you move a card to another lane, it's placed where you drop it.
- Select a card to open the row details.
- Select Add at the bottom of a lane to add a row with the lane's value. Add at the right, shown when there are no empty rows, adds a row with an empty value. In a lane grouped by a date unit, the first day of the lane is entered (midnight for a date and time column). For a table with a key, enter the key values in the fields that open next to Add, then add the row. Add isn't shown in lanes that cards can't be moved to.
- With row grouping, cards are split into a horizontal band for each group. Select the header of a band to collapse it. When you move a card to another band, the value of the band's column changes by the same rules as lanes. While cards are split into bands, Add isn't shown.
- Cards can't be moved to bands grouped by a number width or a key column. A move that changes both the band's and the lane's values can't be made to a cell that uses a reference value.
- Set sorts and filters by choosing a column with Sort and Filter at the top of the sheet.
Timeline
Timeline shows rows as bars on dates, using date columns. Choose a date or datetime column with Start and End in the toolbar. You can also choose No end date.
- A bar runs from the start date to the end date. If the end is empty or earlier than the start, the bar covers only the start date.
- A bar shows the value of the column chosen in Title in the toolbar, followed by the values of the shown columns. If no title is chosen, it's the first shown column other than the start and end columns. Values of a column with choices have a dot in the choice's color. The text can extend past the end of the bar. The row names on the left show the value of the title column.
- Rows with an empty start are shown at the bottom under No (start column name).
- Use Day, Week, Month, and Quarter at the top left to switch the scale. The Quarter scale splits the year into three-month periods starting from the fiscal year start month of the period. In a table without a period, it starts in January.
- Select Today to scroll to today. A vertical line marks today. When you scroll to either end, more dates are added.
- A view without a chosen scale opens with a scale that fits the range of the bars. The scale you choose is saved per view.
- Turn on Fit to scale at the right end of the toolbar row to show each bar over whole steps of the scale. For example, with the Month scale, a row from April 17 to May 3 is shown from April 1 to May 31. Dragging also moves one step at a time: the start becomes the first day of the step (the 1st for Month, Monday for Week), and the end becomes the last day of the step (the end of the month for Month). Quarter steps are three months starting from the fiscal year start month.
- Drag a bar to shift its start and end dates. If an end column is chosen, drag the left or right edge of a bar to change the start or end. For a short bar, the edges you can drag are shown outside the bar. Extending either edge of a row with an empty end fills in the end.
- You can change dates by dragging only for rows whose start and end are both date columns and whose cells accept manual values. Change datetime columns in the row details. Key columns and cells that use reference values can't be changed.
- Drag a row name to change the order of rows.
- With row grouping, rows are shown in a section for each group. Select the header of a section to collapse it. Rows can't be reordered between sections.
- Select a bar or a row name to open the row details.
Kanban and Timeline in common
- Only rows that match the filters are shown.
- Cards and rows follow the sorts if any are set, and otherwise the order you arranged by dragging. While sorts are set, you can't arrange them by hand.
- The order you arranged by dragging and the order of lanes are saved per view. They don't change the order of rows in the data (the CSV order, and the order used by
PREVand similar functions in a table without a period). Rows you haven't arranged follow in table order. - Changes to values (moving to another lane, changing dates, adding rows) can be undone with Undo (
⌘Z/Ctrl+Z), the same as in the table. Changes to the order are view settings, like sorts and filters, so they can't be undone.
Row grouping
Use Row groups at the top of the sheet to group rows and show subtotals for each group. You can group by text, checkbox, number, and date columns.
- Select Row groups and choose a column, or drag a column header to Row groups.
- You can also use Group rows by this column in the column menu. For date columns, the item shows the unit, such as Group by month.
- Select a date or number group you added to change how it groups rows.
- Select Remove this group on a group to remove it, and drag groups to reorder them.
| Data type | How rows are grouped |
|---|---|
| Text and checkbox | By each value. |
| Number | Select Each value or By width. With a width, rows from the lower bound up to, but not including, the lower bound plus the width form one group. For example, with a width of 10, rows from 20 up to 30 are grouped into 20 – 30. The initial width splits the column's range of values into about 10 groups. |
| Date, Date and time | Select Year, Quarter, Month, Week, or Day. In a table whose period fiscal year doesn't start in January, you can select Fiscal year and Fiscal quarter instead of Year and Quarter. Weeks start on Monday. Date and time values are grouped by their date. |
- You can group by the same date column more than once with different units, such as months under fiscal years. When you add a date column, rows are grouped by the coarsest unit that isn't used yet, starting from the year (or fiscal year) for the period column and from the month for other date columns.
- Date and number groups are listed in ascending order of their values, groups of a column with choices follow the order of the choices, and other text and checkbox groups follow the order of the rows in the table. Rows without a value are grouped into (Empty) at the end.
- You can also use row grouping in Kanban and Timeline.
Select how numeric columns are calculated in subtotals and totals in Aggregation in the column menu. The default is Sum. Summing a rate such as a profit margin gives a wrong value, so select None or another method for such columns.
In a table with a period, Last value is the sum of the rows in the latest period that has values. For example, in a table keyed by department and month, the total row shows the sum of each department's value in its latest month. In a table without a period, it's the value in the last row that has a value, in the order of the table's rows.
The columns used for grouping and how they're grouped are saved in the sheet settings. Subtotals aren't saved to the CSV.
Sort and filter
Use Sort and Filter at the top of the sheet, or Sort and Filter in the column menu, to set the order of the rows shown in the sheet and to narrow them down. The operations and conditions are the same as in Explorer tables.
Set a sort in either of these ways:
- Select Sort at the top of the sheet, choose a column, and select Ascending or Descending. A column that isn't sorted yet is added after the other sorts. For a column that's already sorted, the direction changes and its priority stays the same. Drag a column header to Sort to add an ascending sort on that column at the end. If the column is already sorted, the settings to choose the direction open.
- Select Ascending or Descending in the column menu to sort by that column only. Select the same direction again to remove the sort. When the sheet is already sorted by another column, select Append to add it after the existing sort.
To set a filter, select Filter at the top of the sheet and choose a column, or drag a column header to Filter, to open the filter settings for that column. You can also use Filter in the column menu.
- Sorts and filters you set are listed in Sort and Filter at the top of the sheet. Select one to change it, or select Remove to remove it. Drag sorts to change their priority.
- When rows are grouped, the rows within each group are sorted. The order of the groups doesn't change.
- Empty values come last in both ascending and descending order.
- Rows you add while a filter or sort is applied stay visible at the end without being sorted, even if they don't match the filter. Rows whose values you change while a filter is applied also stay visible even if they no longer match the filter (they still follow the sort). Rows that don't match show Outside filter. They follow the filter and sort when you do one of the following:
- Select Apply filter and sort again at the bottom of the sheet. With only a filter, it shows Apply filter again. With only a sort, it shows Apply sort again.
- Change the filter or sort.
- Open the inline table again.
- When you edit an existing row so that it no longer matches the filter, it's hidden right away.
- In Filter, you can set the following four. Rows that meet all of them are shown.
- Filter by value
- Exclude by value
- Filter by condition
- Filter NULL
- While a filter is applied, the row count at the bottom of the sheet shows the shown rows out of all rows. Subtotals and totals are calculated from the shown rows.
- Sorting and filtering only affect the display. The CSV row order, references from SQL, and formulas (
TOTALandPREV) still use all rows. - Sorts and filters are saved in the sheet settings and are shown the same way to everyone who opens the inline table. Users with view-only access can change them, but the changes aren't saved.
Column hierarchy
You can organize columns into parents and children. Use Add a child column and Belongs to in the column menu. In Belongs to, choose an existing column as the parent, or select Create a new parent column to create one. Drag a column header to the middle of another column's header to make it a child of that column.
- A numeric parent column without a formula is the sum of its numeric child columns. Non-numeric child columns aren't included in the sum.
- For a parent column that doesn't need values, turn on Folder in the column menu. Folder columns have no values and aren't included in the CSV. In the sheet, a folder appears only in the upper header row, and it appears as a column when collapsed.
- Select the upper header of a parent column or folder to open its column menu. Use ▾ to collapse the child columns.
- When a value entered manually (or a reference value) in a parent column differs from the sum of the child columns, the cell shows the difference. A parent column with a formula doesn't show it.
- Key columns can't have a parent or children.
- When you delete a column that has child columns, you choose whether to keep the child columns or delete them too.
Column visibility
Select Shown columns in the sheet toolbar, and select a column to show or hide it. The eye icon does the same. You can also hide a column with Hide column in the column menu.
- Column visibility is set per view. The shown columns are also used for Kanban cards and Timeline row names.
- Hiding a column only affects the sheet display. It doesn't affect the CSV, references from SQL, or formula calculations.
- Hiding a parent column also hides its child columns.
- You can't hide all columns.
- Shown columns in the toolbar shows how many columns are shown out of all columns. The heading of the panel that opens shows the same numbers. Select Show all to show all columns again.
Settings
Use Settings to the left of Save to view and set the following items.
| Item | Description |
|---|---|
| Key | The columns that identify each row. See Key. |
| Rows | Appears when the table has a key and a source. Choose Add rows manually or match the rows of a source result. |
| Sources | The list of source SQL blocks and connectors. For a connector source, shows Connector, the key mapping, the columns that use each source, the last refresh time and who refreshed, the matched, not found, and duplicate counts from the refresh, and the error from the last refresh (errors aren't saved and disappear when you reopen the notebook). Select Open to go to the SQL block. Select Remove source to remove the source. You can't remove a source that's used by a column or by Rows. When you add a SQL block as a source, choose a column of the SQL block for each key column. Columns with the same name are selected from the start. To add a source, see Looking up values from a SQL block and Looking up values from a connector. |
| Period | See Periods. |
| Column hierarchy | The list of parent and child columns. Appears when the table has parent and child columns. |
Column menu
Select a column header in the sheet to open the column menu. For key columns, the items from Data type to Aggregation, Add a child column, and Delete column aren't shown. For folder columns, Sort, Filter, Data type, Reference, and Formula aren't shown.
| Item | Description |
|---|---|
| Rename | The button to the right of the column name at the top of the menu. Select it to rename the column. Name (used in SQL and formulas) becomes the CSV header, so if you change it, you need to update SQL that uses the column. Display name (optional) is only for display in the sheet. When it's empty, the name is shown. |
| Sort | See Sort and filter. |
| Filter | See Sort and filter. |
| Data type | Choose from Text (STRING), Number (decimal) (FLOAT), Number (integer) (INTEGER), Checkbox (BOOLEAN), Date (DATE), and Date and time (DATETIME). To use TIMESTAMP, specify it in the definition (YAML) after you select Show CSV. If manual values don't match the new type, a confirmation shows how many. Those values show as errors and are removed when you save. |
| Folder | When turned on, the column has no values, holds child columns, and isn't included in the CSV. Its formula, reference, aggregation, and manual values are removed. When turned off, the column becomes numeric if it has numeric child columns, or text otherwise. |
| Choices | Appears for text columns. When you turn on Choose values from choices, you choose a value from the choices when you edit a cell. You can pick a color for each choice. The colors you pick from are shown as dots. Cells, Cell details and note, and Row details show the value as a tag in that color. The list of choices you open while editing a cell, and the list you open in Row details, show a color dot and the choice name. If the choices are empty when you turn it on, the values in the column are filled in as choices. |
| Format | Appears for numeric columns. Specify Percent, Thousands separator, and Decimal places. If Decimal places is empty, percentages show 1 decimal place and other numbers show up to 2 (trailing zeros omitted). Turn on Show a bar for the value to show a bar behind the value in detail rows, sized by the value within the column. Bars start at 0 and are scaled by the minimum and maximum values of the rows shown. It's only for display in the sheet and doesn't change the CSV values. |
| Reference | See References. |
| Formula | See Formulas. |
| Belongs to | Select the parent column. Select None (top level) to remove the parent. Select Create a new parent column to create a parent column and put this column in it. When created from a numeric column, the parent is the sum of its numeric children; otherwise it's a folder. |
| Aggregation | Appears for numeric columns. Select how subtotals and the total row are calculated when rows are grouped: Sum, Average, Max, Min, Count, Last value, or None. |
| Add to key / Remove from key | See Key. |
| Group rows by this column / Group by month and similar items | See Row grouping. |
| Insert column to the left / Insert column to the right / Add a child column | Adds a column after you specify its name and data type. Add a child column adds it as a child of this column. |
| Hide column | See Column visibility. |
| Hidden columns | Appears when there are hidden columns. Shows the column you select again. |
| Delete column | Deletes the column. If the column has child columns, choose Keep the child columns (move them up) or Delete the child columns too. You can't delete a column that's used in another column's formula. |
| Pin to left / Pin to right | Pins the column to the left or right edge of the table. Key columns are pinned to the left from the start. Pinning lasts only while the table is open and isn't saved. |
| Column width | Choose Fit to values, Fit all columns to values, Reset to initial width, or Reset all columns to initial widths. Column widths last only while the table is open and aren't saved. |
Cell operations
Select Shortcuts to the left of Save to see the list of sheet operations.
- Copy and paste use tab-separated values, so you can exchange values with Google Sheets and Excel.
- When pasted values go past the end of the table, rows are added for them. In a table with a key, include the key columns in the pasted range to add rows with those key values. Rows whose key is empty, doesn't match the type, or already exists aren't added.
- Dragging the fill handle (■ at the bottom right of the selection) continues the values when the selected values are evenly spaced (
1,2→3,4; first-of-month dates → the next months;No.008,No.009→No.010). Values that aren't evenly spaced, a single value, and values whose trailing number would go below 0 are repeated.⌘D(Ctrl+Don Windows) copies the top value. - Pasting and the fill handle don't change key column cells or cells that use the reference value. The fill handle and
⌘Dcopy only manual values, not values that come from references or formulas. - Group header and total rows aren't included when you copy them together with detail rows.
- Search with
⌘F/Ctrl+Fmoves to matching cells. It doesn't filter rows. - To delete rows, select the row number and press
Delete, or right-click a cell or row number and select Delete row. Drag across row numbers, or holdShiftwhile selecting them, to select several rows. With cells selected, press⌘-(Ctrl+-on Windows) to delete the rows in the range. - Press
⌘S/Ctrl+Sto save.
The bottom of the sheet shows information about the selection, the number of cells with errors, the number of rows not found in the source, the number of cells where a manual value overrides a reference or formula, and the number of rows. Cells whose underlying reference or formula value has changed since the manual value was entered are counted as changed underneath.
Changes since the last save are marked in the sheet: cells whose manual value changed have a mark at the top right, added rows are tinted, and added columns and columns whose settings changed have a mark in the header. The number of changes is shown as Unsaved at the bottom of the sheet. The marks disappear when you save, and a cell's mark disappears when you change it back to its saved value.
Hover over a cell with an error to see the error.
Row details
Row details show all columns of a row as a two-column table of column names and values, so you can edit them together. Text inputs grow vertically with their content and start two lines tall when empty. Open row details in one of the following ways:
- Select the row number.
- Right-click a cell and select Open row.
While row details are open, selecting a cell switches to Cell details and note for that cell.
Input in row details works as follows:
- Text columns use multi-line inputs. Press
⌘Enter/Ctrl+Enteror select outside the input to confirm. - Columns whose values come from a reference or formula show only the value. Select the Override with a manual value icon to enter a manual value. For a column with a manual override, select Back to reference or Back to formula, matching the value that returns.
- You can't edit key columns or columns that use the reference value.
- Hidden columns appear when you open Hidden columns.
- Use the previous row and next row icons to switch rows.
Saved sheet settings
When you save in the sheet, the value used in each cell is saved as the CSV. Subtotals from grouping aren't included in the CSV.
The following are saved with the CSV in the revision as sheet settings:
- Column settings (formula, reference, parent column, display name, choices and their colors, format, and aggregation).
- Manual values and notes.
- Settings (key, rows, sources, and period), and the last refresh time of references and who refreshed.
- Views (the layout and its settings, the columns used for row grouping, sorts and filters, column visibility, and for Kanban and Timeline the title column, the order arranged by hand, the order of lanes, and the scale).
CSV changes outside the sheet
When the CSV changes through editing in Show CSV, the AI agent, or a refresh from the linked SQL block, the sheet settings are kept as they are. The next time you open the table in the sheet, formula columns are recalculated, and a message prompts you to save. Select Save to write the recalculated values to the CSV.
- If you change cells whose values come from a reference in the CSV, the changed values are used as the reference values until the next refresh of the references. This also applies to cells whose saved reference value was the same as the CSV value. The next refresh replaces them with the values from the source. For sheet settings saved in an older format, the saved reference values are used instead of the changed CSV values until you save the sheet again.
- Reference columns in rows added in the CSV stay empty until the next refresh of the references.
- If you rename, add, or remove columns in the CSV header in Show CSV, the columns no longer match the sheet settings. To change columns while keeping the sheet settings, change them in the definition (YAML). Saving while the columns don't match the sheet settings asks for confirmation, including after editing in the sheet or the definition (YAML), and then removes sheet settings such as formulas, references, and notes. Renaming the table alone doesn't ask. If the settings were saved, you can restore them from the revision history.
- In a table without a key, manual values, notes, and the hand-arranged row order tied to row positions are removed.
Definition (YAML)
When you select Show CSV, Definition (YAML) on the right shows the table definition in YAML, including columns, data types, the key, sources, periods, formulas, and references. Even for a table you haven't saved in the sheet, it shows a definition made from the CSV and each column's data type. Select Copy to clipboard to copy it.
When you edit the YAML, the definition is applied shortly after you stop typing, as with the CSV. Formula and reference columns are recalculated, and the values are written to the CSV and the sheet. To save the inline table, then select Save.
You can't save, or return to the sheet by selecting a view tab, until the definition is applied.
While an edit that can't be applied remains (it has a problem or needs confirmation), you can't return to the sheet by selecting a view tab. Fix it, or select Discard to undo your edits.
If the definition has a problem, the line and the problem are shown, and the definition isn't applied.
If applying would lose manual values or other data, as in the following cases, this is shown before applying. Select Apply anyway to apply it.
- Manual values in deleted columns and in columns turned into folders are deleted. If you change a column's name in the YAML, it's treated as deleting the column and adding a new one, so its manual values aren't kept. To keep the manual values and the formulas that use the column, select Rename to the right of the column name at the top of the column menu in the sheet.
- In columns whose data type changes, manual values that don't match the new type show as errors and are removed when you save.
- Reference values in columns whose reference settings change are cleared. Refresh the references in the sheet to look them up again.
- If you apply after changing the CSV, the sheet settings are removed when they don't match the CSV columns. In a table without a key, manual values, notes, and the hand-arranged row order tied to row positions are removed.
When you change the key, the definition isn't applied if a row has an empty value in a key column, a value that doesn't match the column's data type, or the same values as another row.
If the CSV can't be opened in the sheet (it has values that don't match their format, or it exceeds the row limit), you can only change the data type of each column.
Data types and values
You can select one of the following data types for each column. You can't save CSV that contains values that don't match the format. For how to select data types in the sheet, see Column menu.
| Data type | Value format |
|---|---|
| STRING | Any string. |
| INTEGER | Integer within the 64-bit integer range, e.g. -42. |
| FLOAT | Number, including exponent notation, e.g. 3.14 or 1e-3. |
| BOOLEAN | true or false (lowercase). |
| DATE | YYYY-MM-DD, e.g. 2026-08-25. |
| DATETIME | YYYY-MM-DDTHH:MM:SS with up to 6 fractional second digits, e.g. 2026-08-25T13:45:00. |
| TIMESTAMP | Datetime with Z or ±HH:MM, e.g. 2026-08-25T13:45:00+09:00. |
When you type or paste into a sheet cell, or enter a value in Add row, a datetime without a time zone offset (such as 2026-08-25 13:45) in a TIMESTAMP column is treated as UTC. The same applies to values from a connector source, except for Notion dates that have a time zone, which are read as the time in that time zone.
An unquoted empty field is treated as NULL. A quoted empty string ("") is valid as an empty string for STRING, and invalid for the other data types.
Versions
Inline tables are included in versions. See the version specification for behavior when you inspect, restore, or create a notebook from a version.
Constraints
- An inline table name can contain up to 200 characters, and an alias can contain up to 128 characters.
- CSV must be encoded in UTF-8, Shift_JIS, or UTF-16 with a BOM, and include a header row.
- You can upload CSV and Excel files up to 10MiB. For a Shift_JIS or UTF-16 CSV file, the size after conversion to UTF-8 counts. For an Excel file, you also can't create the table if its expanded size is larger than 200MiB, or if the table to import exceeds the inline table limit (10MiB) when converted to CSV.
- An inline table can contain up to 100 columns (folder columns aren't counted) and 10MiB. It needs at least one column that isn't a folder.
- In the sheet and the definition (YAML), you can't create column names that differ only in case (
Salesandsales). When you refer to a column in a formula or the key, use the same case as the column name. - An inline table can have up to 2,000 rows. You can't save a CSV with more than 2,000 rows.
- An inline table saved earlier with more than 2,000 rows can't be referenced from SQL or opened in the sheet. Select Show CSV, reduce it to 2,000 rows or fewer, and save it.
- The sheet settings of an inline table can be up to 4MiB. They include manual values in formula and reference columns, and notes. Of the values looked up by references, they include only those that differ from the CSV values (such as reference values in cells overridden with a manual value).
- An inline table can have up to 30 views.
- A column display name can contain up to 200 characters, and a formula up to 2,000 characters.
- A notebook can contain up to 100 inline tables.
- A notebook can retain up to 1,000 inline table revisions with a combined size of 1GiB. The size includes sheet settings.
- SQL, including expanded inline tables, can be up to 900KiB.
- You can look up values only from BigQuery, Snowflake, Databricks, and Redshift SQL blocks in the same notebook, and from the connectors listed in Looking up values from a connector.
- An inline table can have up to 10 connector sources.
- A connector source can read up to 2,000 rows per source file (sheet, file, app, or data source). A Google Drive file can be up to 10MiB and have up to 1,000 columns.
- When Rows matches a source result, the refresh of that source fails if the source result has more than 2,000 keys.
- Redshift can't reference inline tables whose values contain control characters other than tabs, line breaks, and a few others.
- You can't import or export a notebook that contains inline tables as a file.
- Table and Query result in dynamic options can't reference inline tables.
- Deleting an inline table reduces the inline table count usage. Revision count and storage usage are released later, so a revision quota can remain exceeded immediately after deletion.
See also the numeric limits.