--- url: 'https://docs.codatum.com/index.md' description: >- An overview of Codatum, which connects to a DWH to run, visualize, and share SQL, and a guide to the documentation --- # Introduction ## What is Codatum? Codatum is a data analytics platform for connecting to a data warehouse (DWH), running SQL, and analyzing, visualizing, and sharing the results. It supports BigQuery, Snowflake, Databricks, Redshift, and PostgreSQL. You do your analysis in a [notebook](./features/notebook/overview). Because SQL, charts, and text stay together in a single document, your team can share not just the numbers but also the logic behind them and how to interpret them. An [AI agent](./features/ai-agent/overview) can operate directly on your notebooks. From a natural language instruction, it runs SQL and creates charts, leaving the process as SQL in the notebook. It draws on descriptions and tags in the [catalog](./features/catalog/overview) and definitions accumulated in [agent context](./features/ai-agent/agent-context) to inform its analysis. ## What you can do with Codatum ### Analyze Write SQL in a [notebook](./features/notebook/overview) and bring the results together with charts and text in a single document. [SQL blocks](./features/notebook/doc-page/sql-block) support autocomplete and formatting, and you can build up SQL step by step by referencing SQL defined in other blocks (SQL chaining). [Parameters](./features/notebook/parameter/overview) let you change conditions like a date range or analysis target with ease. For standardized analyses such as funnel analysis or budget-vs-actual tracking, you can arrange charts on a [grid page](./features/notebook/grid-page/overview) to build a dashboard. For deep dives into changes in the numbers, use the [explorer](./features/notebook/explorer) to explore results through a GUI. ### Delegate to the AI agent Ask the [AI agent](./features/ai-agent/overview) a question in natural language, and it runs SQL and creates charts for you. Because the process is left as SQL in the notebook, you can review and adjust the output yourself. The agent draws on descriptions and tags added in the [catalog](./features/catalog/overview) and metric definitions placed in [agent context](./features/ai-agent/agent-context), enabling analysis that reflects internal terminology and calculation rules. You manage the model, permissions, and fixed context in an [AI profile](./workspace/codatum-ai/ai-profile). ### Share You can choose how to share your analysis results depending on the audience and purpose. Use a [report](./features/notebook/sharing/report/overview) for internal members and guests, a [public link](./features/notebook/sharing/public-link/overview) when you want to show results without requiring login, and a [signed embed](./features/notebook/sharing/signed-embed/overview) to embed results in your own SaaS product or internal tools. Reports can be viewed and re-run within the scope of the publish settings even without connection permissions. With signed embeds, you can use [fixed values for server-side parameters](./features/notebook/sharing/signed-embed/overview#server-side-params) to isolate the data each tenant can access. ### Run on a schedule Use a [workflow](./features/workflow/overview) to run [queries](./features/saved-query/overview) or reports on a schedule. You can connect the results to follow-up steps, such as delivering them to Slack or email, or summarizing them with an LLM. This is useful for things like daily KPI delivery or model monitoring. ### Organize and manage your data Register a [connection](./features/connection/overview) and configure which tables to sync, and the table and column metadata syncs to the [catalog](./features/catalog/overview). Adding [annotations](./features/catalog/annotation) (descriptions and tags) makes that metadata available for autocomplete, search, and the agent. [Permissions](./permissions/overview) are controlled through a combination of workspace roles and resource roles. Codatum also supports dividing work areas with [teamspaces](./workspace/administration/teamspace), granting permissions by [group](./workspace/administration/group), [audit logs](./workspace/access-and-security/audit-log), and [IP access control and MFA](./workspace/access-and-security/security). ### Operate from a terminal or CI With the [Codatum CLI](./features/cli/overview), you can treat notebooks as markdown files and catalog annotations as YAML files. This enables version control with git and operation from CI or coding agents. ## Documentation structure * [Guide](./guide/screen-layout) — Screen layout, global navigation, and more * Features — Explanations of the main features * [Quick search](./features/quick-search/overview) — Cross-search across notebooks, tables, and queries * [Connection](./features/connection/overview) — Data warehouse connection setup and metadata management * [Catalog](./features/catalog/overview) — Metadata management for tables and saved queries * [Query](./features/saved-query/overview) — Saved SQL reused within a connection * [Notebook](./features/notebook/overview) — Your workspace for data analysis, with collaborative editing, SQL, charts, and more * [Workflow](./features/workflow/overview) — Scheduled runs and automation * [AI agent](./features/ai-agent/overview) — Natural language analysis and notebook operation, and AI profiles * [AI Assistant](./features/ai-assistant/overview) — A chat for creating SQL and charts and answering questions (deprecated; new provisioning discontinued) * [Codatum CLI](./features/cli/overview) — A CLI for operating Codatum from the terminal * [Workspace](./workspace/overview) — The management unit, users, invitations, API keys, and more * [Permissions](./permissions/overview) — The permission model and permissions for each resource * [Account](./account/overview) — Accounts, sign-up, and account settings * [Organization](./organization/overview) — How organizations relate to workspaces, and organization settings * [Reference](./reference/glossary) — [Glossary](./reference/glossary), [Limits](./reference/limits), [System requirements](./reference/requirements) --- --- url: 'https://docs.codatum.com/guide/screen-layout.md' description: >- The regions that make up the Codatum screen (global nav, header, left sidebar, main area, right sidebar) --- # Screen layout After you log in, the screen is made up of the following regions. This documentation uses these names when referring to positions on the screen. ![Screen layout: global nav, header, left sidebar, main area, right sidebar](/images/screen-layout-en.svg) Depending on the feature or screen, only some of these regions might be shown. Even if a region isn't shown, the positions of the other regions follow this layout. ## Regions {#regions} | Region {.nowrap} | Position | Description | | --- | --- | --- | | [Global nav](#global-nav) | Left edge of the screen | Entry points to the main features and settings | | [Header](#header) | Top of the screen | The screen title, action buttons, and more | | [Left sidebar](#left-sidebar) | Left of the main area | Lists, trees, filters, and more | | [Main area](#main-area) | Center of the screen | The main content for that screen | | [Right sidebar](#right-sidebar) | Right of the main area | Detail information, auxiliary panels, and more | ## Global nav {#global-nav} The region at the left edge of the screen. It provides workspace switching and entry points to the main features and settings. For the menu structure, see [Navigation](./navigation). ## Header {#header} The region at the top of the screen, to the right of the global nav. It holds the title of the open resource, action buttons, and similar controls. ## Left sidebar {#left-sidebar} The region below the header, to the left of the main area. It shows things like a folder tree or filters, mainly to let you choose what's shown in the main area. ## Main area {#main-area} The region at the center of the screen. It shows the main content for that screen, such as the body of a notebook, a list, or a settings form. ## Right sidebar {#right-sidebar} The region to the right of the main area. It shows detail information, auxiliary panels, and similar content. It might be closed, or might not exist at all, depending on the feature. --- --- url: 'https://docs.codatum.com/guide/navigation.md' description: The global nav menu structure and how it leads to each feature --- # Navigation After you log in to Codatum, the [global nav](./screen-layout) at the left edge of the screen takes you to the main features and settings. For the names of the screen regions, see [Screen layout](./screen-layout). The global nav is split into a top and bottom section, each with the following entry points. * [Top](#nav-top): Workspace switching and entry points to the main features * [Bottom](#nav-bottom): Entry points to workspace settings, help, and account settings ## Global nav top {#nav-top} | Item {.nowrap} | Description | | --- | --- | | [(workspace icon)](#workspace-icon) | Lets you switch workspaces and perform other workspace-related actions | | Notifications | A dot appears when you have unread notifications | | [Quick search](../features/quick-search/overview) | Search across notebooks, tables, queries, and more | | [AI agent](../features/ai-agent/overview) | Goes to the AI agent's full-screen page | | [Notebook](../features/notebook/overview) | Goes to the notebook list | | [Query](../features/saved-query/overview) | Goes to the query list | | [Catalog](../features/catalog/overview) | Goes to the catalog list | | [Workflow](../features/workflow/overview) | Goes to the workflow list | | [Report](../features/notebook/sharing/report/overview) | Goes to the report list | ::: tip To get to [**Connections**](../features/connection/overview), open **Workspace settings** at the bottom of the global nav, then select **Data management** > **Connections** in the left sidebar. ::: ### Workspace icon {#workspace-icon} The workspace icon at the top of the global nav lets you do the following. | Item {.nowrap} | Description | | --- | --- | | (name of the current workspace) | Switches the workspace you're working in. If you belong to multiple workspaces in the same organization, those are grouped under the organization name. Other workspaces are grouped under the **Workspace** subheading | | **Browse all** | Goes to the **workspace selection screen**. In addition to a list of the workspaces you belong to, you can **create a workspace, join a workspace you've been invited to, join a workspace through an [allowed domain](../workspace/administration/invite#allowed-domains), join or decline an [organization owner invitation](../organization/settings/members#invitee-flow), or [leave a workspace](../workspace/administration/user#leave-workspace)**. If you belong to multiple workspaces in the same organization, those are grouped under the organization name. Other workspaces are grouped under the **Workspace** subheading. **Create workspace** appears only if you can create a workspace in a new organization, or if you own an organization you can add a workspace to (see [Creating a new organization](../organization/overview#create-organization)). | | [**Organization settings**](../organization/overview#organization-settings) | Goes to the settings for the organization that the workspace you're working in belongs to. Shown only to organization owners | ## Global nav bottom {#nav-bottom} | Item {.nowrap} | Description | | --- | --- | | [AI Assistant](../features/ai-assistant/overview) | Opens AI Assistant | | [Workspace settings](../workspace/overview) | Goes to the workspace settings for the workspace you're working in | | Help | Chat support, Product updates, [Docs](https://docs.codatum.com), [CLI Docs](https://cli-docs.codatum.com), Online support, [System status](https://status.codatum.com) | | [(avatar icon)](../account/overview#account-settings) | Account settings, Sign out, Switch theme, Switch language, [Switch to a service account](../workspace/access-and-security/service-account#switch) | --- --- url: 'https://docs.codatum.com/features/quick-search/overview.md' description: 'Search across notebooks, tables, and queries' --- # Quick search Quick search lets you search across resources in your workspace. Select **Quick search** in the [global nav](../../guide/screen-layout). ## Key features * Full-text search for notebooks (notebook name and body content, including SQL) * Table search (name, schema information, and descriptions/tags added in the catalog) * Query search (name, schema information, and descriptions/tags added in the catalog) --- --- url: 'https://docs.codatum.com/features/connection/overview.md' description: >- Connection settings for your warehouse, and the unit for running SQL and syncing metadata --- # Connection A connection manages access to a data warehouse. It uses the credentials you register to run SQL and fetch table information. You can create and edit connections from [global nav](../../guide/screen-layout) > **Workspace settings** > **Data management** > **Connections**. To check synced tables, use the [catalog](../catalog/overview). ## Key features * Running SQL: Notebooks, reports, and saved queries can all run SQL using the registered credentials. * Aggregating metadata: [Table metadata sync](../catalog/metadata-sync) syncs table schemas and other metadata to the catalog. * Permissions: [Access level](#access-level) and resource roles control who can run SQL and retrieve results. For resource role details, see [Connection permissions](../../permissions/resources/connection). * Supported warehouses: [BigQuery](./warehouses/bigquery) / [Snowflake](./warehouses/snowflake) / [Redshift](./warehouses/redshift) / [Databricks](./warehouses/databricks) / [PostgreSQL](./warehouses/postgresql). * Codatum is adding support for more warehouses over time. To request a connection to a warehouse not listed above, contact Codatum support. * [Demo connection](#demo-connection): A sample connection you can use to try the product before setting up your own warehouse. * [Codatum Data Connection](#codatum-data-connection): A connection for analyzing AI agent conversation history and usage with SQL. * [Job label](./job-label): Metadata that identifies where SQL was issued from (added automatically). * [Outbound IP addresses](./ip-addresses): The fixed IP addresses that Codatum uses to connect to databases for some connections. ## Creating and managing connections 1. Open [global nav](../../guide/screen-layout) > **Workspace settings** > **Data management** > **Connections**. 2. Select a warehouse from **New connection**. 3. Enter **Connection name**, **Access level**, and the connection settings for the warehouse. 4. Run **Test connect** to verify connectivity, then select **Save**. The list is split into the following sections. * **Available connections**: Connections you can use. * **Restricted Connections**: Connections you don't have access to. If you can edit permissions, select **Edit permissions** to grant access. The maximum number of connections depends on your contract ([Limits](../../reference/limits#plan-limits)). ## Detail screen The detail screen lets you check and operate the following. * **View on catalog**: Opens the [catalog](../catalog/overview) filtered to this connection. * **General**: Edit the name and connection options (not available for the demo connection). * **Access level and permissions**: Check and edit the access level and resource roles (not available for the demo connection). * **Query jobs**: The query job history for this connection (**View history** / **Last run**). This is a separate entry point from the **Query jobs** tab on the table/query detail in the catalog. * **Table sync settings**: **Last sync job**, **Sync targets**, **Resync Immediately**, and **Sync history**. See [Table metadata sync](../catalog/metadata-sync) for details. * **Danger zone**: **Delete connection** (also deletes related catalog data and saved queries; not available for the demo connection). The same restrictions apply to Codatum Data Connection: you can't edit **General** or **Access level and permissions**, and you can't **Delete connection**. ## Demo connection {#demo-connection} The demo connection is a sample connection you can use to try out Codatum's features. * You can experience Codatum's features before setting up your own warehouse. * It includes typical business data (sales, customers, products, and so on). * You can immediately run SQL against the demo connection when creating a notebook or report. | Item {.nowrap} | Value | | --- | --- | | Connection name | `Demo Connection` | | Type | BigQuery | | Access level | Workspace | | Editing | You can't edit the general settings, sync targets, or access level and permissions | | Deletion | You can't delete it | The sync targets are fixed (a sample dataset provided by Codatum and some public BigQuery datasets). You can't change the sync targets manually. You can still run **Resync Immediately**. ## Codatum Data Connection (Beta) {#codatum-data-connection} Codatum Data Connection is a Codatum-managed connection for analyzing [AI agent](../ai-agent/overview) conversation history, tool executions, and token usage with SQL. You can check the views and columns in the [catalog](../catalog/overview), then select this connection in a [SQL block](../notebook/doc-page/sql-block) or other SQL editor to analyze the data. ::: info This feature is in **beta**. The specification might change without notice. ::: This feature is available when it's enabled for your workspace. Codatum automatically prepares the connection for new workspaces. Once it's ready, users with the required permissions can use it. If the feature isn't available in an existing workspace, contact Codatum support. ### Available views You can access the following views through this connection. | View {.nowrap} | Contents | | --- | --- | | `agent_sessions` | Conversation session periods, status, creators, and titles. | | `agent_turns` | Conversation turns from user input to the end of the AI agent's response. | | `agent_messages` | Message types, states, character counts, and whether message content is stored. | | `agent_tool_executions` | Tool approval and execution states, start and end times, and duration. | | `agent_usage` | LLM input and output token counts associated with sessions and conversation turns. | | `agent_turn_scores` | The latest evaluation status and numeric scores per rubric for a conversation turn (task achievement, execution quality, difficulty, and so on). | Message content storage follows the **Save conversations to logs** setting in the [AI profile](../../workspace/codatum-ai/ai-profile#settings) at the time of execution. For messages whose content isn't stored, the `content` column doesn't include the message text. These views don't include columns for the LLM provider name (`provider`) or model name (`model`). ### Settings and constraints * You can't edit the general settings, access level and permissions, or sync targets. * You can't delete it. * You can run **Resync Immediately**. * It doesn't count toward the connection limit. For the permissions needed to use this connection, see [Connection permissions](../../permissions/resources/connection#codatum-data-connection). Fixed constraints are also listed in [Limits](../../reference/limits#fixed-limits). ### Analytics data coverage * Execution history from before collection started or while collection was stopped isn't added automatically. * Past turns, messages, and token usage copied when a conversation is forked aren't recorded as new executions in the fork. * Collected analytics data remains after the conversation history expires. ## Access level {#access-level} You select the access level when you create a connection. The default is **Workspace**. **Protected** and **Private** might not be available, depending on your contract. For the meaning of each access level and the operations allowed for each resource role, see [Connection permissions](../../permissions/resources/connection#access-level). You can add up to 3 Connection Owners to a regular connection ([Limits](../../reference/limits#fixed-limits)). --- --- url: 'https://docs.codatum.com/features/connection/warehouses/bigquery.md' description: Setting up a BigQuery connection --- # BigQuery Connect Codatum to BigQuery to run SQL and manage data. For an overview of connections in general, see [Connection](../overview). ## Preparing BigQuery Prepare a service account and service account key, and grant it the roles (or equivalent permissions) it needs on the target project and dataset. | Grant on {.nowrap} | Role (or equivalent permission) | | --- | --- | | Project | `BigQuery Job User` (or `bigquery.jobs.create`) | | Project | `BigQuery Read Session User` (or `bigquery.readsessions.create` / `getData` / `update`) | | Dataset | `BigQuery Data Viewer` (or `bigquery.tables.getData` / `bigquery.datasets.get` / `bigquery.tables.get` / `bigquery.tables.list`) | (Optional) To sync dataset and table information without entering a project ID, grant `resourcemanager.projects.get` on the target project. Note the target **Project ID** for later use. ## Configuring Codatum 1. Open global nav > **Workspace settings** > **Data management** > **Connections**, then select **New connection**. 2. Select **Google BigQuery**. 3. Enter a **Connection name**. 4. Select an **Access level**. 5. Upload the service account key under **JSON key file** > **File upload** (Client Email is filled in automatically from the JSON). 6. Enter the **Project ID** (the JSON's `project_id` might be filled in as a default; you can change it manually). 7. (Optional) Select a **Location** ([Location](#location)). 8. Run **Test connect**, then save the connection. 9. On the sync targets screen shown after saving, select the datasets to sync ([Table metadata sync](../../catalog/metadata-sync#sync-target)). You can also skip this step. ## Location {#location} When you specify a **Location** for a connection, SQL that runs on the connection runs in that location. ::: tip We recommend explicitly specifying the location so that SQL doesn't run in an unintended location. If your data is in multiple locations (including replicas), create a connection for each location. If you use the following features to run SQL across multiple locations on one connection, Codatum's cache optimization might not work correctly and can cause errors. * [Cross-region dataset replication](https://docs.cloud.google.com/bigquery/docs/data-replication) * [Global queries](https://docs.cloud.google.com/bigquery/docs/global-queries) ::: ### Values you can select {#location-values} The default is **Not specified (auto)**. | Value {.nowrap} | Where SQL runs | | --- | --- | | **Not specified (auto)** | BigQuery determines the location from the tables that the SQL references. | | **US (multi-region)** | `US` | | **asia-northeast1 (Tokyo)** | `asia-northeast1` | | **asia-northeast2 (Osaka)** | `asia-northeast2` | | **asia-northeast3 (Seoul)** | `asia-northeast3` | | **asia-east1 (Taiwan)** | `asia-east1` | | **asia-southeast1 (Singapore)** | `asia-southeast1` | | **australia-southeast1 (Sydney)** | `australia-southeast1` | | **us-central1 (Iowa)** | `us-central1` | | **us-east1 (South Carolina)** | `us-east1` | | **us-east4 (Northern Virginia)** | `us-east4` | | **us-west1 (Oregon)** | `us-west1` | ### Table metadata sync {#location-sync} When you specify a location, [table metadata sync](../../catalog/metadata-sync#sync-target) works as follows. * A dataset that doesn't exist in the connection's location (including replicas) causes a sync error. Remove it from the sync targets. * If the service account is granted `BigQuery Data Viewer` (or `bigquery.datasets.get`) on the project, the sync targets screen also shows the locations of dataset replicas. * When **Auto add datasets** is enabled, only datasets confirmed to exist in the connection's location are added. ## SQL execution priority {#query-priority} Codatum runs BigQuery SQL at [batch priority](https://docs.cloud.google.com/bigquery/docs/running-queries#batch). BigQuery doesn't start a batch-priority job until slots in the project become available. When slots are busy, your SQL might start late. * While the SQL waits to start, the SQL block shows `Query is queued and waiting for execution...`. The [query](../../saved-query/overview) result shows `Waiting to start...`. * If the SQL waited 5 seconds or longer to start, Codatum shows **Wait before start** after the SQL completes. In a SQL block, hover over the row count to see it next to **Duration**. ## If a location-related error occurs {#location-errors} When you run SQL, you might see errors like the following. * `Access Denied: Project : User does not have bigquery.jobs.createGlobalQuery permission` * `Not found: Dataset : was not found in location ` The first error looks like a permission error, but it's usually caused by a location mismatch between where the SQL runs and a dataset that the SQL references (or the result of another SQL block). When one SQL references data in different locations, BigQuery tries to run it as a global query, which causes this error. Instead of granting the permission, check the following in order. 1. Make sure the dataset and project names in the SQL are correct and that the dataset exists. 2. Check the locations of the datasets that the SQL references. Keep the datasets that one SQL references in the same location (including replicas). 3. Specify a [location](#location) for the connection, or create a connection for each location. 4. If the error occurs only in SQL that references other SQL blocks, check whether **Run with fresh data**, which doesn't use the [cache](../../notebook/doc-page/sql-block#cache), resolves it. Even if it does, the settings in step 3 prevent the error from recurring. --- --- url: 'https://docs.codatum.com/features/connection/warehouses/snowflake.md' description: Setting up a Snowflake connection (key pair authentication) --- # Snowflake Connect Codatum to Snowflake to run SQL and manage data. For an overview of connections in general, see [Connection](../overview). ## Preparing Snowflake 1. Create a key pair and set the public key on the Snowflake user you'll use for the connection (see Snowflake's [key pair authentication guide](https://docs.snowflake.com/en/user-guide/key-pair-auth)). 2. Grant the following privileges to the role assigned to the user: * Warehouse: `USAGE` * Database: `USAGE` * Schema: `USAGE` * Table: `SELECT` ## Configuring Codatum {#configure} 1. Open global nav > **Workspace settings** > **Data management** > **Connections**, then select **New connection**. 2. Select **Snowflake**. 3. Enter a **Connection name**. 4. Select an **Access level**. 5. Enter the following. | Item | Description | | --- | --- | | Organization name | The name of your Snowflake organization (see [account identifier](https://docs.snowflake.com/en/user-guide/admin-account-identifier#label-account-name-find)) | | Account name | The name of your Snowflake account (don't confuse this with the full account identifier, which includes the organization name) | | Username (login name) | The login name of the user you prepared | | Role | The name of the role you prepared | | Warehouse name | The name of the warehouse you prepared | | Database name | The default database used when statements run (this doesn't limit which tables or schemas can be referenced in SQL) | | Authentication method | `Key-pair authentication` (currently the only option) | | Private key | The entire private key, including `-----BEGIN PRIVATE KEY-----` through `-----END PRIVATE KEY-----` | | Passphrase (if the private key is encrypted) | Enter only if the private key is encrypted | The **Organization name** and **Account name** can contain only letters, numbers, hyphens (`-`), and underscores (`_`) ([Limits](../../../reference/limits#fixed-limits)). To change the **Organization name** or **Account name** of a saved connection, also enter the **Private key** again. After entering these, run **Test connect**, then save the connection. On the sync targets screen shown after saving, select the databases/schemas to sync ([Table metadata sync](../../catalog/metadata-sync#sync-target)). You can also skip this step. ## Network Codatum **doesn't provide a fixed IP address** for connections. If your Snowflake setup requires IP allowlisting, contact Codatum support. --- --- url: 'https://docs.codatum.com/features/connection/warehouses/redshift.md' description: Setting up an Amazon Redshift connection --- # Redshift (Preview) Connect Codatum to Redshift to run SQL and manage data. Supported targets are **RA3 node clusters** and **serverless**. For an overview of connections in general, see [Connection](../overview). ::: info This feature is in **preview**. To request access, contact Codatum support. ::: ## Preparing AWS * DB: Grant the integration role `USAGE` on the schema, `SELECT` on the tables, and `SELECT` on `svv_table_info`. * IAM: Grant `AmazonRedshiftFullAccess` to the integration IAM user. * Secrets Manager: Create a secret for the connection target and add the `RedshiftDataFullAccess` tag (the value can be empty). ## Configuring Codatum {#configure} 1. Open global nav > **Workspace settings** > **Data management** > **Connections**, then select **New connection**. 2. Select **Amazon Redshift** (only shown if it's available to you). 3. Enter a **Connection name** and select an **Access level**. 4. Enter the following. | Item {.nowrap} | Description | | --- | --- | | Account ID | Your AWS account ID | | Region | The region of your Redshift resources | | Connection type | **Cluster** or **Serverless** (default is cluster) | | Cluster identifier | When the connection type is cluster | | Serverless namespace | When the connection type is serverless | | Serverless workgroup name | When the connection type is serverless | | Default database | The database to connect to (this doesn't limit which SQL you can run) | | AWS access key ID | The access key ID of the IAM user | | AWS secret access key | The secret access key of the IAM user | | Secret ARN | The ARN of the secret in Secrets Manager | The **Region** can contain only letters, numbers, and hyphens (`-`) ([Limits](../../../reference/limits#fixed-limits)). After entering these, run **Test connect**, then save the connection. On the sync targets screen shown after saving, select the databases/schemas to sync ([Table metadata sync](../../catalog/metadata-sync#sync-target)). You can also skip this step. --- --- url: 'https://docs.codatum.com/features/connection/warehouses/databricks.md' description: Setting up a Databricks connection --- # Databricks (Preview) Connect Codatum to Databricks to run SQL and manage data. Supported targets are **serverless SQL warehouses**. For an overview of connections in general, see [Connection](../overview). ::: info This feature is in **preview**. To request access, contact Codatum support. ::: ## Preparing Databricks ### Account console * Create a service principal for the integration under User management > Service principals. * Generate an OAuth secret under Credentials & secrets, and note the client ID/secret. * Leave all role settings for the service principal turned off. * Add the service principal to the workspace you're connecting to. ### Workspace admin console * Grant the service principal `Can Use` on the SQL warehouse you're connecting to. * Grant `SELECT` / `USE CATALOG` / `USE SCHEMA` on the catalog. ## Configuring Codatum 1. Open global nav > **Workspace settings** > **Data management** > **Connections**, then select **New connection**. 2. Select **Databricks**. 3. Set a **Connection name** and **Access level**. 4. Enter the following. | Item {.nowrap} | Description | | --- | --- | | Server hostname | The hostname from the SQL warehouse's connection details (for example, `.cloud.databricks.com`). To change it for a saved connection, also enter the **Client ID** and **Client secret** again. | | HTTP path | The HTTP path from the SQL warehouse's connection details (for example, `/sql/1.0/warehouses/`) | | Warehouse ID | The ID from the SQL warehouse's overview | | Client ID | The client ID of the service principal | | Client secret | The client secret of the service principal | After entering these, run **Test connect**, then save the connection. On the sync targets screen shown after saving, select the databases/schemas to sync ([Table metadata sync](../../catalog/metadata-sync#sync-target)). You can also skip this step. --- --- url: 'https://docs.codatum.com/features/connection/warehouses/postgresql.md' description: 'Setting up a PostgreSQL connection, and how SQL runs and results are handled' --- # PostgreSQL (Preview) Connect Codatum to PostgreSQL to run SQL and sync table metadata. Codatum runs SQL in read-only transactions. For an overview of connections in general, see [Connection](../overview). ::: info This feature is in **preview**. To request access, contact Codatum support. ::: ## Preparing PostgreSQL {#prepare} ### Setting up the network {#prepare-network} 1. Make your database reachable from the internet at a public IPv4 address ([Network](#network)). 2. If you restrict connections by IP address, allow connections from Codatum's [outbound IP addresses](../ip-addresses). 3. If TLS isn't enabled on the server, enable it ([TLS and authentication](#tls-and-auth)). ### Creating a role {#prepare-role} Create a role with the `LOGIN` attribute for Codatum, and grant it `USAGE` on the schemas and `SELECT` on the tables you want to use. If you've revoked `CONNECT` on the database from `PUBLIC`, also grant `CONNECT` on the database to the role. Don't grant write or administrative privileges to the role, because a read-only transaction doesn't prevent every operation. We recommend setting a connection limit on the role for Codatum with `ALTER ROLE CONNECTION LIMIT `. If a connection is refused, see [When the connection test fails](#connection-test-failed). ## Configuring Codatum {#configure} 1. Open [global nav](../../../guide/screen-layout) > **Workspace settings** > **Data management** > **Connections**, then select **New connection**. 2. Select **PostgreSQL** (only shown if it's available to you). 3. Enter a **Connection name** and select an **Access level**. 4. Enter the following. | Item {.nowrap} | Description | | --- | --- | | Host | The hostname to connect to. For hostname verification, see [TLS and authentication](#tls-and-auth). | | Port | An integer from 1 to 65535 (default `5432`). | | Database | The database to connect to. You can sync and query only this database. To use multiple databases, create a connection for each database. | | User | The role to connect as. Specify the role you created in [Creating a role](#prepare-role). | | CA certificate | The certificate of the CA that verifies the server certificate (PEM format). Optional. | | Skip hostname verification | Can be turned on only when a **CA certificate** is set (off by default). | | Password | An **Authentication** item. At least one of **Password** and **Client certificate** is required. | | Client certificate | An **Authentication** item. The certificate for certificate authentication (PEM format). Set it together with **Client key**. | | Client key | An **Authentication** item. The private key for the **Client certificate** (PEM format). | After entering these, run **Test connect**, then save the connection. On the sync targets screen shown after saving, select the schemas to sync ([Table metadata sync](../../catalog/metadata-sync#sync-target)). You can also skip this step. ## Network {#network} * Codatum connects over the internet to the IPv4 addresses that **Host** points to. * If **Host** points to an address that isn't used on the internet, such as a private IP address or a loopback address, Codatum can't connect. * Codatum can't connect to a host that has only IPv6 addresses. * Codatum connects from one of its [outbound IP addresses](../ip-addresses). * Codatum doesn't support connecting through an SSH tunnel, a VPN, VPC peering, or similar methods. ## TLS and authentication {#tls-and-auth} * TLS is required. Codatum connects with TLS 1.2 or later. * If you don't set a **CA certificate**, Codatum verifies the server certificate as one issued by a public certificate authority (CA). If your server uses a certificate issued by any other CA, you need to set the **CA certificate**. * If you set a **CA certificate**, Codatum verifies the server certificate against that CA only. * By default, Codatum checks that the name in **Host** is included in the server certificate. If you enter an IP address in **Host**, the connection fails unless the server certificate includes that IP address. * When **Skip hostname verification** is on, Codatum only checks that the server certificate was issued by the CA in **CA certificate**, and doesn't check the hostname. Use it for databases whose server certificate doesn't include the hostname you connect to, such as when the database uses a per-instance CA. * Use it only when the CA in **CA certificate** is dedicated to that database. If you set a CA shared by multiple servers or a public CA, certificates that the CA issued to other servers also pass verification. * For authentication, use a **Password**, a pair of **Client certificate** and **Client key**, or both. At least one is required. * Set both **Client certificate** and **Client key**. * There's no field for a private key passphrase. * After you save a connection, its **Password**, **Client certificate**, and **Client key** aren't shown. To change them, select **Edit** and enter them again. * To change the **Host**, **Port**, **CA certificate**, or **Skip hostname verification** of a saved connection, enter the **Password**, or the **Client certificate** and **Client key**, again. ## Supported versions {#supported-versions} * Codatum supports the PostgreSQL versions that the PostgreSQL development team supports. You can check the supported versions in the [PostgreSQL versioning policy](https://www.postgresql.org/support/versioning/). * You can't connect to servers older than version 14. **Test connect** fails for them. ## Running SQL {#query-execution} * Codatum runs SQL in a read-only transaction. SQL that changes data fails with a PostgreSQL error. * Each run can send only one SQL statement. Sending multiple statements fails with `cannot insert multiple commands into a prepared statement`. * Codatum rolls back the transaction after each run. Settings that your SQL changes with `SET` or similar commands don't carry over to the next run. * Codatum doesn't override `search_path`. The values set for the role or the database apply. * The number of SQL statements that one connection runs at the same time is limited. Any additional SQL waits until other runs finish. If it can't start within a certain time, it fails. * SQL can run for up to 15 minutes. * The SQL editor shows the number of result rows estimated by the PostgreSQL planner as **Est. rows**. The estimate can differ greatly from the actual count. * While SQL runs, Codatum sets the session's `application_name` to a value that starts with `codatum:` ([Job label](../job-label#postgresql)). ### Error display {#error-display} Reports, signed embeds, and public links show `Query job failed` instead of the error that PostgreSQL returned. In [Codatum CLI](../../cli/overview), you can check SQL error details with `sql run` and `sql get-job-metadata`. ## Run results {#results} ### Run result limits {#result-limits} * Codatum cuts off a run result when it reaches either 1,048,575 rows or 100 MiB (uncompressed). Cutting off a run result isn't an error. * When Codatum cuts off a run result, it shows a warning above the run result that says whether the row limit or the size limit was reached. Codatum also shows the warning when a download or a copy to the clipboard finishes. * If a single row is larger than 16 MiB, the SQL run fails with `A row in the query result exceeds the size limit of 16 MiB.`. * Downloads also write the run result cut off at these limits. The download menu shows these limits as **Up to 100 MiB or 1,048,575 rows**. For a list of limits, see [Limits](../../../reference/limits#fixed-limits). ### Run result retention {#result-retention} * Run results become eligible for deletion 2 days after the run. The time when the deletion completes isn't fixed. * A range you have viewed might stay available after the 2 days. * If you open a range you haven't viewed after the run result is deleted, `Execution result has expired` appears. Run the SQL again. * When you download the run result of a SQL block in a notebook more than 24 hours after the run, Codatum runs the SQL again before writing the file. ### Value representation {#value-representation} Codatum converts values of the following types in run results. | Type {.nowrap} | Representation | | --- | --- | | `bigint` (`int8`), `numeric` | A string, to keep precision. | | `timestamp with time zone` (`timestamptz`) | Converted to UTC with a trailing `Z` (for example, `2025-01-02T03:04:05.123456Z`). | | `timestamp without time zone` (`timestamp`) | No time zone (for example, `2025-01-02T03:04:05.123456`). | | `date` | `YYYY-MM-DD` (for example, `2025-01-02`). | | `time without time zone` (`time`) | No time zone (for example, `03:04:05.123456`). | | `real`, `double precision` | A number. `NaN`, `Infinity`, and `-Infinity` are strings. | | `json`, `jsonb` | A JSON value. Numbers inside the JSON become strings. | | `bytea` | Uppercase hexadecimal, without `\x`. | | Arrays, enums, extension types, and so on | A string in PostgreSQL's text representation. | For how date and time types are handled, see [Dates, times, and timezones](../../notebook/datetime-timezone). ## Feature support {#feature-support} * The information that [table metadata sync](../../catalog/metadata-sync#warehouse-differences) imports differs in part from other warehouses. * The same table synced from different connections appears as separate tables in the catalog ([Table identity](../../catalog/metadata-sync#table-identity)). * PostgreSQL SQL can't reference [inline tables](../../notebook/inline-table#sql-reference). You also can't save PostgreSQL run results as inline tables. * [Column stats](../../notebook/doc-page/sql-block#column-stats) in SQL blocks calculate all values exactly. * The **PostgreSQL functions** list that you open with `/` in the SQL editor includes only commonly used functions. It doesn't cover all PostgreSQL functions. ## When the connection test fails {#connection-test-failed} When **Test connect** fails, the error appears under `Error connecting to PostgreSQL`. Check the following based on the error. 1. If an error that starts with `Could not reach the database within the time limit.` appears, check that you allow connections from the [outbound IP addresses](../ip-addresses), and that **Host** and **Port** are correct. If the database is stopped, start it and try again. 2. If `Connection failed. Please verify the connection settings and credentials.` appears, check the following. The error is the same regardless of the cause. * **Host** points to addresses that are used on the internet ([Network](#network)). * TLS is enabled on the server ([TLS and authentication](#tls-and-auth)). * The **CA certificate** is the certificate of the CA that issued the server certificate ([TLS and authentication](#tls-and-auth)). * When **Skip hostname verification** is off, **Host** is a name included in the server certificate. * **User** is the role you created in [Creating a role](#prepare-role). * **Password**, **Client certificate**, and **Client key** are correct. 3. If `invalid connection settings` appears, check that the **CA certificate**, **Client certificate**, and **Client key** are in PEM format, and that the **Client certificate** and **Client key** are a matching pair. 4. If an error like `PostgreSQL 13 is not supported. Use PostgreSQL 14 or later.` appears, check the server version ([Supported versions](#supported-versions)). 5. If an error that starts with `The database refused the connection because it has reached its connection limit` appears, check the connection limits of the database and the role. 6. If an error that starts with `The database is not accepting connections right now` appears, check whether the database is starting up or shutting down, and try again later. ## When extension operators don't work {#extension-operators} If SQL that uses operators from an extension (such as `hstore`, `ltree`, or `pgvector`) fails with `operator does not exist`, check the following. 1. Check whether the schema where the extension is installed is in the `search_path` of the role for Codatum. 2. If it isn't, add the schema to the role's `search_path`, for example with `ALTER ROLE SET search_path = "$user", public, `. --- --- url: 'https://docs.codatum.com/features/connection/ip-addresses.md' description: >- The fixed IP addresses that Codatum connects to your database from, and how to allow them --- # Outbound IP addresses For some connections, Codatum connects to your database from fixed IP addresses. If you restrict which IP addresses can connect to your database, allow connections from these addresses. ## Allowing connections {#allow} 1. In the firewall or cloud network settings in front of your database (such as security groups), allow connections from all of the [IP addresses](#addresses). 2. If the database itself restricts connection sources (for example, PostgreSQL's `pg_hba.conf`), allow connections from the same IP addresses. ## IP addresses {#addresses} Codatum connects from any of the following IP addresses. Allow all of them. All Codatum workspaces share these IP addresses. Allowing them doesn't limit connections to a specific workspace. | IP address {.nowrap} | | --- | | `35.200.35.210` | | `35.243.121.112` | | `34.146.139.92` | | `34.85.80.97` | ## Connections that use these addresses {#targets} The following connections connect from the fixed IP addresses. * [PostgreSQL](./warehouses/postgresql) BigQuery, Snowflake, Databricks, and Redshift connections don't connect from fixed IP addresses. --- --- url: 'https://docs.codatum.com/features/connection/job-label.md' description: Metadata that identifies the source of SQL on the warehouse side --- # Job label (Beta) Codatum attaches metadata to the SQL it issues to your warehouse, identifying the source (which notebook, report, saved query, or signed embed the SQL ran from). There's no setting for this on the connection screen; it's added automatically at execution time. ::: info This feature is in **beta**. The specification might change without notice. ::: ## What's included and excluded * **Included**: Cell execution in a notebook, saved queries, reports, signed embeds, and ad hoc SQL runs from the [Codatum CLI](../cli/overview), AI Agent, and similar sources. * **Excluded**: Internal metadata retrieval (dry runs, schema fetches, data previews, and so on). ## Source priority Only **one** primary source ID is attached. The priority is: **Report** > **Signed embed** > **Notebook** > **Saved query** When run from a report, the report ID is attached instead of the notebook ID. If none of these IDs apply, the value is `unknown`. ## BigQuery (job labels) | Label key | Value | | --- | --- | | `source` | Always `codatum` | | `cdm_source_type` | `notebook` / `query` / `report` / `signed_embed` / `unknown` | | `cdm__id` | Primary source ID (for example, `cdm_notebook_id` / `cdm_report_id`) | | `cdm_workspace_id` | Workspace ID | | `cdm_connection_id` | Connection ID | | `cdm_actor_type` | `user` / `workflow` / `api_key` / `admin` / `system` (BigQuery label values are lowercase) | You can reference these from the labels in `INFORMATION_SCHEMA.JOBS`. ```sql SELECT job_id, creation_time, total_bytes_billed, (SELECT value FROM UNNEST(labels) WHERE key = 'cdm_source_type') AS source_type, (SELECT value FROM UNNEST(labels) WHERE key = 'cdm_notebook_id') AS notebook_id, (SELECT value FROM UNNEST(labels) WHERE key = 'cdm_report_id') AS report_id FROM `region-us`.INFORMATION_SCHEMA.JOBS WHERE creation_time > TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 7 DAY) AND EXISTS (SELECT 1 FROM UNNEST(labels) WHERE key = 'source' AND value = 'codatum') ``` Change `region-us` to match the region of the target dataset. ## Snowflake (QUERY\_TAG) Codatum attaches equivalent source information as a **QUERY\_TAG** (JSON). Reference the `QUERY_TAG` column in `QUERY_HISTORY`. | Key | Value | | --- | --- | | `source` | Always `codatum` | | `source_type` | `notebook` / `query` / `report` / `signed_embed` / `unknown` | | `notebook_id` / `query_id` / `report_id` / `signed_embed_id` | Primary source ID (only one is present) | | `workspace_id` | Workspace ID | | `connection_id` | Connection ID | | `actor_type` | The type of actor that ran the query (for example, `USER`). Uppercase in Snowflake / SQL comments | ## Redshift / Databricks (leading SQL comment) Codatum attaches this as a leading comment on the SQL it runs. Reference it from the SQL text in the run history. Example format: ```sql /* codatum source_type=notebook notebook_id=... workspace_id=... connection_id=... actor_type=USER */ SELECT ... ``` The keys have the same meaning as the Snowflake QUERY\_TAG. ## PostgreSQL (application\_name) {#postgresql} While SQL runs, Codatum sets the session's `application_name` to `codatum:` followed by the query job ID. You can reference it from `application_name` in `pg_stat_activity`. * The source (notebook, report, saved query, or signed embed) and the workspace aren't included. * The `application_name` of connections that run SQL (including getting **Est. rows** in the SQL editor) starts with `codatum:`. * Codatum doesn't set `application_name` on connections for table metadata sync, table previews, or **Test connect**. ## Use cases * Table inventory: Mechanically determine which notebooks or reports reference which tables. * Cost analysis: Identify expensive or slow SQL, then trace it back to the notebook or report that issued it. --- --- url: 'https://docs.codatum.com/features/catalog/overview.md' description: Manage metadata for tables and saved queries --- # Catalog The catalog lets you view lists and details of tables and saved queries, and add descriptions and tags to them. Open it from [global nav](../../guide/screen-layout) > **Catalog**. Table metadata comes from [connections](../connection/overview). There's no dedicated resource role for the catalog. Viewing and editing follow the permissions of the related connection. See [Catalog](../../permissions/resources/catalog) for details. ## Key features * [Table metadata sync](./metadata-sync): Syncs table and column metadata from connections, updated on a schedule or manually. * [Annotations](./annotation): Add descriptions and tags to tables and columns. * [Popularity and references](#popularity-and-references): Check popularity based on query jobs, and reference relationships. * [Filtering and search](#search-filters): Filter the list by common filters, connection, or search keys. * [Creating notebooks/queries](#create-from-catalog): Create a notebook or saved query from the catalog. ## Screen layout Switch between **Tables** and **Queries** in the [left sidebar](../../guide/screen-layout). * **Tables**: List and details of synced tables. * **Queries**: List and details of saved queries. The left sidebar also lets you set the following filters. * **Common filters**: **Starred** (starred items only). The query side also has **Created by me**. * **Connections**: Filter by connection. Select **Manage connections** to go to the [connection](../connection/overview) settings screen. ### Table detail Opening a table shows the following tabs. | Tab {.nowrap} | Contents | | --- | --- | | **Overview** | Connection, structure, description, type, tags, storage information, and dates | | **Columns** | Column list. You can edit descriptions and tags | | **Preview** | A preview of the table data (up to 100 rows; see [Limits](../../reference/limits#fixed-limits)) | | **References** | Referencing notebooks / referencing queries | | **Query jobs** | Query jobs that referenced this table | | **Other** | Definition, data location, view query, partitioning, and other retrieved items | ### Query detail Opening a query shows the following tabs. | Tab {.nowrap} | Contents | | --- | --- | | **Overview** | Metadata such as description and tags | | **Columns** | Column information | | **SQL** | The saved SQL | | **Preview** | A preview of the execution results | | **References** | Reference relationships | | **Query jobs** | Related query jobs | You can also edit and manage the query itself from the [Query](../saved-query/overview) screen. ## Popularity and references {#popularity-and-references} The catalog lets you check how much a resource is used (**popularity**) and where it's referenced from (**references**). ### Popularity {#popularity} Shown in the **Popularity** column of the list (for both tables and queries). * Popularity is based on the number of **query jobs** that reference the resource. * The tooltip shows the number of referencing jobs, and **View job list** takes you to the **Query jobs** tab for details. Popularity is shown as a relative score. If there are no jobs, popularity is empty (or 0). ### References {#references} The **References** tab on the detail screen shows the following. * **Referencing notebooks**: Notebooks that reference this table (or query). * **Referencing queries**: Saved queries that reference this table (or query). If there are no references, it shows **Not referenced**. ### Query jobs {#query-jobs} The **Query jobs** tab on the detail screen shows the history of query jobs that referenced this resource. You can also use it as the list of jobs behind the popularity score. ## Filtering and search {#search-filters} In addition to keywords, the search field above the list lets you filter using the following keys, chosen from suggestions. You can combine multiple keys separated by spaces. Suggestions appear as you type a key. ### Table | Key {.nowrap} | Description | | --- | --- | | `connection:` | Connection | | `database:` | Database (project, for BigQuery) | | `schema:` | Schema (dataset, for BigQuery) | | `type:` | Table type | | `tag:` | Table tag | | `updatedBy:` | Updated by | | `is:` | `starred` (starred items only) | | `sortBy:` | Sort order. Suggestions are `Popularity` / `Rows` | ### Query | Key {.nowrap} | Description | | --- | --- | | `connection:` | Connection | | `tag:` | Query tag | | `createdBy:` | Created by | | `updatedBy:` | Updated by | | `is:` | `starred` (starred items only) | | `sortBy:` | Sort order. Suggestions are `Popularity` / `Updated` | Applied conditions appear as tags near the search field (for example, `is:starred`). ## Starred Use the star icon in the list or detail screen to star or unstar a table or query. You can filter starred resources using **Common filters** > **Starred** in the left sidebar, or with `is:starred` in search. ## Creating notebooks/queries {#create-from-catalog} The **Actions** menu on the list lets you create resources starting from the selected item. * **Create notebook**: Creates a notebook from a table or query. * **Create query**: Creates a saved query from a table (table list only). **Create notebook** is disabled if you've reached your notebook limit. --- --- url: 'https://docs.codatum.com/features/catalog/metadata-sync.md' description: Syncing table and column metadata from connections into the catalog --- # Table metadata sync Syncing table metadata saves information about tables and columns to Codatum, where it becomes available in the [catalog](./overview) and elsewhere. Automatic sync runs for connections where roughly **7 days** have passed since the last sync check. If you need an immediate update, sync manually. SQL execution results are returned regardless of the table metadata sync status. If results don't seem up to date, you might be seeing a cached result (see the cache section of [SQL block](../notebook/doc-page/sql-block#cache)). ## Table identity {#table-identity} Synced tables are managed by the underlying object on the warehouse, not by connection. Within a workspace, the same underlying object is treated as a single table. The elements that determine identity vary by warehouse. | Warehouse {.nowrap} | Matching elements | | --- | --- | | BigQuery | Project / dataset / table | | Snowflake | Account / database / schema / table | | Databricks | Host and SQL warehouse / catalog / schema / table | | Redshift | Account, region, cluster (or namespace) / database / schema / table | | PostgreSQL | Connection / database / schema / table | For example, in BigQuery, tables are the same if the project, dataset, and table match. Even from different connections, they appear as a single entry in the catalog. In PostgreSQL, the same table synced from different connections appears as separate tables in the catalog. When multiple connections sync the same table, Codatum handles it as follows. * The catalog shows it as a single table. You can see the related connections on the table detail. * Descriptions, tags, and other annotations are shared across the same table. * You can view it if you have read permission on any related connection, and edit it if you have run permission on any related connection. See [Catalog permissions](../../permissions/resources/catalog) for details. ## Information collected Codatum imports the following from your warehouse (some fields might be empty depending on the warehouse or permissions). * Table structure: database name, schema name (dataset name for BigQuery), table name, table type * Table description * Row count * Table size (bytes) * Table creation and update timestamps * Column name, data type, column description, and nullability The **Other** tab on the table detail shows whatever additional items are available, such as definition, data location, view query, and partition information. ### Differences by warehouse {#warehouse-differences} * **Redshift**: Sync works as follows. * Codatum syncs tables, views, and materialized views. External tables (Redshift Spectrum) aren't synced. * Schemas whose names start with `pg_` and `information_schema` aren't synced. * Columns of late-binding views (views created with `WITH NO SCHEMA BINDING`) are also imported. Whether these columns allow NULL isn't imported. * Column descriptions aren't imported during sync. Table update timestamps aren't imported either. * **PostgreSQL**: Sync works as follows. * Only the database set in the connection's **Database** field is synced. * Codatum syncs tables, views, and materialized views that the connection's role has `SELECT` privilege on, in schemas where the role has `USAGE` privilege. Schemas whose names start with `pg_` and `information_schema` aren't synced. * Foreign tables aren't synced. For partitioned tables, only the parent table is synced, not the partitions (child tables). * Table and column descriptions are imported from the values set with `COMMENT`. * The row count is an estimate from PostgreSQL statistics. For a table that has never been analyzed with `ANALYZE`, the row count is 0. * The table size of a partitioned table's parent doesn't include the size of its partitions. * Table creation and update timestamps aren't imported. * **BigQuery** and others: Warehouse-specific information such as partitioning and clustering might appear in **Other**. ## When sync runs * **Automatic sync**: Runs for connections where roughly 7 days have passed since the last sync check. * **Manual sync**: Open the target connection under [global nav](../../guide/screen-layout) > **Workspace settings** > **Data management** > **Connections**, then select **Resync Immediately** in **Table sync settings**. * **When saving sync targets**: Selecting **Save and sync** while editing **Sync targets** triggers a sync after the targets are updated. ## Sync targets {#sync-target} Choose the databases/schemas (datasets) to sync from **Table sync settings** on the connection detail. You can also set **Sync targets** when creating the connection. * **Auto add datasets** (BigQuery) / **Auto add schemas** (other warehouses): Automatically adds newly created databases/schemas, or ones you've newly been granted access to, to the sync targets (on by default). This doesn't apply once the number of schemas/datasets in a database exceeds a certain threshold. * You can select up to 200 schemas/datasets. The demo connection has fixed sync targets that can't be edited. See [Demo connection](../connection/overview#demo-connection) for details. [Codatum Data Connection](../connection/overview#codatum-data-connection) also has fixed sync targets that can't be edited. See [Connection permissions](../../permissions/resources/connection#codatum-data-connection) for details. ## Sync status The on-screen labels map to the following status codes. | Label {.nowrap} | Code | | --- | --- | | QUEUED | `PENDING` | | PROCESSING | `RUNNING` | | SUCCESS | `SUCCESS` | | WARNING | `WARNING` | | FAILED | `ERROR` | You can check the sync history from **Sync history** in **Table sync settings** on the connection detail. ## Where it's used Synced table metadata is used in the following, among others. * [Catalog](./overview) * Autocomplete in SQL blocks * Column information in table overviews across various features ## Permissions * Viewing synced table metadata is limited to users with read permission on a connection associated with the table. * For how Codatum handles tables synced by multiple connections, see [Table identity](#table-identity). * **Resync Immediately** and changing sync targets require run permission on the target connection. See [Connection permissions](../../permissions/resources/connection) for details. ## Limits * Number of synced tables: Depends on your contract (check under [global nav](../../guide/screen-layout) > **Workspace settings** > **Usage**). * Number of schemas (datasets) you can select as sync targets: Up to 200. * Number of tables that can be synced per schema: Up to 1,000. See also [Limits](../../reference/limits#fixed-limits) (fixed limits) and [Limits that depend on your contract](../../reference/limits#plan-limits). ## If a table can't be found 1. Check the sync status for errors. 2. Confirm the database and table are selected as a [sync target](#sync-target). 3. Confirm the connection's credentials have permission to read the table. 4. If it's still not found, run **Resync Immediately**. --- --- url: 'https://docs.codatum.com/features/catalog/annotation.md' description: Adding descriptions and tags to tables and columns --- # Annotation The catalog lets you add a **description** and **tags** to tables and columns. This combination is called an annotation. Bulk updates from the CLI are also supported; see the [Codatum CLI documentation](https://cli-docs.codatum.com) for details. For tag definitions and types, see [Tag](../../workspace/data-management/tag#tag-types). ## Targets | Target {.nowrap} | What you can do | Example UI location | | --- | --- | --- | | Table | Add a description and tags | **Overview** on the table detail, or the description/tag columns in the list | | Column | Add a description and tags | **Columns** on the table detail | ### Adding tags to tables/columns Add these from the table list or detail in the [catalog](./overview). * Table: **Add tag** in **Overview**, or **Add tag** in the tag column of the list. * Column: **Add tag** on the **Columns** tab. You can only add a **table tag** to a table, and a **column tag** to a column. If a description was synced from the warehouse, you view and edit it in the same **Description** field in the catalog. See [Table metadata sync](./metadata-sync) for how syncing works. ## Difference from saved queries The description and tags on a saved query are managed as query-side metadata, separate from table annotations. You can edit them from the catalog's **Queries** list/detail, or from the [Query](../saved-query/overview) screen. ## Permissions To edit a description or tags on a table or column, you need run permission on at least one of the related connections. Viewing depends on read permission on the related connections. Creating and editing tag definitions is controlled by workspace role (see [Tag](../../workspace/data-management/tag#tag-definition)). For details, see [Catalog](../../permissions/resources/catalog). ## Search Descriptions and tags are included in keyword search. For search across resource types, see [Quick search](../quick-search/overview). --- --- url: 'https://docs.codatum.com/features/saved-query/overview.md' description: SQL you save and reuse per connection --- # Query (Beta) Query (sometimes called a **saved query**) lets you save SQL to reuse per [connection](../connection/overview). You can reference the same SQL from multiple notebooks, or run it directly from the query screen. Open it from [global nav](../../guide/screen-layout) > **Queries**. There's no dedicated resource role. What you can do depends on the permissions of the connection it belongs to. See [Query permissions](../../permissions/resources/query) for details. ::: info This feature is in **beta**. The specification might change without notice. ::: ## Key features * Saving and running SQL: Edit and save SQL on the query screen, then run it with **Run**. * Organizing with folders: Organize queries under each connection. * Notebook integration: **Save SQL** from a SQL block, and reference a saved query with `/` (see [SQL block](../notebook/doc-page/sql-block)). * **Queries** tab in the [catalog](../catalog/overview): View and edit metadata (description, tags, columns, references, popularity, and so on). * [Workflow](../workflow/overview): Run a saved query on a schedule. * [Tags](../../workspace/data-management/tag): Add query tags. Definitions are managed in workspace settings. * [Exporting as a table function](#export-table-function): Export a BigQuery saved query as a table function in a dataset. ## Creating a query ### From the query screen 1. Open [global nav](../../guide/screen-layout) > **Queries**. 2. Select **New query** (opens a draft where you can choose a connection). 3. Edit the SQL, then select **Save** and specify a name, connection, and folder to save it for real. Selecting **New query** from a connection or folder in the [left sidebar](../../guide/screen-layout) creates an empty query directly at that location. You can also create and move folders from the left sidebar. ### From a notebook 1. Select **Save SQL** from the menu at the top right of a SQL block. 2. Specify a name, connection, and folder, then save. Saving behaves as follows. * References to other SQL blocks or saved queries are saved as expanded SQL strings. * Parameters are saved with their current values substituted in. * The description automatically includes a link back to the source notebook (`Source notebook: ...`). * If a recent execution result exists, column information can also be saved. ## Editing, running, and managing | Action {.nowrap} | Description | | --- | --- | | **Save** / **Save as...** | Updates the SQL, name, and so on. You can also save as a copy | | **Run** | Runs the SQL using the credentials of the connection it belongs to | | Star | Add or remove from the **Starred** tab in the list, and from quick search | | Description/tags | Edit from the query detail, or from the [catalog](../catalog/overview) | | Columns | You can add descriptions and tags (managed based on the columns from execution results) | | **Create notebook** | Creates a new notebook that includes this query | | Move/delete | Available from the left sidebar or the detail menu. You can only move within the same connection | | **History** | View past versions | | **Export as table function** | Exports a BigQuery saved query as a table function | Once saved, you can't change the connection a query belongs to. To use a different connection, recreate it as a new query with **Save as...** or similar. ## Table function export {#export-table-function} You can export a query saved on a BigQuery connection as a BigQuery table function. The menu isn't shown for drafts or for connections other than BigQuery. The SQL used for the export is the saved SQL. Unsaved edits in the editor aren't used. If a table function with the same name already exists, it's overwritten. ## Exporting as a table function You can't select **Export as table function** in the following cases. * You don't have run permission on the connection. * The query has no column information. * There are unsaved changes. 1. Open [global nav](../../guide/screen-layout) > **Queries**, then open the query. 2. From the **Save** menu in the [header](../../guide/screen-layout), select **Export as table function**. 3. Specify a **Project** (defaults to the connection's project ID), **Dataset**, and **Function name** (defaults to a name generated from the query name). 4. Select **Export**. ## Integration with notebooks * **Referencing**: In a SQL block, type `/` and insert from **Saved query**. This embeds the SQL as of the time you inserted it, and that embedded SQL is what runs. If the source query changes, the reference chip shows **Diff found**, and you can apply it with **Update embedded query**. * **Saving**: **Save SQL** turns references and parameters into fixed, expanded SQL. See [SQL block](../notebook/doc-page/sql-block) for the notebook side of this. ## Constraints * You can't change which connection a query belongs to (after saving). * You can only move a query or folder within the same connection. * Folders can be nested up to 5 levels deep ([Limits](../../reference/limits#fixed-limits)). * Deleting a folder also deletes the queries in it. * The maximum number of queries depends on your contract ([Limits](../../reference/limits#plan-limits); check under [global nav](../../guide/screen-layout) > **Workspace settings** > **Usage**). * [Deleting a connection](../connection/overview) also deletes its related saved queries. * The table function is exported with no arguments. * The SQL must start with SELECT or WITH. Multiple statements aren't allowed. * The connection's credentials must be able to create and replace a table function in the target dataset. * On success, the export destination is shown. * On failure, the dialog shows the reason. * Table function export history keeps the latest 50 successful and failed runs on BigQuery ([Limits](../../reference/limits#fixed-limits)). Exports that were rejected before they ran aren't kept. * You can review the history grouped by destination under [right sidebar](../../guide/screen-layout) > **About this query** > **Exports**, including the time, who exported it, and the DDL. * Submitting the same export too many times in a short period is rejected. * If a project or dataset isn't in the list, you can enter its ID. ## Permissions See [Query permissions](../../permissions/resources/query) for the conditions for each action. Viewing requires a connection's read-level permission; editing, running, exporting as a table function, and folder operations require its run permission. --- --- url: 'https://docs.codatum.com/features/notebook/overview.md' description: 'Real-time collaborative editing, page types, and key features of notebooks' --- # Notebook A notebook is your workspace for data analysis. You can bring SQL, charts, and text together in a single document, with real-time collaborative editing. Access it from [the global nav](../../guide/screen-layout) > **Notebooks**. A notebook consists of multiple pages. Use a [doc page](./doc-page/overview) for analysis work, and a [grid page](./grid-page/overview) for dashboard layouts. You can also use **section dividers** in the page list. See [notebook permissions](../../permissions/resources/notebook) for details on permissions. With real-time collaborative editing, the content of a notebook (SQL, charts, text, and so on) is synced between users who have the same page open. See [Parameter](./parameter/overview) for how parameters and run results are synced. To keep parameter operations independent per user, use [Version](./version) or [Report](./sharing/report/overview). ## Key features * [Folder](./folder) / [Teamspace](../../workspace/administration/teamspace): placement, access scope, and sorting and filtering the list * [Doc page](./doc-page/overview): a flow-based block editor (insert with `/`) * [Grid page](./grid-page/overview): tile layout for charts and more. [Cross filter](./grid-page/cross-filter) * [Markup page](./markup-page/overview): dashboards built by writing elements as tags * [SQL block](./doc-page/sql-block): SQL editing, execution, result display, chart creation, and [caching](./doc-page/sql-block#cache) * [Running](#run): running SQL per SQL block, per page, or across multiple pages * [Parameter](./parameter/overview): embedding in SQL, input forms, and placement on grid pages * [Chart](./chart/overview): visualization based on dimensions and metrics * [Explorer](./explorer): explore data with a GUI and create charts or SQL blocks * [Inline table](./inline-table): small tables you edit in a notebook as a sheet or CSV and reference from SQL, with column formulas and lookups from SQL block results and [agent connectors](./inline-table#connector-reference), and writing to Google Sheets * [Comment](./comment): comments and mentions in the notebook body * [Version](./version): save, restore, and compare analysis states * [Lock](#lock): prevent accidental edits (**Unlocked** / **Query only** / **Locked**) * [Notebook theme](../../workspace/administration/theme): customize chart colors and fonts * [Export and import](./export) * [Sharing](./sharing/overview): permissions / report / public link / signed embed * [Dates, times, and timezones](./datetime-timezone): the timezones used to display and aggregate dates and times in results * [FAQ](./faq) ## Creating and managing notebooks {#create-manage} ### Creating You can create a notebook in either of the following ways. 1. Open [the global nav](../../guide/screen-layout) > **Notebooks**, then select **Create notebook** or **Create from template**. 2. In the folder tree in [the left sidebar](../../guide/screen-layout), open **Add notebook or folder** and select **New notebook**. You can also use a template or import a file from the same menu. On the top screen, you can find notebooks using the **Recently viewed**, **Created by me**, **Starred**, and **Active** tabs. ### Creating from a template {#templates} **Create from template** lets you create a new notebook from one of the available notebook templates. Templates are listed by category. After reviewing a template, select **Create from template** / **Create** to create the notebook. ### Adding pages {#add-page} In the page list at the top of [the left sidebar](../../guide/screen-layout) inside a notebook, select **Add** > **Page** to add a page. | Type {.nowrap} | Description | | --- | --- | | [**Doc page**](./doc-page/overview) | A flow-based document format for placing SQL, charts, text, and more. | | [**Grid page**](./grid-page/overview) | Arranges charts defined on doc pages as a dashboard. | | [**Markup page**](./markup-page/overview) | Builds a dashboard by writing charts and other items defined on doc pages as tags. Shown in workspaces where the feature is enabled. | | **Section divider** | Used to divide the page list. It has no body content. | You can **Rename**, **Duplicate page**, or **Delete** a page from that page's menu. ### Notebook operations From the menu in [the header](../../guide/screen-layout) inside a notebook, you can perform the following operations. * [**Share**](./sharing/overview): grant permissions, and publish reports, public links, or signed embeds * [**Export**](./export) / **Import pages** * [**Notebook theme**](../../workspace/administration/theme) * [**Version**](./version) * [**Lock notebook**](#lock) * [**Show dependencies**](#dependencies) **About this notebook** in the header shows details such as the created time and size. From the list view, you can move, delete, and star notebooks. ## Running {#run} Running a notebook means running the SQL in SQL blocks and the SQL that fetches the data needed to render charts, and then getting the results. You can run each SQL block on its own, or run a whole page or multiple pages at once. Run results are synced between users who have the same notebook open (see [Syncing parameter values](./parameter/overview#sync)). Whether you can run SQL depends on your permissions for the target [connection](../../permissions/resources/connection). ### Run scope {#run-scope} | Scope {.nowrap} | Action | SQL that runs | | --- | --- | --- | | SQL block | The SQL block's **Run** / **Run with fresh data** | The SQL block, plus the charts and column stats created from its run result. | | Page | **Run all** / **Run all with fresh data** in the upper right of [the main area](../../guide/screen-layout) | Depends on the page type (see the table below). | | Multiple pages | [**Run multiple pages at once**](#run-pages) | The same SQL as **Run all**, on each selected page. | The SQL that **Run all** runs depends on the page type, as follows. | Page {.nowrap} | SQL that runs | | --- | --- | | [Doc page](./doc-page/overview) | All SQL blocks on the page, plus the charts and [column stats](./doc-page/sql-block#column-stats) created from their run results. | | [Grid page](./grid-page/overview) | The **Chart** and **Query result** components placed on the page. Each runs the SQL of the referenced SQL block, with that component's [parameter overrides](./parameter/overview#override) applied. You can't run a component on its own. | | [Markup page](./markup-page/overview) | The chart and SQL result elements on the page, including elements hidden by conditions. | **Run with fresh data** / **Run all with fresh data** run without using the [cache](./doc-page/sql-block#cache). For keyboard shortcuts, see [Keyboard shortcuts](../../account/settings/keyboard-shortcut). ### Running multiple pages at once {#run-pages} 1. From the menu next to **Run all**, select **Run multiple pages at once**. 2. Select the pages to run. To run without using the cache, turn on **Run with fresh data**. 3. Select **Run (n) pages**. Codatum opens the selected pages one by one and runs **Run all** on each. When it finishes, you can see which pages had errors and the error messages, and go to the SQL block or chart that failed. ### Checking run status {#run-status} * When parameter or SQL changes make run results outdated, **Run all** is highlighted. To apply the changes to the run results, run **Run all**. * **View run stats** shows the query time, bytes processed, and cache usage for each SQL in the last **Run all**. ## Lock {#lock} Lock is a feature that prevents accidental edits to a notebook. Switch the state from the **⋯** (horizontal three-dot icon) > **Lock notebook** menu in [the header](../../guide/screen-layout) inside a notebook. Changing this setting requires edit permission on the notebook. You can't change the lock state of a notebook you can only access through sharing. | State {.nowrap} | Description | | --- | --- | | **Unlocked** | Everything can be edited. | | **Query only** | Only parameter changes and SQL execution are allowed. | | **Locked** | Only [comments](./comment) are allowed. | When the state is **Query only** or **Locked**, enabling **Temporarily unlock** lets you remove the lock for yourself only. The lock is automatically restored when you close or reload the notebook. ## Dependencies {#dependencies} Open **Show dependencies** to see a diagram of the SQL blocks and parameters in the notebook, along with their reference relationships. You can also open the same diagram from the menu of a SQL block, a grid component, or a parameter. Use this to trace references between SQL blocks (SQL chains) and parameter reference chains. See [SQL block](./doc-page/sql-block#references) for details on references between SQL blocks. ## Constraints * You can't edit a notebook once its size exceeds 10MB (see [Limits](../../reference/limits#fixed-limits)). * The maximum number of notebooks depends on your contract (see [Limits](../../reference/limits#plan-limits); you can check this from the global nav > **Workspace settings** > **Usage**). ## Permissions See [Notebook](../../permissions/resources/notebook) for the conditions for each operation. Whether SQL can be run is determined by permissions on the target [connection](../../permissions/resources/connection), not by notebook permissions. --- --- url: 'https://docs.codatum.com/features/notebook/doc-page/overview.md' description: A flow-based notebook page type --- # Doc page Doc page is one of the notebook page types. It's a flow-based block editor, used for analysis by arranging SQL blocks, charts, text, and more vertically. You can use the following blocks within a page. While editing, type `/` to choose from a list of available blocks. See [Grid page](../grid-page/overview) for dashboard-style tile layouts. Charts and SQL run results placed on a grid page are first defined on a doc page. ## Key features * A flow-based block editor (arrange SQL blocks, charts, text, and more) * [SQL block](./sql-block): SQL editing, execution, result display, and chart creation * [Parameter](../parameter/overview): an input form at the top of the page and embedding in SQL * [Chart](../chart/overview): visualizing SQL block run results * [Explorer](../explorer): exploring data through a GUI * [Outline](#outline): listing headings, SQL blocks, charts, and table previews, and jumping to them * Full-text search ## Available blocks {#blocks} The blocks available on a doc page are grouped as follows. You can select one while editing by typing `/`, or from **Add** in a block's hover menu. ### Data analysis | Block {.nowrap} | Description | | --- | --- | | **[SQL block](./sql-block)** | Used for SQL editing and execution, showing run results, column statistics, and chart creation. | | **Table preview** | Shows sample rows from a table on a connection within the page. You can also launch Explorer from it. | | **Block chart** | Visualizes the run result of a SQL block on the same page as a [chart](../chart/overview). In addition to placing it as a vertical block, you can convert it to an inline chart and place it within a list or text table. | | **Scalar value reference** | Embeds the value of a specified column from the first row of a SQL block's run result on the same page, directly within text. | ### Code | Block {.nowrap} | Description | | --- | --- | | **Code block** | Displays code with syntax highlighting. | | **Diagram block** | Renders a diagram in [Mermaid](https://mermaid.js.org/) format. | | **Block equation** | Displays a formula in [KaTeX](https://katex.org/) format. Inline formulas within text are also supported. | ### Text | Block {.nowrap} | Description | | --- | --- | | **Heading 1** / **Heading 2** / **Heading 3** | Headings within the page (3 levels). | | **Bulleted list** | A list with bullet markers. | | **Ordered list** | A numbered list. | | **Task list** | A list that can track completion state. | | **Togglable list** | A list you can expand and collapse. | | **Divider** | A horizontal line. | | **Callout block** | Emphasizes content by type (info, success, warning, danger). You can also specify an emoji icon. | | **Quote block** | A quote. It can only contain paragraphs or lists. | | **Text table** | A table whose cells can contain paragraphs or lists. Supports cell merging and column width settings. | ### Layout | Block {.nowrap} | Description | | --- | --- | | **2 columns** / **3 columns** / **4 columns** / **5 columns** | A multi-column layout. Each column can contain paragraphs, lists, and charts (SQL blocks and similar can't be placed). | ### Media | Block {.nowrap} | Description | | --- | --- | | **Image** / **Video** | Place a file by selecting or pasting it into the page ([file size limits](../../../reference/limits#fixed-limits)). | | **Link notebook** | A link to another notebook. You can also add it by pasting a URL. | | **Embed block** | Embeds external content from a supported URL, such as YouTube. You can also add it by pasting a URL. | | **Emoji** | Select and insert an emoji from a picker. | ## Outline {#outline} **Outline** in [the left sidebar](../../../guide/screen-layout) lists the headings, SQL blocks, charts, and table previews on the page. Select an item to scroll to it. * Headings are nested according to their level (Heading 1 to Heading 3). * SQL blocks, charts, and table previews are listed under the heading that precedes them. --- --- url: 'https://docs.codatum.com/features/notebook/doc-page/sql-block.md' description: The unit for editing and running SQL within a notebook --- # SQL block A SQL block on a [doc page](./overview) lets you edit and run SQL, view run results, view column statistics, and create charts. Add one from a doc page by typing `/` and selecting **SQL block**. ## Key features * Editing and running SQL * Autocomplete, highlighting, and formatting * Table search and reference insertion via `/` * [References to other SQL blocks](#sql-block-ref) (SQL chains) and [expanding/overriding parameters](#param-in-sql-ref) * [Adding a chart](#add-chart) * [Adding column stats](#column-stats) * [Code snippets](#code-snippet) * Referencing saved queries, and creating saved queries with **Save SQL** (see [Query](../../saved-query/overview)) * Launching [Explorer](../explorer) from a SQL run result * [Column header operations on results](#result-column-menu) * [Display modes](#display-mode) * [Cache](#cache) ## References {#references} In the SQL editor, type `/` to reference the following. | Reference target {.nowrap} | Insert example | Description | | --- | --- | --- | | [Another SQL block](#sql-block-ref) | `/sql/` | Expands the referenced SQL as a subquery. | | Table | `/table/` | Lets you select a table from the catalog. | | Parameter | `/param/` | Embeds a [parameter](../parameter/overview)'s value. | | Saved query | `/query/` | Embeds the SQL at the time of insertion. When the source is updated, select **Update embedded query** to apply the change. See [Query](../../saved-query/overview) for details. | | [Inline table](../inline-table) | `/inline-table/` | Expands an inline table in the notebook at run time. | You can also see reference relationships in the notebook's [dependency diagram](../overview#dependencies). Open **Show dependencies** from a SQL block's menu. ### Referencing SQL blocks {#sql-block-ref} When you reference another SQL block, the referenced SQL is expanded as a subquery at run time. This lets you factor out and reuse common extraction logic, or build up a query while checking intermediate results block by block. * You can reference SQL blocks on the same page, as well as SQL blocks on **other doc pages** within the same notebook. * References to other pages are shown as `Page name.SQL block name`. * Circular references result in an error. #### Inserting 1. In the SQL editor, type `/sql/`, or choose **Reference another SQL block's SQL** from the `/` suggestions. 2. Select the SQL block you want to reference. #### Expansion settings Hovering over a reference chip shows a popup where **Settings** lets you change the following. | Item {.nowrap} | Description | | --- | --- | | **Don't wrap in parentheses** | Off by default. When off, the expanded result is wrapped in `(` `)`. Turning it on omits the wrapping. | | **Add alias at the end** | Only selectable when **Don't wrap in parentheses** is off. Appends `AS` and the SQL block name at the end of the expanded result. | ### Expanding and overriding parameters {#param-in-sql-ref} If the referenced SQL block contains a parameter reference, the value used for expansion is as follows. | Parameter used by the reference target | Value used for expansion | | --- | --- | | [Notebook-wide](../parameter/overview#scope) | The value held by the **referencing source** (the page containing this SQL block). | | [Page-specific](../parameter/overview#scope) | If the referencing page has no definition with the same name, the value from the **reference target**'s page. | If you want to decouple the parameter dependency on the referencing page, use **Override internal parameter references** in the reference chip's popup. | Method {.nowrap} | Description | | --- | --- | | **Override with another parameter** | Replaces the value with another parameter of the same type. | | **Override with a fixed value** | Specifies a fixed value. | | **Don't override** | Expands according to the rules above. | You can override the same way when referencing from a grid page's SQL run result or chart. See [Overriding parameters](../parameter/overview#override) for details. ## Adding a chart {#add-chart} Once SQL runs successfully, select **Chart** in the run result header to open the chart wizard. Configure dimensions, metrics, and so on to add a chart directly below the run result. * See [Chart](../chart/overview) for details on chart types and settings. * You can also add a chart from [Explorer](../explorer). * An added chart can also be placed on a [grid page](../grid-page/overview) using **Add to grid page**. * You can also insert a **Block chart** via `/` to reference the run result of a SQL block on the same page (see [Doc page](./overview#blocks)). ## Adding column stats {#column-stats} Select **Column stats** in the run result header to add the distribution and summary statistics of a result column. Selecting a target column issues a separate SQL query and adds a column stats block. The items shown vary depending on the data type. | Item {.nowrap} | Description | | --- | --- | | **Data type** | The column's data type. | | **Number of NULL values** | The count and percentage of NULLs. | | **Unique count\*** | The number of unique values. | | **Max** / **Min** / **Average** | Shown for numeric, time, and similar types. | | **Percentiles\*** | The 25th, 50th, and 75th percentiles. | | **Character length\*** | The distribution of string lengths. | | **Frequency\*** | The most frequently occurring values. | | **Histogram\*** | The distribution for numeric, time, and similar types. | Values marked with `*` are calculated using an approximation function. In PostgreSQL, all values are calculated exactly, so no `*` is shown. Available connections are [BigQuery](../../connection/warehouses/bigquery), [Snowflake](../../connection/warehouses/snowflake), [Databricks](../../connection/warehouses/databricks), and [PostgreSQL](../../connection/warehouses/postgresql). Not available for [Redshift](../../connection/warehouses/redshift). If the SQL content or parameters change, you need to re-run the stats. Select a cell in the result table to show its column name, data type, and complete value in the preview pane. Selecting multiple cells, a row, or a column shows statistics or row data for that selection. ## Column header operations on results {#result-column-menu} Select a column header in the result table to access the following operations. Sorting and filtering apply only to the displayed rows and don't re-run SQL. You can combine different types of filters on the same column. These operations aren't synced to other users. | Operation {.nowrap} | Description | | --- | --- | | **Show column statistics** | Selects all cells in the column and shows the selection statistics in the preview pane: **Number of nulls** and **Unique count**, plus **Sum value** / **Average value** / **Minimum value** / **Maximum value** for numeric columns. | | **Sort** | Sorts the displayed rows by **Asc** or **Desc**. | | **Filter** | Shows the following filter operations. If filters are applied, their types appear next to the item. Press Esc to return to the previous menu. **Filter by value** / **Exclude by value**: Select candidate values, then select **Apply** to narrow down the displayed rows. **Filter by condition**: Narrows down rows with a condition such as **Contains**, **Equals**, **Does not equal**, **Between**, or **Greater than**. **Filter NULL**: Narrows down rows with `IS NULL` or `IS NOT NULL`. | | **Pin to left** / **Pin to right** | Pins the column to either edge. Pinned columns stay visible while scrolling horizontally. | | **Column width** | Use **Fit to values** or **Reset to initial width** for the selected column. Use **Fit all columns to values** or **Reset all columns to initial widths** for every column. | You can reorder columns by dragging their headers. ## Display mode {#display-mode} The icon at the top left of a SQL block lets you switch the display mode. This switch isn't synced to other users. You can change the default setting from the SQL block menu **⋯** (horizontal three-dot icon) > **Default display**. | Mode {.nowrap} | Description | | --- | --- | | **Show all** | Shows SQL, the run result, and the chart. | | **Show result only** | Shows the run result and the chart. | | **Hide all** | Hides SQL, the run result, and the chart. | ## Save SQL Use **Save SQL** in the SQL block's top-right menu to register the block's content as a saved query. * References to other SQL blocks or saved queries are saved fully expanded. * Parameters are saved with their value at that point substituted in. Parameter embedding and references to other queries aren't available on the saved query side. ## Code snippets {#code-snippet} Use **Manage code snippets** in the SQL editor to create and edit snippets for autocomplete. Code snippet autocomplete is enabled by default. You can disable it by turning off **Enable code snippet autocomplete** in [SQL editor preferences](../../../account/settings/editor). | Item | Description | | --- | --- | | **Personal snippet** / **Shared snippet** | Choose whether it's personal (per user) or shared across the workspace. | | **Autocomplete key** | Typing this key lets you call up the snippet from autocomplete suggestions. | | **Code snippet to insert** | The text inserted when the suggestion is selected. You can specify the cursor position after insertion with `$$`. | | **Display name** / description | Optional. | ## Cache {#cache} A SQL block's run result is cached for display purposes. This reuses the past successful result of the same SQL; the job itself is retained for 24 hours by default. * Up to 1,000 rows of run result are retained for display. * When editing a notebook, running a new job is skipped by default if the cache is within 24 hours, and the cache is used instead. * To run without using the cache, use a SQL block's **Run with fresh data**, or the notebook's [**Run all with fresh data**](../overview#run-scope). The handling differs by access path, as follows. | Path {.nowrap} | Display cache | Overriding the reuse period | | --- | --- | --- | | Editing a notebook | 24 hours by default. Can be bypassed with **Run with fresh data** / **Run all with fresh data**. | None. | | Viewing a report | Same as above. | [Report settings](../sharing/report/overview#report-settings)' **Cache duration** (24 hours by default; 0 disables it; maximum 24 hours, in 10-minute increments). | | Signed embed | Same as above. | `cache_max_age` at token issuance (86400 seconds by default and at maximum; 0 disables it). See [Signed embed](../sharing/signed-embed/overview) for details. | Warehouse-side caching (such as the DWH's native cache for identical SQL) can't be controlled from the connection settings. ## Constraints {#constraints} Column suggestions and similar are available only when you use a table reference or a reference to another SQL block. They aren't suggested for string table IDs or saved query references. --- --- url: 'https://docs.codatum.com/features/notebook/grid-page/overview.md' description: A page for arranging charts and other components as tiles --- # Grid page Grid page is one of the notebook page types. It arranges charts and SQL run results defined on a [doc page](../doc-page/overview) as a tile-based dashboard. You can place, reorder, resize, and drag and drop components. Analysis (creating SQL and charts) is done on the doc page, and the grid page arranges them by reference. Even when you create a new chart from the grid page's right sidebar, the chart itself is created on the doc page side. ## Key features * Tile-based layout (drag and drop, resizing, mobile layout) * Placing components from **Components** in the right sidebar (built-in elements, charts, query results) * [Grid settings](#grid-settings) (columns, row height, edit guide) * [Outline](#outline) (listing headings and jumping to them) * Displaying [parameters](../parameter/overview), [placing them as tiles](#parameter-component), and [overriding parameters](../parameter/overview#override) per placed component * [Explorer](../explorer) * [Cross filter](./cross-filter) ## Available components {#components} The components available on a grid page are grouped as follows. Place them from **Components** in [the right sidebar](../../../guide/screen-layout). ### Built-in Elements specific to grid pages. Not shared with doc pages. | Component {.nowrap} | Description | | --- | --- | | **Heading** | A heading (**Heading 1** / **Heading 2** / **Heading 3**). You can also add a description. | | **Text** | Places supplementary text. | | **Image** | Upload and place an image ([file size limit](../../../reference/limits#fixed-limits)). You can adjust its size and position. | | **Spacer** | Blank space between components. You can also configure whether it's shown in the mobile layout. | ### Parameters {#parameter-component} Places the input form of a [parameter](../parameter/overview) as a tile. The **Parameters** section in the right sidebar lists defined parameters by scope (**Notebook common** / **Page specific**). * The first two candidates in each scope are shown initially. Use **Show (count) more** to expand the remaining candidates. * Place them by drag and drop, or with **Add to the bottom**. Parameters that are already placed show **In use**, and the same parameter can't be placed more than once. * On the tile, you can enter a value and change the title (synced with the parameter's label). * Edit settings such as the type and default value from the parameter form at the top of the page. * Parameters referenced by SQL or charts on this page also appear in the parameter form at the top of the page. You can change their values from both the form and the tiles. * If a parameter isn't referenced by SQL or charts on this page, the tile shows a message indicating that it isn't referenced instead of showing an input. * If the referenced parameter definition is deleted, the tile shows a message that the parameter is unavailable. You can delete the tile in the editor. ### From doc pages Places SQL blocks and charts defined on a doc page by reference. In the right sidebar, candidates under the **Chart** section are listed by doc page name, then SQL block name. You can search candidates by SQL block name or chart title. Select **Filter** next to the search field to see **All**, **Query result**, and available chart types. Select an item to show only candidates of that type. | Component {.nowrap} | Description | | --- | --- | | **Chart** | Places a [chart](../chart/overview) created on a doc page. You can also create a new chart from an existing SQL block using **New chart** in the right sidebar. | | **Query result** | Places the run result table of a doc page's [SQL block](../doc-page/sql-block). There's one candidate per SQL block. | Each SQL block section always shows its query result and chart candidates. Select a candidate row to open a preview to the left of the right sidebar. To close the preview, select outside it, press Esc, or use its close button. To place a candidate, drag it by the grip or use the add button in its row to add it to the end of the grid. If there are no SQL blocks or charts on the doc page side, no candidates are shown. Candidates that are already placed show **In use**. For charts and SQL run results, you can configure [parameter overrides](../parameter/overview#override) and [cross filter](./cross-filter) per component. ## Grid settings {#grid-settings} From **Grid settings** in the header, you can configure the grid granularity and the background guide shown while editing. | Item {.nowrap} | Description | | --- | --- | | **Guide display** | The background guide shown while editing. Choose from **None** / **Dots** / **Grid lines**. The default is **Grid lines**. | | **Columns** | The number of columns the page is divided into horizontally. An integer from 1 to 60. The default is 12. | | **Row height (px)** | The height of one vertical grid unit. An integer from 10 to 120. The default is 60. | * Guide display takes effect as soon as you select it. It applies only to your own screen and doesn't affect other users. * Columns and row height take effect when you change the values and select **Apply**. They're saved as page settings and apply to all users viewing the page. * When you change the number of columns, placed components are converted to the new grid while keeping their width ratios as much as possible. Components that no longer fit side by side after reducing the number of columns are automatically stacked vertically. * For the value ranges, see [Limits](../../../reference/limits). ## Outline {#outline} **Outline** in [the left sidebar](../../../guide/screen-layout) lists the **Heading** components on the page. Select an item to scroll to that heading. * Headings are nested according to their level (Heading 1 to Heading 3). * The order is the same as the vertical order in the mobile layout. For columns placed side by side, the headings in the left column are listed from top to bottom, followed by those in the right column. * Components other than headings, such as charts and text, aren't listed. ## Syncing chart settings {#chart-sync} * Settings for the chart itself, such as axes and type, are synced with the doc page side. Even if the same chart is placed on multiple grids, its settings are shared. * Display settings on the grid, such as header display and component titles, aren't synced. * Parameter overrides and cross filter settings are also specific to each component on the grid. * Chart settings aren't shared with other users until explicitly saved. --- --- url: 'https://docs.codatum.com/features/notebook/grid-page/cross-filter.md' description: Synchronize filtering of charts and tables on a grid page using keys --- # Cross filter Cross filter syncs the filtering state, such as legend, axis, and frame selections, between [charts](../chart/overview) and [query results](./overview#components) placed on a [grid page](./overview). Components that share the same key are linked together. Filtering is applied to data already loaded on the frontend. No additional SQL job runs when a filter changes. Cross filter settings are specific to each component on the grid, and [aren't synced with the chart settings on the doc page side](./overview#chart-sync). ## Configuring A chart or query result must already be placed on the grid page. 1. Hover over the target component and open **Cross filter** from the top-right menu. 2. If it's not yet configured, select **Edit**. 3. Enter a key for each item you want to link (components that share the same key are linked together). 4. Select **Apply**. To remove the setting, select **Clear filter** from the same menu. The items shown vary depending on the chart type and its settings. For example, a chart that doesn't use the [frame feature](../chart/common-settings/frame#frame-feature) doesn't show **Frame key**. ## Settings {#settings} | Item {.nowrap} | Description | | --- | --- | | **Legend key** | Syncs whether the legend is shown or hidden. Legend names must match. | | **X-axis key** | Syncs the X-axis display range. The axis type and content must match. | | **Y-axis key** | Syncs the Y-axis display range. The axis type and content must match. | | **Frame key** | Syncs the displayed [frame](../chart/common-settings/frame#frame-feature). The frame value must match. | | **Data filter** | Filters the table's displayed data in sync with the chart-side filtering. Add a condition using a combination of **column** and **key**. | **Data filter** requires you to specify the following two items. | Item {.nowrap} | Description | | --- | --- | | **Column** | The target column to filter by value. | | **Key** | The key configured on the linked chart's legend, axis, or frame. | ## Syncing the same field type {#same-field-sync} Setting the same key on the same type of item syncs the same operation. ### Legend * Targets: [XY Chart](../chart/xy-chart), [Radial Chart](../chart/radial-chart), [XYZ Chart](../chart/xyz-chart) (excluding heatmap), [Funnel Chart](../chart/funnel-chart). * Syncs legend selection, deselection, and hover highlighting. * Links series with matching legend names. ### X axis / Y axis * **X-axis key** targets: [XY Chart](../chart/xy-chart), [XYZ Chart](../chart/xyz-chart), [Waterfall Chart](../chart/waterfall-chart). * **Y-axis key** targets: [XYZ Chart](../chart/xyz-chart). * Syncs axis range selection (zoom). * The axis type (category, time, numeric, and so on) must match. * For a category axis, filtering is based on the index range according to the data's display order. ### Frame * Targets: [XY Chart](../chart/xy-chart), [Radial Chart](../chart/radial-chart), [XYZ Chart](../chart/xyz-chart), [Funnel Chart](../chart/funnel-chart), [Waterfall Chart](../chart/waterfall-chart), [Graph Chart](../chart/graph-chart), [Hierarchy Chart](../chart/hierarchy-chart), [Word Cloud](../chart/word-cloud). * Only effective when the [frame layout](../chart/common-settings/frame#frame-feature) is timeline. * The frame value must match. ### Data filter * Targets: [Query result](./overview#components), [Table Chart](../chart/table-chart). * Even between tables sharing the same **key**, filtering syncs based on the value of the specified **column**. ## Syncing across different fields {#cross-field-sync} Setting the same key on different types of items links them across fields. | Link | Behavior | | --- | --- | | **X-axis key** ↔ **Y-axis key** | Syncs the display range of the X axis and Y axis. | | **Legend key** ↔ **X-axis key** / **Y-axis key** | Syncs legend and axis filtering. Only links when the axis is a [category axis](../chart/xy-chart#axis-category). If multiple legend items are selected, filters by the range from the minimum to maximum of the corresponding axis indices. | | **Legend key** ↔ **Frame key** | Syncs legend and frame. Only effective for a timeline layout, and only links when a single legend item is selected. | | **Legend key** → **Data filter** | Reflects legend filtering onto the table. The legend name must match the **column** value. There's no sync in the reverse direction from the table. | | **X-axis key** / **Y-axis key** → **Data filter** | Reflects the axis display range onto the table. The axis value must match the **column** value. There's no sync in the reverse direction from the table. | | **Frame key** → **Data filter** | Reflects the frame value onto the table. The frame value must match the **column** value. There's no sync in the reverse direction from the table. | ## Constraints {#limitations} * Only data already loaded on the frontend is targeted. Because SQL isn't re-run, for example, narrowing an axis's period can't be reflected in a radial chart's aggregated result. * Filtering can't be reflected from a table (query result or table chart) to other charts. * Because linking from legend to axis works via range selection, adjacent categories between the selected legend items are also included. * Linking between category axes (string axes) depends on display order. If the display order differs, linking won't work correctly. * When the frame layout is grid, syncing axes and frames isn't available. --- --- url: 'https://docs.codatum.com/features/notebook/markup-page/overview.md' description: A page where you write elements as tags to build a dashboard --- # Markup page (Preview) Markup page is one of the notebook page types. You build a dashboard by writing tags for charts and SQL run results defined on a [doc page](../doc-page/overview), parameter inputs, headings, and text. In addition to the items you can place on a [grid page](../grid-page/overview), you can use conditional display, tabs, collapsible sections, and more. ::: info This feature is in **preview**. To request access, contact Codatum support. ::: ## Key features * Layout with tags (side-by-side, vertical, and grid arrangements, cards, tabs, collapsible sections, tables, and more) * Charts and SQL run results from doc pages, and text and tables that use values from the results * [Parameter](../parameter/overview) inputs and per-element [parameter overrides](../parameter/overview#override) * Conditional display and repetition for each row of a result * Pagination of long lists * Images from URLs in the results (such as images in a list of products) * Links that set parameters when clicked (such as drill-down, where choosing an item in a list switches to a detailed view) * Links that move to an element in the page when clicked * Inputs that choose the value of a parameter on a chart (such as choosing a period on a chart over time, or a value to filter by on a chart by category) * Mobile layout * Publishing with [reports](../sharing/report/overview), [public links](../sharing/public-link/overview), and [signed embedding](../sharing/signed-embed/overview) ## Creating a markup page {#create} 1. In the page list at the top of the [left sidebar](../../../guide/screen-layout) in a notebook, select **Add** > **Page** > **Markup page**. 2. Select **Code** in the header to open the **Code** panel in the right sidebar. 3. Write tags in the editor in the panel. The main area shows what you write. You can also create a markup page from the layout of a grid page by selecting **Duplicate as markup page** in the grid page's menu. ## Code panel {#editor} The **Code** panel in the right sidebar offers tag completion and shows errors in the code. The bottom of the panel has the following tabs. | Tab {.nowrap} | Description | | --- | --- | | **Components** | Charts and SQL blocks on doc pages, and parameters. You can insert them into the code. | | **Reference** | A **Guide** to writing markup, and descriptions of **Elements** and **Expressions**. | You can also edit markup pages with the [Codatum CLI](../../cli/overview) and the [AI agent](../../ai-agent/overview). For details on the syntax, elements, and expressions, see the [Codatum CLI documentation](https://cli-docs.codatum.com/md/markup-page) (in Japanese). ## Running {#run} * **Run all** runs every chart and SQL result element on the page, including elements hidden by conditions. * By default, changing a parameter value doesn't run the page. You can set each parameter input so that it runs the page automatically when its value changes. * The following operations run the elements that refer to the parameters whose values changed: * Clicking a link that sets parameters * Switching the page of a list with pagination that uses a parameter --- --- url: 'https://docs.codatum.com/features/notebook/parameter/overview.md' description: Parameter scope and embedding values in SQL --- # Parameter Referencing a parameter from a SQL block lets you generate SQL dynamically based on the parameter's value. Once you define a parameter, an input form appears at the top of the [doc page](../doc-page/overview) or [grid page](../grid-page/overview). On a grid page, you can also place the input form as a tile. A notebook's parameter values and run results are synced between users currently viewing it. To keep them independent per user, use [Version](../version) or [Report](../sharing/report/overview). ## Key features * Scope: [notebook-wide / page-specific](#scope) * [Types and data types](./types) * [Usage patterns in SQL](./sql-patterns) * [Escaping and dynamic references](./escape-and-dynamic-reference) * [Relative dates](./relative-date) * [Reset conditions](#reset-if-changed) * [Generating dynamic options](./dynamic-options) * [Specifying values from a URL](./url) * [Placement on a grid page](../grid-page/overview#parameter-component) ## Creating and managing {#create-manage} 1. Open **Parameter** at the top of [the main area](../../../guide/screen-layout). 2. Select **Add parameter**, then choose a scope (**Notebook-wide** / **Page-specific**) and a type. 3. In a [SQL block](../doc-page/sql-block), type `/param/` and select the parameter from the suggestions. Once selected, the parameter reference is embedded in the SQL. It's displayed using the parameter's label. For example, if a string parameter labeled `param1` has `val1` entered, the following SQL expands to `'val1'` at run time. ```sql -- Display in the SQL block SELECT {{param1}} -- Generated SQL SELECT 'val1' ``` :::: tip ::: v-pre The `{{param1}}` above is a notation used for explanation. On screen, it's shown as a labeled reference chip. ::: :::: For each parameter, you can do the following. | Operation {.nowrap} | Description | | --- | --- | | **Settings** | Edits the input form settings for that type (see [Types and data types](./types)). | | **Default value** | Sets the value applied when resetting. For date types, you can also choose a [relative date](./relative-date). | | **Reset to default value** | Resets that parameter's current value to its default value. | | **Delete** | Deletes the parameter definition. A parameter currently referenced from a SQL block, the options SQL of another parameter, or elsewhere, or selected as a [reset condition](#reset-if-changed) of another parameter, can't be deleted. | In the parameter form, you can switch the display between **In use** and **Show all**. | Display {.nowrap} | Description | | --- | --- | | **In use** | Shows only parameters referenced from SQL or other content on the selected page. | | **Show all** | Shows all defined parameters, regardless of whether they're referenced. | The **Reset** button resets all displayed parameters to their default values at once. On a [grid page](../grid-page/overview#parameter-component), you can place parameters as tiles. If a parameter is referenced from SQL or other content, you can change its value from both the parameter form at the top of the page and its tile. ## Parameter scope {#scope} A parameter has one of two scopes. Regardless of scope, **the value is held per page**. | Scope {.nowrap} | Description | | --- | --- | | **Notebook-wide** | The parameter definition is shared across all pages in the notebook. The value is held on each page. | | **Page-specific** | The parameter definition is only valid within the selected page. The value is also held only on the selected page. | Choose **Notebook-wide** for use in a SQL block referenced from multiple pages, and **Page-specific** for use only within that page. For example, when referencing a chart created on a doc page from a grid page, the SQL block that's the chart's data source should use a notebook-wide parameter. ## Resolving values and default values {#value-resolution} What's embedded in SQL is the **parameter value** held on each page. * The **default value** is written into the parameter's value when you run **Reset** (or the individual **Reset to default value**). * A parameter with no value set (an empty input form) expands using the [zero value](./types#types) for its type. * Because the zero value is a value valid for SQL of each type, SQL usually doesn't error out even when the value is unset. See [Usage patterns in SQL](./sql-patterns) for how to write an optional filter when the value is unset. If you set a relative date as a date's default value, the date at that point in time is written into the current value each time you reset. See [Relative dates](./relative-date) for when this is applied. ## Reset conditions {#reset-if-changed} For example, if you select "Category" in **Reset conditions** of "Subcategory", "Subcategory" is reset to its default value when you change "Category". Use this for drill-down filtering, where you choose a category and then a subcategory. When you select other parameters in **Reset conditions** in a parameter's **Settings**, the value of the parameter you're configuring is reset to its default value whenever the value of any of the selected parameters changes. You can set this on every type of parameter. * Parameters you can select * For a **notebook-wide** parameter: notebook-wide parameters only * For a **page-specific** parameter: notebook-wide parameters and page-specific parameters on the same page * A parameter without a default value becomes unset when it's reset ([Resolving values and default values](#value-resolution)). * Resets cascade: if C selects B and B selects A, changing A resets B, and then C. * When a single operation changes the values of several parameters, such as [specifying values from a URL](./url) or a link on a markup page, the parameters whose values were changed aren't reset. * For example, a link that sets "Category" and "Subcategory" at once keeps the "Subcategory" value it specifies. * The following parameters aren't reset: * Parameters fixed with **Use fixed parameters** in a [report](../sharing/report/overview#publish-options) * Parameters with a **Fixed value** in a [signed embed](../sharing/signed-embed/overview#server-side-params) * A parameter with an **Initial value** in a signed embed is reset to that initial value. * When values are synced to other pages by [syncing across report pages](#report-page-sync), parameters on the destination pages are also reset according to their reset conditions. For a parameter whose [options are generated by SQL](./dynamic-options), turning on **Parameters referenced in the options SQL** in **Reset conditions** makes all parameters referenced by the options SQL reset conditions. These parameters change automatically when you edit the options SQL. To reset on only some of the referenced parameters, leave it off and select them individually. ## Overriding parameters {#override} When referencing a SQL block (chaining SQL blocks), you might want to decouple the parameter dependency inside the referenced SQL. For example, in cases like the following. * Chaining SQL across pages, where each page should reference its own specific parameter. * Different SQL derived from the same base SQL should reference different parameters. Hovering over a SQL block reference (including a grid page's query result or chart) shows a popup where you can **Override internal parameter references**. The override methods are as follows. | Method {.nowrap} | Description | | --- | --- | | **Override with another parameter** | Replaces the value with another parameter of the same type. | | **Override with a fixed value** | Specifies a fixed value. | | **Don't override** | Follows the [expansion rules](../doc-page/sql-block#param-in-sql-ref) (for example, a notebook-wide parameter uses the referencing page's value). | For how to insert a reference and its expansion settings (**Don't wrap in parentheses** / **Add alias at the end**), see [Referencing SQL blocks](../doc-page/sql-block#sql-block-ref). ## Syncing parameter values {#sync} In a **notebook**, parameter values and run results are synced between users. Use [Version](../version) if you want to avoid concurrent edits. In **Version** and **interactive reports**, parameter changes aren't synced between users; they only apply to the user who made the change. In these features, parameter changes are also synced to the URL (see [Specifying values from a URL](./url)). ## Syncing across report pages {#report-page-sync} Enabling **Sync parameter changes across pages** when publishing a report syncs changes to notebook-wide parameters across published pages. Page-specific parameters aren't linked. See [Report](../sharing/report/overview) for details. --- --- url: 'https://docs.codatum.com/features/notebook/parameter/types.md' description: Parameter types and zero values --- # Types and data types Parameters are classified by their input form type and data type. ## Parameter list and zero values {#types} The list of parameter types, their data types, and the zero value expanded into SQL when a value is unset, are as follows. Multi-input / multi-select types are arrays, but their zero value expands as an empty string `''`. | Type {.nowrap} | Type | Zero value | | --- | --- | --- | | [Text input](#text-input) | STRING | `''` | | [Text select](#text-select) | STRING | `''` | | [Text multi input](#text-multi-input) | STRING\[] | `''` | | [Text multi select](#text-multi-select) | STRING\[] | `''` | | [Number input](#number-input) | NUMBER | `0` | | [Number select](#number-select) | NUMBER | `0` | | [Date input](#date-input) | DATE | `'1970-01-01'` | | [Date range](#date-range) | \[DATE, DATE] | Both start and end are `'1970-01-01'` | | [Checkbox](#checkbox) | BOOLEAN | `false` | See [Usage patterns in SQL](./sql-patterns) for how to use the zero value to write an optional filter. ## Common settings {#common-settings} In addition to type-specific settings, many parameters support the following. | Item {.nowrap} | Description | | --- | --- | | **Placeholder** | The placeholder text shown in the input form. | | **Reset conditions** | When the value of any of the selected parameters changes, this parameter's value is reset to its default value. See [Reset conditions](./overview#reset-if-changed) for details. | | **Description** | Shown as a tooltip next to the parameter name. | ## Text input {#text-input} A field for entering a single string. * Expanded in SQL as an escaped string (for example: `'val1'`). * The zero value is `''`. ## Text multi input {#text-multi-input} A field for entering multiple strings. * When you paste text separated by line breaks or tabs, each part is added as a separate value. Leading and trailing white space is removed from each value, and empty values aren't added. * Expanded in SQL as a comma-separated, escaped string (for example: `'val1', 'val2'`). * The zero value is `''`. * You can enter up to 1,000 values (see [Limits](../../../reference/limits#fixed-limits)). ## Text select {#text-select} A dropdown for choosing a single string from candidates. * See [Generating dynamic options](./dynamic-options) for how candidates are generated. * Expanded in SQL as an escaped string. * The zero value is `''`. ## Text multi select {#text-multi-select} A dropdown for choosing multiple strings from candidates. * See [Generating dynamic options](./dynamic-options) for how candidates are generated. * Expanded in SQL as a comma-separated, escaped string (for example: `'val1', 'val2'`). * The zero value is `''`. * You can select up to 1,000 values (see [Limits](../../../reference/limits#fixed-limits)). ## Number input {#number-input} A field for entering a single number. | Item {.nowrap} | Description | | --- | --- | | **Min** | The lower bound of the input value. | | **Max** | The upper bound of the input value. | | **Step** | The increment step for input. | * Expanded in SQL as a number. * The zero value is `0`. ## Number select {#number-select} A dropdown for choosing a single number from candidates. * See [Generating dynamic options](./dynamic-options) for how candidates are generated. * The zero value is `0`. ## Date input {#date-input} A field for choosing a single date. You can select from a calendar or enter the date directly. ### Settings | Item {.nowrap} | Description | | --- | --- | | **Unit** | **Day** / **Week** / **Month** / **Year**. **Day** if unspecified. | | **Unit reference point** | When **Unit** is week, month, or year, chooses whether the value is normalized to the start or end of the period. Start if unspecified. The label changes based on the unit, such as **Start of week** / **End of week**. | | **Start of week** | When **Unit** is day or week, chooses the day of the week used as the week boundary. Sunday if unspecified. | | **Relative valid range** | Restricts the selectable range of past/future days relative to today. | | **Absolute valid range** | Restricts the selectable range using a lower and upper bound date. | The breakdown of **Relative valid range** is as follows. | Item {.nowrap} | Description | | --- | --- | | **Days before today** | Dates before this many days can't be selected. Example: entering `90` disallows dates more than 90 days in the past. | | **Days after today** | Dates after this many days can't be selected. Example: `0` disallows tomorrow and later; `-1` disallows today and later. | The breakdown of **Absolute valid range** is as follows. | Item {.nowrap} | Description | | --- | --- | | **Lower bound date** | Dates before this date can't be selected. | | **Upper bound date** | Dates after this date can't be selected. | ### Expansion * Expanded in SQL as a string in `YYYY-MM-DD` format (for example: `'2024-01-01'`). * The zero value is `'1970-01-01'`. * The default value can be set to a [relative date](./relative-date). If **Unit** is week, month, or year, the selected value is normalized to the start or end of the period according to **unit anchor**. For example, with unit "week," anchor "start," and start of week "Monday," the value becomes that week's Monday. ## Date range {#date-range} Specifies a start date and end date as a pair. The settings are the same as [date input](#date-input), except **unit anchor** isn't shown for date range; the start date is always normalized to the start of the period, and the end date to the end of the period. For example, if **Unit** is **Month** and you select April–May 2026, the value becomes `["2026-04-01", "2026-05-31"]`. Referencing this in SQL differs from the `{{label}}` notation of other types; the start and end dates are specified separately. * Start date: `{label}.StartDate` * End date: `{label}.EndDate` The zero value for both start and end dates is `'1970-01-01'`. The default value can be set to a [relative date](./relative-date). ## Checkbox {#checkbox} A checkbox for toggling a boolean value. * Expanded in SQL as `true` or `false`. * The zero value is `false`. --- --- url: 'https://docs.codatum.com/features/notebook/parameter/sql-patterns.md' description: How to write filters and branches based on parameter values --- # Usage patterns in SQL Parameters aren't a templating language; they're embedded as regular SQL values. Express conditional branching or repetition using SQL syntax such as `CASE` or `IN`. See [Escaping and dynamic references](./escape-and-dynamic-reference) for details on escaping. :::: tip ::: v-pre The `{{label}}` notation below is used for explanation. On screen, it's shown as a labeled reference chip. ::: :::: ## Optional filter {#optional-filter} When a value is unset, the [zero value](./types#types) is expanded. By removing the filter when the value equals the zero value, you can make it function as "fetch all" when unset. ```sql SELECT order_id, product_name, ordered_at FROM orders WHERE -- Start date: don't filter by the lower bound if it's the zero value ('1970-01-01') CASE WHEN {{start_date}} = '1970-01-01' THEN TRUE ELSE ordered_at >= {{start_date}} END -- End date: don't filter by the upper bound if it's the zero value ('1970-01-01') AND CASE WHEN {{end_date}} = '1970-01-01' THEN TRUE ELSE ordered_at <= {{end_date}} END -- Product name: don't filter by product name if it's the zero value ('') AND CASE WHEN {{product_name}} = '' THEN TRUE ELSE product_name LIKE '%{{product_name}}%' END ``` You can also write it as follows, with the same effect. ```sql SELECT * FROM orders WHERE 1 = 1 AND (order_date >= {{start_date}} OR {{start_date}} = '1970-01-01') AND (status = {{status}} OR {{status}} = '') ``` ## Branching by value {#conditional} Switch the selected column or calculation based on a parameter's value. ```sql SELECT order_id, CASE {{region}} WHEN 'EU' THEN amount * 1.20 ELSE amount END AS final_price FROM orders ``` ```sql SELECT CASE {{granularity}} WHEN 'daily' THEN DATE_TRUNC('day', timestamp) WHEN 'weekly' THEN DATE_TRUNC('week', timestamp) ELSE DATE_TRUNC('month', timestamp) END AS period FROM events ``` The following is an example of using a checkbox to switch which table is referenced. ```sql SELECT * FROM ( SELECT sensitive_column AS data FROM sensitive_data WHERE {{is_admin}} = TRUE UNION ALL SELECT public_column AS data FROM filtered_data WHERE {{is_admin}} = FALSE ) t ``` ## Selecting multiple values {#multi-value} [Text multi input](./types#text-multi-input) and [text multi select](./types#text-multi-select) expand as a comma-separated string. Use them together with `IN`. ```sql SELECT * FROM sales WHERE metric_name IN ({{selected_metrics}}) ``` The following aggregates only the selected metrics. ```sql SELECT SUM(CASE WHEN 'revenue' IN ({{selected_metrics}}) THEN revenue ELSE NULL END) AS revenue_total, SUM(CASE WHEN 'cost' IN ({{selected_metrics}}) THEN cost ELSE NULL END) AS cost_total, SUM(CASE WHEN 'profit' IN ({{selected_metrics}}) THEN profit ELSE NULL END) AS profit_total FROM sales ``` ## Dynamic identifiers {#dynamic-identifier} Placing a parameter inside quotes lets you dynamically generate identifiers such as table or column names. See [Escaping and dynamic references](./escape-and-dynamic-reference#dynamic-reference) for how to write these and points to watch for. --- --- url: >- https://docs.codatum.com/features/notebook/parameter/escape-and-dynamic-reference.md description: Escaping of parameter values and dynamic generation of identifiers --- # Escaping and dynamic references How a parameter is escaped depends on where it's placed within the SQL. This mechanism helps prevent SQL injection, and can also be used to dynamically generate identifiers such as table or column names. ## String parameters in a normal context Parameters are expanded escaped as strings. The escaping follows the SQL syntax of the selected connection. ```sql -- If the parameter value is user's "data" WHERE name = {{str_param}} -> WHERE name = 'user\'s \"data\"' -- If the parameter value is O'Reilly's "Book" SELECT name = {{company}} -> SELECT name = 'O\'Reilly\'s \"Book\"' ``` ## String parameters within a quoted context If a parameter is placed inside single quotes, double quotes, backticks, or similar, only the inner content is escaped so the outer quote isn't broken. Escaping follows the connection's SQL syntax. The following is an example for a BigQuery connection. ```sql -- Inside double quotes (escapes both " and ') -- If the parameter value is user"s 'data' SELECT "{{str_param}}" as alias -> SELECT "user\"s \'data\'" as alias -- Inside single quotes (escapes both " and ') -- If the parameter value is user"s 'data' SELECT '{{str_param}}' as alias -> SELECT 'user\"s \'data\'' as alias -- Inside backticks (escapes only `) -- If the parameter value is user"s 'data` SELECT `{{str_param}}` as alias -> SELECT `user"s 'data\`` as alias ``` ## Special handling for date parameters * In a normal context, a date expands as a string in `YYYY-MM-DD` format. * For BigQuery connections, a date placed inside backticks expands as `YYYYMMDD` (no hyphens). ```sql -- BigQuery connection example -- Normal date parameter SELECT {{date_param}} as normal -> SELECT '2024-10-02' as normal -- A date inside quotes follows the same escaping rules SELECT '{{date_param}}' as single_quote -> SELECT '2024-10-02' as single_quote SELECT "{{date_param}}" as double_quote -> SELECT "2024-10-02" as double_quote -- Special case: generating a table name in BigQuery SELECT * FROM `table_{{date_param}}` -> SELECT * FROM `table_20241002` ``` ## Numeric and boolean parameters Numeric and boolean parameters aren't escaped; they're expanded as-is. ## Generating dynamic references {#dynamic-reference} Placing a parameter inside quotes lets you dynamically generate identifiers such as table or column names. ```sql -- Dynamic table name SELECT * FROM `table_{{table_suffix}}` -> SELECT * FROM `table_sales_2024` -- Dynamic field selection SELECT "column_{{field_type}}" -> SELECT "column_revenue" ``` ::: warning Escaping is applied so the syntax doesn't break based on the surrounding quotes. However, **a text parameter can contain any string**. Depending on how the SQL is written, this could unintentionally reference an unexpected table or column. For dynamic identifier generation, consider mitigations such as fixing a prefix or suffix, or writing the SQL so it fails for unexpected values. ::: --- --- url: 'https://docs.codatum.com/features/notebook/parameter/relative-date.md' description: Relative date defaults for date parameters --- # Relative dates You can set a relative date as the default value of a [date input](./types#date-input) or [date range](./types#date-range). Values are defined as an offset from a reference date, such as "today," "yesterday," or "last week." The unit of the offset follows the parameter setting's **unit** (day / week / month / year). For example, when **unit** is **day**, an offset of `0` means today and `-1` means yesterday. When **unit** is **week**, an offset of `0` means this week and `-1` means last week. As described in [Resolving values and default values](./overview#value-resolution), a relative date is calculated into a concrete date and written into the current value when reset. It isn't recalculated automatically on every run. ## Configuring 1. Open the menu at the top right of the parameter's input form. 2. Under **Default value**, choose **Relative date** or **Relative date range**. 3. Specify the **offset** (for date range, **lower bound offset** / **upper bound offset**). ## When relative dates are calculated A relative date is calculated when the parameter value is reset to its default. When this is applied differs by feature, as follows. ### Notebook Applied on the following operations. * **Reset parameter values to default** for the whole form. * **Reset to default value** for an individual parameter. ::: tip In a notebook, parameter changes are shared in real time with other users. Resetting to the default value requires an explicit operation. Simply opening a notebook doesn't recalculate relative dates. ::: ### Public link Relative dates aren't available, since parameters can't be changed. See [Public link](../sharing/public-link/overview) for details. ### Report With the following publish settings, relative dates are applied when the report is opened. * Choose **Interactive report** as the report type. * Enable **Enable auto-run**, and also enable **Use parameter default values**. If **Use parameter default values** is disabled, the parameter value is the value at the time of publishing. Resetting from the input form behaves the same as in a notebook. ::: tip Parameter changes in a report aren't shared with other users. ::: See [Report](../sharing/report/overview) for details. ### Signed embed {#signed-embed} With the following conditions, relative dates are applied when the signed embed is opened. * The parameter is set as a client-side parameter (not a server-side parameter). * For the client-side parameter, the setting is configured to use the parameter's default value as the initial value. If this setting is disabled, the parameter value is the value at the time of publishing. Relative dates aren't available for server-side parameters. If you need to specify a date on the server side, you need to calculate the relative date separately. Resetting from the input form behaves the same as in a notebook. However, a parameter whose input form is hidden isn't subject to reset, so its relative date isn't recalculated. ::: tip Parameter changes in a signed embed aren't shared with other users. ::: See [Signed embed](../sharing/signed-embed/overview) for details. ## Reference time for calculation Relative dates are calculated based on the browser's current time. The timezone follows the browser's setting. Because of this, the resulting date for the same moment might differ depending on timezone. When relative dates are calculated outside the browser, they use the following timezone. | Run method | Timezone | | --- | --- | | Run Report in [workflows](../../workflow/steps) (when run with the default parameters) | The step's **Timezone** | | Report runs by the [AI agent](../../../workspace/external-integrations/agent-connectors) (when run with the default parameters) | The timezone specified for the run (UTC if not specified) | | `notebook param list` / `notebook param reset` in [Codatum CLI](../../cli/overview) | The timezone specified with `--tz` (the local timezone of the environment if not specified) | --- --- url: 'https://docs.codatum.com/features/notebook/parameter/dynamic-options.md' description: How to build options for select-type parameters --- # Generating dynamic options For [text select](./types#text-select), [text multi select](./types#text-multi-select), and [number select](./types#number-select), you can generate options in the following ways. ## Fixed list Use this when choosing from fixed values. * Setting: **CSV text**. * Each item is separated by a newline. * To add a display name, write it on the same line, separated by a comma (`,`). ```csv value1,Display name1 value2,Display name2 ``` ## Table Use this to generate options from a specific table's column. | Setting {.nowrap} | Content | | --- | --- | | Table | The table to fetch values from. | | Column for options | The column used as the option's value. | | Column for display name | The column used as the display label (optional; the value is used as the display name if omitted). | SQL against the table is run frequently, to narrow results as the user types. Specify a table with few rows. ## Query result Use this to generate options from the run result of a specified SQL query. | Setting {.nowrap} | Content | | --- | --- | | Connection | The connection to run the SQL on. | | SQL | The SQL that returns the options. If it returns multiple columns, the first column is the value, and the second (if any) is the display label. | Because the options SQL runs frequently, avoid SQL that's slow or consumes a lot of resources. You can also use parameter references within the SQL. For example, you can generate subcategory options based on a category parameter. To reset the selected value when the value of a referenced parameter changes, turn on **Parameters referenced in the options SQL** in [Reset conditions](./overview#reset-if-changed). SQL that generates options for a **notebook-wide** parameter can't reference **page-specific** parameters, since that would break cross-page references. SQL that generates options for a page-specific parameter can reference both notebook-wide and page-specific parameters. ## When the SQL runs When options come from a table or SQL, fetching happens at the following times. 1. **On page load**: only parameters currently in use on that page are initialized, and their corresponding SQL runs. SQL for unused parameters doesn't run. 2. **On first opening the dropdown**: fetched when the parameter's input form is focused and the dropdown menu opens. 3. **While typing a search**: fetched when narrowing option candidates by typing text in the parameter's input form (if all options have already been fetched, narrowing happens within the fetched options). ## Cache Options from a table or SQL are cached as follows. * Cached on the backend for up to 30 minutes. * Identical SQL (including parameter values) uses the cache. * The frontend also keeps an in-memory cache for the duration of the session. Repeatedly opening the dropdown avoids re-running the same SQL within the cache period. --- --- url: 'https://docs.codatum.com/features/notebook/parameter/url.md' description: Specifying parameter values through URL query parameters --- # Specifying values from a URL When creating an external link, you can override a parameter's value by adding it to the URL. ## Applicable features The following features let you specify parameters from a URL. With these features, the URL updates each time you change a parameter, so sharing the URL also shares the parameter values. * Notebook [versions](../version) * [Reports](../sharing/report/overview) * Applies to **interactive reports**. * If **Auto-run** is enabled, the report runs automatically after merging in the URL-specified parameters. * Even if **Use parameter default values** is enabled, **parameters specified in the URL take priority** (they're reset to default first, and then the URL-specified values are applied). ## How to specify Parameters are synced with the `cdm.params` query parameter in the URL. The format is as follows. ```typescript // Keyed by page ID so values are retained across page navigation type Params = { [pageId: string]: { [paramId: string]: string } }; // Each value is a JSON.stringify'd string // pageId / paramId are actually IDs like 68783eb9c4b4b71483a1d617 const params: Params = { page1: { param1: JSON.stringify('value1'), param2: JSON.stringify(123), }, page2: { param3: JSON.stringify(true), param4: JSON.stringify(['value1', 'value2']), }, }; const query = `?cdm.params=${encodeURIComponent(JSON.stringify(params))}`; ``` ## Shortcut format If `cdm.params` is hard to construct directly, you can also use the `cdm.params.${paramId}` format. If both are present, `cdm.params.${paramId}` takes priority, and the merged result is reflected as a new `cdm.params` in the URL. ```typescript const paramId = 'param1'; // JSON.stringify isn't needed for the shortcut format (but encodeURIComponent is) const value = 'string_value'; const query = `?cdm.params.${paramId}=${encodeURIComponent(value)}`; // Specifying an empty string clears that parameter const queryEmpty = `?cdm.params.${paramId}=`; ``` ## How to specify values How to specify values differs by parameter type. `JSON.stringify` isn't needed for the shortcut format, but `encodeURIComponent` is still needed when placing the value in the URL. | Type | Specifying via `cdm.params` | Shortcut format | | --- | --- | --- | | Text input / Text select | `JSON.stringify("string_value")` | `string_value` | | Text multi input / Text multi select | `JSON.stringify(["item1", "item2"])` | `item1,item2` | | Number input / Number select | `JSON.stringify(123)` | `123` | | Date input | `JSON.stringify("2025-01-01")` | `2025-01-01` | | Date range | `JSON.stringify(["2025-01-01", "2025-01-02"])` | `2025-01-01,2025-01-02` | | Checkbox | `JSON.stringify(true)` or `JSON.stringify(false)` | `true` or `false` | * For array types, use `,` as the separator in the shortcut format. * Date input and date range use `YYYY-MM-DD` format. * An invalid value results in an error screen. --- --- url: 'https://docs.codatum.com/features/notebook/chart/overview.md' description: >- Overview of the chart feature, which aggregates and processes SQL results into graphs and tables --- # Chart A chart aggregates and processes SQL run results, then renders them as a graph or table. You can use charts on [doc pages](../doc-page/overview) and [grid pages](../grid-page/overview). Charts are rendered in the following flow. ```mermaid flowchart LR sqlExec[Fetch SQL run results] modeling[Process based on data modeling] process[Process with SQL or in-memory] render[Render chart (up to 1000 rows)] sqlExec --> modeling --> process --> render ``` 1. Fetches the run results of the SQL specified as the data source. 2. Processes the data based on the chart's **basic settings** (dimensions, metrics, source filter, and so on). 3. Processes the data in-memory if the conditions are met, or with SQL otherwise. 4. Renders the chart based on the processed result (up to 1000 rows) and the **advanced settings**. See [Concepts](./concept/overview) for details. ## Key features * [Concepts](./concept/overview): how rendering works, data modeling, and in-memory processing * [Dimensions and metrics](./concept/dimension-metrics): units of aggregation and aggregation methods * [Filter, sort, and limit](./concept/filter-sort-limit): source filter, sort, row limit, and the difference between group by and frame * [Common settings](./common-settings/overview): frame, value formatting, reference lines, trends, statistics, and more * [Explorer](../explorer): exploring data sources and adding charts * [Cross filter](../grid-page/cross-filter): linking charts on a grid page ## Chart types {#chart-types} | Type {.nowrap} | Typical use | | --- | --- | | [Big Number](./big-number) | A single indicator or gauge display using a metric and an optional secondary metric. | | [KPI Chart](./kpi-chart) | Combines the latest metric, a past comparison, and a time-series trend. | | [XY Chart](./xy-chart) | Aggregates a Y value (metric) against an X value (dimension). Line, bar, area, scatter, and more. | | [Radial Chart](./radial-chart) | Aggregates a value against a label. Pie, donut, and radar charts. | | [XYZ Chart](./xyz-chart) | Aggregates a Z value (metric) against X and Y values (dimensions). Scatter, bubble, and heatmap. | | [Hierarchy Chart](./hierarchy-chart) | Aggregates a value against a hierarchy (dimension). Tree, treemap, sunburst, and more. | | [Graph Chart](./graph-chart) | Aggregates a weight against source and target. Network and Sankey diagrams. | | [Funnel Chart](./funnel-chart) | Aggregates a value against a label to visualize a step-by-step process. | | [Waterfall Chart](./waterfall-chart) | Shows the cumulative increase and decrease of a value against a label. | | [Table Chart](./table-chart) | Displays data as a table, either as raw rows or aggregated. | | [Pivot Table](./pivot-table) | Cross-tabulates a value (metric) against rows and columns (dimensions). | | [Text Panel](./text-panel) | Displays the first value of a selected column as text. | | [Map Chart](./map-chart) | Visualizes geographic data using latitude/longitude, geohash, geocode, or GeoJSON. | | [Word Cloud](./word-cloud) | Aggregates a value against a word to visualize word weight. | Each page includes details on drawing types and settings. --- --- url: 'https://docs.codatum.com/features/notebook/chart/concept/overview.md' description: Overview of how charts are rendered and how data modeling works --- # Chart concepts A chart is a feature that specifies how to process and render the SQL run result of a data source. Settings are split between **basic settings** and **advanced settings** on the chart edit screen. * **Basic settings**: processing the data for rendering, such as dimensions, metrics, and the source filter. * **Advanced settings**: adjusting the appearance, such as axes, legend, value format, and frame display. ## Rendering flow {#pipeline} Charts are rendered in the following flow. ```mermaid flowchart LR source[SQL run result of the data source] settings[Data modeling from basic settings] decide{Meets the conditions for in-memory processing?} inmem[Process in the browser] sqlProc[Run processing SQL] draw[Render based on advanced settings (up to 1000 rows)] source --> settings --> decide decide -->|Yes| inmem --> draw decide -->|No| sqlProc --> draw ``` 1. Fetches the run result of the SQL specified as the data source. 2. Prepares data for rendering based on the dimensions, metrics, source filter, and other **basic settings**. 3. If all of the following conditions are met, performs equivalent processing in the browser without issuing new SQL (in-memory processing): * The data source's run result has 1000 rows or fewer. * **Custom SQL** isn't specified. * **Disable in-memory processing** is off. 4. Renders the chart based on the processed result (up to 1000 rows) and **advanced settings**. If the data to render exceeds 1000 rows, the screen shows "Rendered with up to 1000 rows of data." See [Filter, sort, and limit](./filter-sort-limit#limit) for the row limit. ## Data modeling {#data-modeling} A chart structures and processes the SQL run result using the following components. | Component {.nowrap} | SQL equivalent | Role | | --- | --- | --- | | [Dimension](./dimension-metrics#dimension-metric) | `GROUP BY` clause | The axis used to split data. | | [Metric](./dimension-metrics#dimension-metric) | Aggregate functions such as `SUM()` | The numeric value being aggregated. | | [Source filter](./filter-sort-limit#source-filter) | `WHERE` clause | Narrows down the data to aggregate. | For example, to show "total sales by category" as a bar chart, you'd specify category as the dimension and sales as the metric (aggregation method `SUM`). The number and role of these components that you can specify varies by chart type. * **Dimension**: XY Chart's **X value**, Radial Chart's **Label**, Map Chart's latitude/longitude, and so on. * **Metric**: XY Chart's **Y value**, Radial Chart's **Value**, Big Number's **Metric**, and so on. * **Source filter**: for example, a condition to render only a specific category. See [Dimensions and metrics](./dimension-metrics) for details on dimensions and metrics. ## In-memory processing {#in-memory-processing} For chart data processing, if the data source's SQL run result has 1000 rows or fewer and **Custom SQL** isn't specified, equivalent processing is done in the user's browser instead of running new SQL. This processing is called "in-memory processing," and can be disabled with **Disable in-memory processing** in a chart's **basic settings**. If you use **Custom SQL**, in-memory processing isn't available, and the toggle isn't shown. See [Pivot Table](../pivot-table#processing-diff) for an example of how results differ depending on whether in-memory processing was used. --- --- url: 'https://docs.codatum.com/features/notebook/chart/concept/dimension-metrics.md' description: 'Units of aggregation, aggregation methods, and date processing for charts' --- # Dimensions and metrics Chart data aggregation is built around the concepts of **dimensions** and **metrics**. On the chart edit screen's **basic settings**, you specify these as fields appropriate to the chart type (**X value**, **Label**, **Metric**, and so on). ## Dimensions and metrics {#dimension-metric} * **Dimension**: a value used to group data. It determines "what to split by," such as category or date. * **Metric**: an aggregated numeric value. It determines "what to measure," such as sum, average, or count. In SQL terms, a dimension corresponds to a column used in `GROUP BY`, and a metric corresponds to a column computed by an aggregate function such as `SUM()` or `COUNT()`. When adding or editing a field, you set the following items. | Item {.nowrap} | Description | | --- | --- | | **Source column** | Select a column from the data source. | | **Display name** | Specify a name used in the legend, tooltip, and so on. | | **Aggregation method** | Specified for metrics. | | **Custom SQL** | Specify a SQL expression directly instead of selecting a column. | ## Metric aggregation method {#aggregation} For a metric's **aggregation method**, choose one of the following. The on-screen options are shown as English function names. | Aggregation method {.nowrap} | Content | | --- | --- | | `SUM` | Sum. | | `AVG` | Average. | | `COUNT` | Count. | | `COUNT_UNIQUE` | Unique count. | | `MAX` | Maximum. | | `MIN` | Minimum. | | `ANY_VALUE` | Any single value. | If you use **Custom SQL**, enter SQL that includes an aggregate function returning a number, such as `SUM(sales)`. ## Date processing {#date-transform} When you select a date or datetime column for a dimension (**X value**, **Group by**, **Frame**, and so on), you can configure **date processing** or **datetime processing**. Configure it as follows. 1. On the chart edit screen's **basic settings**, select a date or datetime column. 2. Open **Edit dimension** and choose the transform type and unit. ### Transform types | Item {.nowrap} | Description | | --- | --- | | **None** | No processing. | | **Truncate** | Truncates the value to the specified unit. Example: truncating `2025-01-15` by `MONTH` → `2025-01-01`. Used for monthly, weekly, or yearly aggregation. | | **Extract** | Extracts only a specific part of the date. Example: extracting `DAY` from `2025-01-15` → `15`. Used to analyze patterns by day of month or time of day (the same day in different months is aggregated together). | The unit for **truncate unit** / **extract unit** is shown on screen in English, such as `YEAR` / `MONTH` / `WEEK` / `DAY` / `HOUR` / `MINUTE`. For datetime with a timezone, you can also specify a **timezone**. For the timezones used to calculate and display, see [Dates, times, and timezones](../../datetime-timezone#truncate-extract). ### Bucketing For numeric columns, you can enable **Bucketing** and specify a **bucket size**. This groups numbers into intervals of the specified width. ## Group by {#group-by} Some charts support **Group by**. It splits the **series** within the same chart based on the value of the specified column. * **Group by**: splits series (for example, by color) within the same chart. * **Frame**: splits the chart itself by a column's value. See [Filter, sort, and limit](./filter-sort-limit#group-vs-frame) and [Frame](../common-settings/frame) for the difference from frame. --- --- url: 'https://docs.codatum.com/features/notebook/chart/concept/filter-sort-limit.md' description: 'Source filter, sort, row limit, and the difference between group by and frame' --- # Filter, sort, and limit A chart's **basic settings** let you control the filtering, order, and row count of the data to render. Some charts let you set the order of series separately from the order of the data. ## Source filter {#source-filter} **Source filter** lets you narrow down the data source and limit the data to render. This condition is applied before aggregation. A condition combines a column, an operator, and a value. The operators are shown on screen as follows. | Operator {.nowrap} | Typical use | | --- | --- | | `=` / `!=` | Equal / not equal. | | `>` / `>=` / `<` / `<=` | Comparison. | | `IS NULL` / `IS NOT NULL` | NULL check. | | `IN` / `NOT IN` | Matches one of multiple values. | | `BETWEEN` | Range. | | `LIKE` | Pattern match. | You can also write a condition expression directly with **Custom SQL**. Conditions can be combined with AND / OR. ## Sort {#sort} Depending on the chart type, you can set **Sort**, **X-axis sort**, **Row sort** / **Column sort**, and so on. The sort types are as follows. | Type {.nowrap} | Description | | --- | --- | | **Value** | Sorts by the metric's value. Order is **ascending** / **descending**. | | **Label** | Sorts by the dimension's value. Order is **ascending** / **descending**. | | **Custom** | Sorts by a specified column or aggregation. | For XY Chart's **Value** sort, the condition specified for the first **Y value** in **Series** is used. For Pivot Table's **Value** sort, the condition specified for the first **Value** is used. If that value doesn't support subtotal and total calculations, the default is **Label** with **Asc**. In this case, **Value** sort isn't available. For some chart types, the meaning of the sort affects the rendering. For example, in Funnel Chart, the sort type changes the basis for the ratio calculation. See each chart type's page for details. ## Group sort {#group-sort} For charts that have **Group by**, **Group sort** lets you specify the order of series and the legend. | Type {.nowrap} | Description | | --- | --- | | **Label** | Ascending or descending order of the value specified in group by. | | **Custom** | Ascending or descending order of a specified column. Specify a column that's uniquely determined for the grouped value (for example: group by user name → sort by user ID). | ## Limit rows {#limit} **Limit rows** restricts the number of rows of data to render, from 1 to 1000. The data to render is capped at 1000 rows. If the limit is exceeded, the message "Rendered with up to 1000 rows of data" is shown. Combining a row limit with sort lets you visualize the top N items. ## Group by vs. frame {#group-vs-frame} Even when using the same dimension, **group by** and **frame** produce different appearances. | Item {.nowrap} | Group by | Frame | | --- | --- | --- | | On-screen label | **Group by** | **Frame** | | Appearance | Splits the series within the same chart (for example, by color). | Splits the chart itself by the column's value. | | Typical use | Comparing within a single figure. | Comparing small charts side by side. | ```mermaid flowchart LR groupBy[Group by] frame[Frame] series[Split series within the same chart] multi[Split the chart itself into multiple displays] groupBy --> series frame --> multi ``` See [Frame](../common-settings/frame) for the frame layout (**Timeline** / **Grid**). --- --- url: 'https://docs.codatum.com/features/notebook/chart/common-settings/overview.md' description: >- Display settings shared across charts, such as frame, value formatting, and analytics display --- # Common chart settings These are display settings that many charts can use in common. They're mostly found in **advanced settings**, but the **frame** setting is in **basic settings**. ## Key features * [Frame](./frame): split a chart's display by a column's value * [Value formatting](./value-format): display format for numbers and dates * [Reference lines, trends, and statistics](./analytics): analytics displays available on XY Chart and XYZ Chart For settings specific to axes, series, and so on for each chart type, see that chart type's page. ## Axis label max width {#axis-label-max-width} For some charts, the axis settings in **advanced settings** include **Axis label max width (px)**, which limits the display width of each axis's labels. Use this when you want to truncate long label text. --- --- url: 'https://docs.codatum.com/features/notebook/chart/common-settings/frame.md' description: A frame that splits a chart's display by a column's value --- # Frame {#frame-feature} For some charts, specifying a column in **Frame** under **basic settings** splits the chart's display by that column's value. Choose **Timeline** or **Grid** for **Frame layout** to control how it's displayed. The frame feature makes it easier to compare changes over time or across categories. See [Filter, sort, and limit](../concept/filter-sort-limit#group-vs-frame) for the difference from **group by** (splitting series within the same chart). ## Examples * Compare a pie chart of sales by category side by side for each gender (set **Frame** to gender, **Frame layout** to **Grid**). * Switch through a timeline to see the trend of sales by year (set **Frame** to year). ## Scale {#scale} To make it easier to compare across frames, the Y-axis range, bubble size scale, heatmap color scale, and so on are shared across all frames by default. You can change this behavior with **advanced settings** > **Frame** > **Independent scale**. ## Timeline layout {#timeline} When **Frame layout** is **Timeline** (including when unspecified), a frame control appears at the bottom of the chart, letting you switch frames manually or play an animation. Frames are ordered by the ascending value of the column. **Advanced settings** > **Frame** lets you configure the following. | Item {.nowrap} | Description | | --- | --- | | **Autoplay** | Automatically switches between frames. | | **Play in reverse** | Starts from the last frame and plays in reverse order. | | **Play interval (sec)** | The display duration of one frame. | ![XY Frame Timeline](/chart-capture/xy-frame-light.png "XY Chart"){.light-only .chart-capture} ![XY Frame Timeline](/chart-capture/xy-frame-dark.png "XY Chart"){.dark-only .chart-capture} ![Graph Frame Timeline](/chart-capture/graph-frame-light.png "Graph Chart"){.light-only .chart-capture} ![Graph Frame Timeline](/chart-capture/graph-frame-dark.png "Graph Chart"){.dark-only .chart-capture} ## Grid layout {#grid} When **Frame layout** is **Grid**, all frames are displayed as a grid (up to 16). The number of columns is adjusted **automatically** by default, arranging frames as close to a square shape as possible (for example, 3 items → 2 columns × 2 rows, 5 items → 3 columns × 2 rows). You can specify the number of columns in **advanced settings** > **Frame** > **Columns**. ![XY Frame Grid](/chart-capture/xy-frame-grid-light.png "XY Chart"){.light-only .chart-capture} ![XY Frame Grid](/chart-capture/xy-frame-grid-dark.png "XY Chart"){.dark-only .chart-capture} ![Radial Frame Grid](/chart-capture/radial-frame-grid-light.png "Radial Chart"){.light-only .chart-capture} ![Radial Frame Grid](/chart-capture/radial-frame-grid-dark.png "Radial Chart"){.dark-only .chart-capture} The fixed limit is also documented in [Limits](../../../../reference/limits#fixed-limits). ## Supported charts {#supported-charts} | Chart {.nowrap} | Support | | --- | --- | | [XY Chart](../xy-chart) | Supported. | | [Radial Chart](../radial-chart) | Supported. | | [XYZ Chart](../xyz-chart) | Supported. | | [Hierarchy Chart](../hierarchy-chart) | Partially supported (bar chart / drill down isn't supported). | | [Graph Chart](../graph-chart) | Supported. | | [Funnel Chart](../funnel-chart) | Supported. | | [Waterfall Chart](../waterfall-chart) | Supported. | | [Word Cloud](../word-cloud) | Supported. | --- --- url: >- https://docs.codatum.com/features/notebook/chart/common-settings/value-format.md description: The formatter used for numbers and dates in charts --- # Value formatting The format of values and labels shown in a chart is, by default, optimized based on your account's [language setting](../../../../account/settings/basic#interface) (with **English**, it follows your browser's language settings (region)). You can change it from **value format** in the chart's **advanced settings**. If you've changed the formatter, its setting takes priority regardless of the language setting. ## Where to specify it For example, on XY Chart, you can specify a formatter in the following places. * Axis labels * **Advanced settings** > **X axis** / **Y axis** > **Value format**. * Values in the tooltip * **Advanced settings** > **Series** > (series name) > **Value format**. * Value labels (if **Value labels** are shown) * **Advanced settings** > **Series** > (series name) > **Value labels** > **Value label format**. Use the button on the left of the input field to switch between the number formatter and the date formatter. The date formatter also offers presets in **Format list**. ## Number formatter {#number-formatter} The number formatter uses [d3-format](https://d3js.org/d3-format) syntax. You can also use the **number formatter builder** to build the display format, precision, digit grouping, and so on. For example, you can specify the following. | Setting {.nowrap} | Number | Formatted result | | --- | --- | --- | | `.0f` | `12345.6789` | `12346` | | `,.1r` | `12345.6789` | `10,000` | | `-.1%` | `0.5` | `50%` | You can also wrap d3-format syntax in `{` and `}`, and add a **prefix** or **suffix** around it (this is a Codatum-specific extension, not part of d3-format itself). | Setting {.nowrap} | Number | Formatted result | | --- | --- | --- | | `{,d} JPY` | `12345.6` | `12,346 JPY` | | `about {,d}%` | `50` | `about 50%` | ## Date formatter {#date-formatter} The date formatter uses [Day.js](https://day.js.org/docs/en/display/format) syntax. For example, you can specify the following. | Setting {.nowrap} | Date | Formatted result | | --- | --- | --- | | `YYYY-MM-DD` | `2025-01-01` | `2025-01-01` | | `YY/M/D` | `2025-01-01` | `25/1/1` | | `MMMM YYYY` | `2025-01-01` | `January 2025` | --- --- url: 'https://docs.codatum.com/features/notebook/chart/common-settings/analytics.md' description: 'Reference lines, trends, and statistics available on XY Chart and XYZ Chart' --- # Reference lines, trends, and statistics On [XY Chart](../xy-chart) and [XYZ Chart](../xyz-chart), you can add the following displays from **advanced settings**. The setting items (**type**, **display**, **trend type**, and so on) are common to both. | Feature {.nowrap} | Content | | --- | --- | | [Reference line](#reference-line) | Shows a guide line or band on an axis. | | [Trend](#trend) | Shows the tendency of a series using regression or a moving average. | | [Statistics](#statistics) | Shows a series' average, median, max, and min as dashed lines. | There are differences in where you open the settings. | Item {.nowrap} | XY Chart | XYZ Chart | | --- | --- | --- | | Reference line | **Advanced settings** > **X axis** / **Y axis** > **Reference line** | Same. Scatter and bubble only (hidden for heatmap). | | Trend / statistics | **Advanced settings** > **Series** > (each Y value's series) > **Trend** / **Statistics** | **Advanced settings** > **Series** > **Trend** / **Statistics**. Scatter and bubble only (hidden for heatmap). | ## Reference line {#reference-line} You can show a guide line or area on a chart, such as a target value, an acceptable range, or a danger zone. Y-axis reference lines are drawn horizontally, and X-axis reference lines are drawn vertically. ![XY Reference Line](/chart-capture/xy-reference-line-light.png "Reference line"){.light-only .chart-capture} ![XY Reference Line](/chart-capture/xy-reference-line-dark.png "Reference line"){.dark-only .chart-capture} ### How to configure 1. In the chart edit screen's **advanced settings**, open the axis (**X axis** / **Y axis**) where you want to show a reference line. 2. Add an item under **Reference line**. 3. Specify the **type** and value. On XYZ Chart, you can only configure **reference line** for scatter and bubble. ### Specification | Item {.nowrap} | Description | | --- | --- | | **Type**: **Line** | Shows a dashed line at a specific value. Specify the position with **Value** (for example, a sales target, a threshold, or a marker for a specific date). | | **Type**: **Band (range)** | Shows a specific range as a semi-transparent band. Specify the range with **Start value** / **End value**. Leaving these blank extends the band to the edge of the chart (for example, an acceptable range, a danger zone, or a caution period). | | **Color** | Choose from **Success** / **Warning** / **Danger**. | | **Label** | The text attached to the reference line. | ## Trend {#trend} You can show a trend line (regression, moving average, and so on) for a series. The trend line is added as a separate series from the original. ![XYZ Trend](/chart-capture/xyz-trendline-light.png "Trend"){.light-only .chart-capture} ![XYZ Trend](/chart-capture/xyz-trendline-dark.png "Trend"){.dark-only .chart-capture} ### How to configure 1. In the chart edit screen, open **advanced settings** > **Series**. * On XY Chart, open the target Y value (series) first, then configure it. * On XYZ Chart, configure it directly under **Series** (scatter and bubble only). 2. Turn on **Trend** > **Display**. 3. Choose a **trend type**. The trend line is shown as a dashed line. Except for **Moving average**, the equation and R² (coefficient of determination) are shown on the chart. You can hide them with **Hide equation** / **Hide R²**. ### Trend types {#trend-types} | Trend type {.nowrap} | Description | Additional setting | | --- | --- | --- | | **Linear** | Shows a linear regression (y = mx + c). | None. | | **Polynomial** | Shows a polynomial regression. | **Polynomial degree** (2–5). | | **Moving average** | Shows a moving average. | **Moving average window size**. | | **Exponential** | Shows an exponential regression (y = ae^(bx)). | None. | | **Logarithmic** | Shows a logarithmic regression (y = a + b ln(x)). | None. | | **Power** | Shows a power regression (y = ax^b). | None. | If there's too little data, or the specified trend type fails to fit, the trend line isn't shown. ## Statistics {#statistics} You can show a series' statistical value as a dashed line. The dashed line's label shows the statistic type and its value. ![XY Statistics](/chart-capture/xy-stats-light.png "Statistics"){.light-only .chart-capture} ![XY Statistics](/chart-capture/xy-stats-dark.png "Statistics"){.dark-only .chart-capture} ### How to configure 1. In the chart edit screen, open **advanced settings** > **Series**. * On XY Chart, open the target Y value (series) first, then configure it. * On XYZ Chart, configure it directly under **Series** (scatter and bubble only). 2. Turn on **Statistics** > **Display**. 3. Choose a **statistic type** (**Average** / **Median** / **Max** / **Min**). ### Difference from trend {#stats-vs-trend} | Characteristic {.nowrap} | Statistics | Trend | | --- | --- | --- | | Display format | Shown as part of the same series. | Added as a separate series (trend line). | | When zooming the chart | Recalculated using only the data in the visible range. | Not recalculated (always based on all data). | | Display on stacked charts | Shown in sync with the target series' stacking. | Not stacked; shown as a separate series. | --- --- url: 'https://docs.codatum.com/features/notebook/chart/big-number.md' description: A chart that displays a key indicator as text or a gauge --- # Big Number Big Number is a chart that displays a key indicator prominently. It aggregates a **metric** (required) and a **secondary metric** (optional) as metrics. In a gauge, the secondary metric becomes the gauge's maximum value. ## Drawing types {#drawing-types} Big Number has two drawing types: **Text** and **Gauge**. ![BigNumber Text](/chart-capture/bignumber-text-light.png "Text"){.light-only .chart-capture} ![BigNumber Text](/chart-capture/bignumber-text-dark.png "Text"){.dark-only .chart-capture} ![BigNumber Gauge](/chart-capture/bignumber-gauge-light.png "Gauge"){.light-only .chart-capture} ![BigNumber Gauge](/chart-capture/bignumber-gauge-dark.png "Gauge"){.dark-only .chart-capture} ## Specification ### Aggregation {#aggregation} Big Number [doesn't use a dimension; it aggregates the selected metric](./concept/dimension-metrics#dimension-metric) and displays it as a single value. | Item {.nowrap} | Role | Notes | | --- | --- | --- | | **Metric** | Metric | Displays the aggregated result as a single value. | | **Secondary metric** | Metric | In gauge mode, this becomes **Secondary metric (gauge max)** and is required. | #### Examples * Show "total sales" as text. * **Metric**: sum of sales. * Show "achievement rate" as a gauge. * **Metric**: sum of actuals. * **Secondary metric (gauge max)**: sum of targets. ### Gauge specification {#gauge} * The gauge's achievement rate (%) is calculated as "metric ÷ secondary metric × 100". * The secondary metric is required and must be a numeric column. ## Tips ### Conditional formatting {#conditional-format} In **advanced settings**, **conditional formatting** lets you change the font color based on the metric's value. For example, if the metric is an achievement rate, you can change the color to a danger color when it's 80 or below, and a success color when it's 100 or above. --- --- url: 'https://docs.codatum.com/features/notebook/chart/kpi-chart.md' description: >- A chart for viewing the latest metric alongside its time-series trend and past values --- # KPI Chart KPI Chart displays the latest value from a metric aggregated over time. It combines the metric's trend with a comparison against the previous period or previous year. ![KPI Chart](/chart-capture/kpi-chart-light.png "KPI Chart"){.light-only .chart-capture} ![KPI Chart](/chart-capture/kpi-chart-dark.png "KPI Chart"){.dark-only .chart-capture} ## Specification ### Aggregation {#aggregation} KPI Chart aggregates a **metric** for each **time dimension** value. The latest value in the aggregated time series becomes the chart's primary metric. | Item {.nowrap} | Role | Notes | | --- | --- | --- | | **Metric** | Metric | Aggregates by time and displays the latest value prominently. | | **Time dimension** | Dimension | Accepts a date or datetime column. | | **Comparison** | Comparison target | Select **Previous period** or **Previous year**. | | **Positive direction** | Comparison evaluation | Select **Higher is better** or **Lower is better**. | When **Comparison** is **Previous period**, the latest value is compared with the preceding value in the time series. When it is **Previous year**, the latest value is compared with the value whose time is closest to one year before the latest time. The comparison isn't displayed when no value close to the comparison target is present in the time series. ### Drawing types {#drawing-types} For the trend's **Drawing type**, you can select **Area**, **Line**, or **Bar**. The default is **Area**. ### Comparison formats {#comparison-format} For the comparison's **Format**, you can select **Percentage**, **Difference**, or **Difference and percentage**. The default is **Percentage**. --- --- url: 'https://docs.codatum.com/features/notebook/chart/xy-chart.md' description: A two-dimensional chart that aggregates a Y-axis value against X-axis items --- # XY Chart XY Chart aggregates a **Y value** (metric) against an **X value** (dimension) and displays the result. You can draw line, bar, area, scatter, and other types individually or as a combination, and use **group by** or **series** to handle multiple series. ## Drawing types {#drawing-types} XY Chart supports the following drawing types, as well as combined charts that mix them. ![XY Line](/chart-capture/xy-line-light.png "Line"){.light-only .chart-capture} ![XY Line](/chart-capture/xy-line-dark.png "Line"){.dark-only .chart-capture} ![XY Bar](/chart-capture/xy-bar-light.png "Bar"){.light-only .chart-capture} ![XY Bar](/chart-capture/xy-bar-dark.png "Bar"){.dark-only .chart-capture} ![XY Stacked Bar](/chart-capture/xy-stackedbar-light.png "Stacked bar"){.light-only .chart-capture} ![XY Stacked Bar](/chart-capture/xy-stackedbar-dark.png "Stacked bar"){.dark-only .chart-capture} ![XY Area](/chart-capture/xy-area-light.png "Area"){.light-only .chart-capture} ![XY Area](/chart-capture/xy-area-dark.png "Area"){.dark-only .chart-capture} ![XY Stacked Area](/chart-capture/xy-stackedarea-light.png "Stacked area"){.light-only .chart-capture} ![XY Stacked Area](/chart-capture/xy-stackedarea-dark.png "Stacked area"){.dark-only .chart-capture} ![XY Percent Bar](/chart-capture/xy-percentbar-light.png "100% stacked bar"){.light-only .chart-capture} ![XY Percent Bar](/chart-capture/xy-percentbar-dark.png "100% stacked bar"){.dark-only .chart-capture} ![XY Scatter](/chart-capture/xy-scatter-light.png "Scatter"){.light-only .chart-capture} ![XY Scatter](/chart-capture/xy-scatter-dark.png "Scatter"){.dark-only .chart-capture} ![XY Bubble](/chart-capture/xy-bubble-light.png "Bubble"){.light-only .chart-capture} ![XY Bubble](/chart-capture/xy-bubble-dark.png "Bubble"){.dark-only .chart-capture} ![XY Percent Area](/chart-capture/xy-percentarea-light.png "100% stacked area"){.light-only .chart-capture} ![XY Percent Area](/chart-capture/xy-percentarea-dark.png "100% stacked area"){.dark-only .chart-capture} ## Specification ### Aggregation {#xy-xyz-diff} XY Chart treats **X value** as a dimension and **Y value** as a metric, aggregating Y for each X and drawing it as a series. See [Dimensions and metrics](./concept/dimension-metrics#dimension-metric) for the concepts behind dimensions and metrics. The difference from [XYZ Chart](./xyz-chart) is that there, both the X value and Y value are dimensions, and the Z value is aggregated for each combination of X and Y. | Item {.nowrap} | Role | Notes | | --- | --- | --- | | **X value** | Dimension | The unit of aggregation (aggregated per X). | | **Y value** | Metric | Specified per **series**. Each metric adds a series. | | **Group by** | Dimension | Splits the series by the value of the specified column. | | **Bubble size** | Metric | Specified only when drawing bubbles. | #### Examples * Show "total sales by month" as a line chart. * **X value**: month. * **Y value**: sum of sales. * Show "total sales by product category" as a bar chart. * **X value**: product category. * **Y value**: sum of sales. ### X-axis specification {#x-axis} In XY Chart, the type of X axis is determined by the **X-axis data type** and the **combination of drawing types**. | X-axis data type {.nowrap} | Drawing type combination | X-axis classification | | --- | --- | --- | | Date/datetime | Any | Time axis | | Numeric | Scatter, bubble, or line only | Numeric axis | | Numeric | Includes bar, area, or stacked | Category axis | | Anything else | Any | Category axis | #### Category axis {#axis-category} On a category axis, even if the specified values are numeric or date/datetime, they're drawn as discrete values at equal intervals. ##### Specifying axis min/max When you specify a min or max on a category axis, the specified value is treated as the index of the data's display order (0th, 1st, 2nd, and so on). | Index {.nowrap} | X-axis value | | --- | --- | | 0th | `1` | | 1st | `10` | | 2nd | `20` | | 3rd | `30` | | ... | ... | | 10th | `100` | In this case, setting the axis max to `10` shows data up to the 10th item, so the X axis is shown up to the value `100`. #### Time axis {#axis-time} On a time axis, the specified date/datetime data is drawn as a continuous time series. * Axis labels are determined dynamically based on the specified date/datetime data. * Datetimes with a timezone are drawn in the viewer's timezone. Values truncated by day, week, month, or year are drawn in the dimension's **Timezone**. For details, see [Dates, times, and timezones](../datetime-timezone). #### Numeric axis {#axis-value} On a numeric axis, the specified numeric data is drawn as continuous numeric values. ## Tips ### Specifying multiple series {#multiple-views} When you set multiple series, **Indepedent scale** appears within each series' settings. Turning this on makes that series' Y-axis scale independent, drawn on the right side. You can configure labels and other settings for the independent Y axis in **advanced settings** > **Independent axes**. ![XY Mixed](/chart-capture/xy-mixed-light.png "Independent axes"){.light-only .chart-capture} ![XY Mixed](/chart-capture/xy-mixed-dark.png "Independent axes"){.dark-only .chart-capture} When you set multiple series, **Split by series** appears below the **Series** setting. Turning this on makes each series' Y-axis scale independent and arranges the series vertically. Enabling **Split by series** disables the [frame feature](#frame-feature). It also hides the **Indepedent scale** setting above, since all series are then treated as independent axes. You can configure the Y axis for each series in **advanced settings** > **Independent axes**. ![XY Mixed Split](/chart-capture/xy-mixed-split-light.png "Split by series"){.light-only .chart-capture} ![XY Mixed Split](/chart-capture/xy-mixed-split-dark.png "Split by series"){.dark-only .chart-capture} ### Y-axis range {#y-axis-range} By default, the Y-axis range includes 0. If you turn on **advanced settings** > **Y axis** > **Unpin axis from zero**, the chart is drawn with a range that fits the data without including 0. For independent axes, you can configure this for each axis in **advanced settings** > **Independent axes**. ### Frame {#frame-feature} XY Chart supports the frame feature. See [Frame](./common-settings/frame#frame-feature) for details. ### Reference lines, trends, and statistics {#analytics} See [Reference lines, trends, and statistics](./common-settings/analytics) for details. --- --- url: 'https://docs.codatum.com/features/notebook/chart/radial-chart.md' description: A chart that visualizes composition ratios or comparisons between items --- # Radial Chart Radial Chart visualizes composition ratios or comparisons between items. It aggregates a **value** (metric) for each **label** (dimension). In a radar chart, you can use **group by** to overlay multiple series for comparison. ## Drawing types {#drawing-types} Radial Chart supports the following drawing types. ![Radial Pie](/chart-capture/radial-pie-light.png "Pie chart"){.light-only .chart-capture} ![Radial Pie](/chart-capture/radial-pie-dark.png "Pie chart"){.dark-only .chart-capture} ![Radial Donut](/chart-capture/radial-donut-light.png "Donut chart"){.light-only .chart-capture} ![Radial Donut](/chart-capture/radial-donut-dark.png "Donut chart"){.dark-only .chart-capture} ![Radial Radar](/chart-capture/radial-radar-light.png "Radar chart"){.light-only .chart-capture} ![Radial Radar](/chart-capture/radial-radar-dark.png "Radar chart"){.dark-only .chart-capture} ## Specification ### Aggregation {#aggregation} Radial Chart [aggregates a value (metric) for each label (dimension)](./concept/dimension-metrics#dimension-metric) and displays the result. | Item {.nowrap} | Role | Notes | | --- | --- | --- | | **Label** | Dimension | Becomes the item name (segment). | | **Value** | Metric | Aggregated for each label. | | **Group by** | Dimension | Splits the series by value (radar chart only). | #### Examples * Show "total sales by product category" as a pie chart. * **Label**: product category. * **Value**: sum of sales. * Compare "customer satisfaction by evaluation item, broken down by department" as a radar chart. * **Label**: evaluation item. * **Value**: average customer satisfaction. * **Group by**: department. ### Specification by drawing type {#drawing-type-details} * Pie and donut charts are drawn as a single series of "label × value". * Radar charts use labels as axes, with the series split by the value of **group by**. ## Tips ### Frame {#frame-feature} Radial Chart supports the frame feature. See [Frame](./common-settings/frame#frame-feature) for details. --- --- url: 'https://docs.codatum.com/features/notebook/chart/xyz-chart.md' description: A chart that aggregates a Z-axis value against X-axis and Y-axis items --- # XYZ Chart XYZ Chart aggregates a **Z value** (metric) against combinations of **X value** and **Y value** (both dimensions) and displays the result. The difference from [XY Chart](./xy-chart) is that the Y side is also a dimension. ## Drawing types {#drawing-types} XYZ Chart supports the following drawing types. ![XYZ Scatter](/chart-capture/xyz-scatter-light.png "Scatter"){.light-only .chart-capture} ![XYZ Scatter](/chart-capture/xyz-scatter-dark.png "Scatter"){.dark-only .chart-capture} ![XYZ Bubble](/chart-capture/xyz-bubble-light.png "Bubble"){.light-only .chart-capture} ![XYZ Bubble](/chart-capture/xyz-bubble-dark.png "Bubble"){.dark-only .chart-capture} ![XYZ Heatmap](/chart-capture/xyz-heatmap-light.png "Heatmap"){.light-only .chart-capture} ![XYZ Heatmap](/chart-capture/xyz-heatmap-dark.png "Heatmap"){.dark-only .chart-capture} ## Specification ### Aggregation {#aggregation} XYZ Chart treats **X value** and **Y value** as dimensions and **Z value** as a metric, aggregating Z for each combination of X and Y. See [Dimensions and metrics](./concept/dimension-metrics#dimension-metric) for the concepts behind dimensions and metrics. | Item {.nowrap} | Role | Notes | | --- | --- | --- | | **X value** | Dimension | Becomes the X axis. | | **Y value** | Dimension | Becomes the Y axis. | | **Z value** | Metric | Specified for bubble and heatmap. | | **Group by** | Dimension | Scatter and bubble only (splits the series). | #### Examples * Show "total sales by product category × region" as a heatmap. * **X value**: product category. * **Y value**: region. * **Z value**: sum of sales. * Show "the relationship between ad spend and sales" as a bubble chart. * **X value**: ad spend. * **Y value**: sales. * **Z value**: profit. ### X-axis specification {#x-axis} In XYZ Chart, how the X and Y axes are treated depends on the drawing type. * For heatmap, both the X and Y axes are category axes. * For scatter and bubble, the X axis is a category, time, or numeric axis depending on the data type, and the Y axis is a numeric axis. For the behavior of each axis (display rules for category, time, and numeric axes), see [X-axis specification](./xy-chart#x-axis) for XY Chart. ## Tips ### Axis range {#axis-range} For scatter and bubble, the range of a numeric axis includes 0 by default. If you turn on **advanced settings** > **X axis** / **Y axis** > **Unpin axis from zero**, that axis is drawn with a range that fits the data without including 0. ### Frame {#frame-feature} XYZ Chart supports the frame feature. See [Frame](./common-settings/frame#frame-feature) for details. ### Reference lines, trends, and statistics {#analytics} See [Reference lines, trends, and statistics](./common-settings/analytics) for details. --- --- url: 'https://docs.codatum.com/features/notebook/chart/hierarchy-chart.md' description: A chart that visualizes hierarchical data --- # Hierarchy Chart Hierarchy Chart visualizes data that has a hierarchical structure. You specify a **hierarchy** (one or more dimensions) from the broadest level down, and aggregate an optional **value** (metric) as the weight. ## Drawing types {#drawing-types} Hierarchy Chart supports the following drawing types. ![Hierarchy Tree](/chart-capture/hierarchy-tree-light.png "Tree"){.light-only .chart-capture} ![Hierarchy Tree](/chart-capture/hierarchy-tree-dark.png "Tree"){.dark-only .chart-capture} ![Hierarchy Treemap](/chart-capture/hierarchy-treemap-light.png "Treemap"){.light-only .chart-capture} ![Hierarchy Treemap](/chart-capture/hierarchy-treemap-dark.png "Treemap"){.dark-only .chart-capture} ![Hierarchy Sunburst](/chart-capture/hierarchy-sunburst-light.png "Sunburst"){.light-only .chart-capture} ![Hierarchy Sunburst](/chart-capture/hierarchy-sunburst-dark.png "Sunburst"){.dark-only .chart-capture} ![Hierarchy Bar](/chart-capture/hierarchy-bar-light.png "Bar chart (drill down)"){.light-only .chart-capture} ![Hierarchy Bar](/chart-capture/hierarchy-bar-dark.png "Bar chart (drill down)"){.dark-only .chart-capture} ## Specification ### Aggregation {#aggregation} Hierarchy Chart [aggregates a value (metric) for each level of the hierarchy (dimension)](./concept/dimension-metrics#dimension-metric) and draws the hierarchical structure. | Item {.nowrap} | Role {.nowrap} | Notes | | --- | --- | --- | | **Hierarchy** | Dimension | Specified from the top level down (for example: country → state → city). | | **Value** | Metric | If specified, the sum of this becomes the drawing weight. If not specified, aggregation is done by count. | #### Examples * Show "sales breakdown by region → state → city" as a sunburst chart. * **Hierarchy**: region, state, city. * **Value**: sum of sales. * Show "count by organizational hierarchy" as a tree. * **Hierarchy**: division, section, team. * **Value**: none (aggregated by row count). ### Specification by drawing type {#drawing-type-details} * Tree, treemap, and sunburst draw the hierarchical structure as-is. * Bar chart (drill down) starts from the top level, and selecting an item navigates to the next level. * Specify 2 or more levels, and set the drawing type to "Bar chart (drill down)". ## Tips ### Frame {#frame-feature} Hierarchy Chart (tree, treemap, sunburst) supports the frame feature. Bar chart (drill down) doesn't. See [Frame](./common-settings/frame#frame-feature) for details. --- --- url: 'https://docs.codatum.com/features/notebook/chart/graph-chart.md' description: A chart that visualizes relationships or transitions between items --- # Graph Chart Graph Chart visualizes relationships or transitions between items. It aggregates a **weight** (metric) for each combination of **source** and **target** (dimensions). ## Drawing types {#drawing-types} Graph Chart supports the following drawing types. ![Graph Chart](/chart-capture/graph-graph-light.png "Graph"){.light-only .chart-capture} ![Graph Chart](/chart-capture/graph-graph-dark.png "Graph"){.dark-only .chart-capture} ![Sankey Diagram](/chart-capture/graph-sankey-light.png "Sankey"){.light-only .chart-capture} ![Sankey Diagram](/chart-capture/graph-sankey-dark.png "Sankey"){.dark-only .chart-capture} ## Specification ### Aggregation {#aggregation} Graph Chart [aggregates a weight (metric) for each combination of source and target (dimensions)](./concept/dimension-metrics#dimension-metric) and draws the relationships between nodes. | Item {.nowrap} | Role | Notes | | --- | --- | --- | | **Source** | Dimension | The node the connection originates from. | | **Target** | Dimension | The node the connection points to. | | **Weight** | Metric | Reflected in edge thickness or node size. | #### Examples * Show "number of page transitions" as a Sankey diagram. * **Source**: the page transitioned from. * **Target**: the page transitioned to. * **Weight**: sum of transition counts. * Show "mentions between social media users" as a graph. * **Source**: the mentioning user. * **Target**: the mentioned user. * **Weight**: sum of mention counts. ### Specification by drawing type {#drawing-type-details} #### Graph * Turning on **Undirected graph** treats the connection between source and target as bidirectional, merging A→B and B→A into one. * **Link node color to weight** changes node color based on the node's weight. #### Sankey * The direction of flow is drawn visually. * If the data contains a circular reference, the chart can't be drawn, and the message "The data contains a circular reference, so it can't be drawn as a Sankey diagram" is shown. ## Tips ### Frame {#frame-feature} Graph Chart supports the frame feature. See [Frame](./common-settings/frame#frame-feature) for details. --- --- url: 'https://docs.codatum.com/features/notebook/chart/funnel-chart.md' description: A chart that visualizes changes in a step-by-step process --- # Funnel Chart Funnel Chart visualizes changes in a step-by-step process. It aggregates a **value** (metric) for each **label** (dimension) and shows the size or ratio of each step. ![Funnel](/chart-capture/funnel-funnel-light.png "Funnel"){.light-only .chart-capture} ![Funnel](/chart-capture/funnel-funnel-dark.png "Funnel"){.dark-only .chart-capture} ## Specification ### Aggregation {#aggregation} Funnel Chart [aggregates a value (metric) for each label (dimension)](./concept/dimension-metrics#dimension-metric) and shows the result as steps. | Item {.nowrap} | Role | Notes | | --- | --- | --- | | **Label** | Dimension | The name of each funnel step. | | **Value** | Metric | Displayed as the value of each step. | #### Examples * Show the counts of "visit → sign-up → add to cart → purchase" as a funnel. * **Label**: the name of each step. * **Value**: sum of counts. ### Sort order {#sort} The **sort** setting in **basic settings** controls the order. * When the sort type is **Label**, the order isn't changed, and the ratio is calculated based on the first value. * When the sort type is **Value** (ascending or descending), the ratio is calculated based on the maximum value. ## Tips ### Frame {#frame-feature} Funnel Chart supports the frame feature. See [Frame](./common-settings/frame#frame-feature) for details. --- --- url: 'https://docs.codatum.com/features/notebook/chart/waterfall-chart.md' description: A chart that shows the cumulative increase and decrease of items --- # Waterfall Chart Waterfall Chart shows the cumulative increase and decrease of items. The order of **labels** (dimension) determines the stacking order, and the sign of the **value** (metric) represents an increase or decrease. ![Waterfall](/chart-capture/waterfall-waterfall-light.png "Waterfall"){.light-only .chart-capture} ![Waterfall](/chart-capture/waterfall-waterfall-dark.png "Waterfall"){.dark-only .chart-capture} ## Specification ### Aggregation {#aggregation} Waterfall Chart [aggregates a value (metric) for each label (dimension)](./concept/dimension-metrics#dimension-metric) and displays the result cumulatively. | Item {.nowrap} | Role | Notes | | --- | --- | --- | | **Label** | Dimension | The name of each waterfall item. Its order becomes the stacking order. | | **Value** | Metric | Displayed as the increase/decrease value of each item. | You can control the order of labels with **sort**. Since order directly affects the meaning of the visualization, make sure to configure it to reflect the intended order. #### Example * Show the change from "opening balance → revenue → expenses → other" as a waterfall (for example, a breakdown of profit/loss or cash flow). * **Label**: names such as opening, revenue, expenses, other, and closing. * **Value**: the amount (increase/decrease) of each item. ## Tips ### Frame {#frame-feature} Waterfall Chart supports the frame feature. See [Frame](./common-settings/frame#frame-feature) for details. --- --- url: 'https://docs.codatum.com/features/notebook/chart/table-chart.md' description: A table chart showing raw or aggregated data --- # Table Chart Table Chart displays data as a table. The **source type** lets you choose between a raw table that shows fetched rows as-is, and an aggregated table that groups and aggregates data. ## Drawing types {#drawing-types} Table Chart supports the following drawing types. ![Table Raw](/chart-capture/table-raw-light.png "Raw table"){.light-only .chart-capture} ![Table Raw](/chart-capture/table-raw-dark.png "Raw table"){.dark-only .chart-capture} ![Table Aggregated](/chart-capture/table-aggregated-light.png "Aggregated table"){.light-only .chart-capture} ![Table Aggregated](/chart-capture/table-aggregated-dark.png "Aggregated table"){.dark-only .chart-capture} ## Specification ### Source type {#source-type} Table Chart has two source types, and the aggregation and display specification differs depending on which one you select. | Source type {.nowrap} | Description {.nowrap} | Column role | | --- | --- | --- | | Raw data (raw table) | Displays fetched rows as-is. | Select the **columns** to display. | | Aggregated data (aggregated table) | Groups and aggregates data. | [**Group by** (dimension), **Values** (metric)](./concept/dimension-metrics#dimension-metric). | ### Row display {#row-display} Aggregated tables initially use **Flat**. To change only the current display, select **Aggregate** > **Row hierarchy** above the table. This selection isn't saved in the chart settings. * **Flat**: Displays aggregated results as standard rows without adding subtotals. * **Grid**: Uses a separate column for each **Group by** field and lets you expand or collapse groups. Expanded groups don't show subtotals; collapsing a group displays its aggregate values in the parent row. To expand or collapse all groups of a **Group by** column at once, select the toggle icon in its column header. The lowest-level column doesn't have this icon. Expanding a column at once also expands the groups of the higher-level columns. ### Cell detail preview {#cell-preview} After selecting a cell or range, use the **Show selection details** icon on the selection to open the preview pane. A single-cell preview shows the column name, data type, and complete value. For a value cell in a pivot table, the preview shows its row axes, column axes, metric, and percentage. For multiple cells in one row, the table view of the row details includes only the selected columns, while the JSON view includes every field in the source row. For multiple rows in one column, column statistics use only the selected values. A range that spans multiple rows and columns doesn't provide a detail preview. Select a row number to open that row's details. ### Column header operations {#column-menu} Raw tables support the same [column header operations as SQL block results](../doc-page/sql-block#result-column-menu). In aggregated tables, you can sort and filter from column headers, use **Show column statistics**, pin eligible **Group by** columns to the left as a group, and adjust column widths. Drag-and-drop column reordering isn't available. ## Tips ### Image display {#image-preview} If a column's value is an image URL, you can display the image within the table chart by turning on **Enable** in **advanced settings** > **Column settings** > **Image URL preview**. ![Table Image Preview](/chart-capture/table-image-preview-light.png "Image display"){.light-only .chart-capture} ![Table Image Preview](/chart-capture/table-image-preview-dark.png "Image display"){.dark-only .chart-capture} ### Link display {#link-url} If a column's value is a URL, you can show a link in the table chart that opens the URL in a new tab by turning on **advanced settings** > **Column settings** > **Enable link URL**. ![Table Link URL](/chart-capture/table-link-url-light.png "Link display"){.light-only .chart-capture} ![Table Link URL](/chart-capture/table-link-url-dark.png "Link display"){.dark-only .chart-capture} #### Creating a link to a report with parameters {#report-param-link} By dynamically generating a URL with SQL, you can pass each row's data as a parameter to another report page. 1. Create the report and get the URL. * Set a parameter on the destination report, then copy the URL from the browser's address bar. * Example URL: `https://app.codatum.com/workspace/{workspace_id}/report/{report_id}/{page_id}` * Checking the parameter ID: note the ID of the parameter widget in the report (for example: `68f369edf5e6f69036b8872d`). 2. Create a URL column with SQL. * Use the `CONCAT` function to generate a URL that includes each row's data as a parameter, and insert it into the chart. * Example with a single parameter (country name): ```sql CONCAT( 'https://app.codatum.com/workspace/{workspace_id}/report/{report_id}/{page_id}?cdm.params.{parameter_id}=', country -- the column name to pass as the parameter ) AS link ``` 3. Enable the link in the table chart. * Open the target column under **advanced settings** > **Column settings**, and turn on **Enable link URL**. ##### Notes * Replace `country` with the name of the database column you want to pass as the parameter. * The current value of a parameter widget can't be referenced in SQL (only fixed values or column values). * When a user selects a cell, the report opens in a new tab. * For details on setting up parameters, see [Specifying values from a URL](../parameter/url). --- --- url: 'https://docs.codatum.com/features/notebook/chart/pivot-table.md' description: A two-dimensional cross-tabulation table --- # Pivot Table Pivot Table cross-tabulates a **value** (metric) against **rows** and **columns** (dimensions) and displays the result as a two-dimensional table. ![Pivot Table](/chart-capture/pivot-table-light.png "Pivot Table"){.light-only .chart-capture} ![Pivot Table](/chart-capture/pivot-table-dark.png "Pivot Table"){.dark-only .chart-capture} ## Specification ### Field roles {#fields} Pivot Table [treats rows and columns as dimensions and the value as a metric](./concept/dimension-metrics#dimension-metric), and shows the aggregated result as a table. | Item {.nowrap} | Role | Notes | | --- | --- | --- | | **Rows** | Dimension | One or more. | | **Columns** | Dimension | Optional. | | **Value** | Metric | Supports numeric and string metrics. | You can control the order with **row sort** / **column sort**. See [Filter, sort, and limit](./concept/filter-sort-limit#sort) for details. ### Column header operations {#column-menu} From a column header of the rendered table, you can [change column widths and pin columns](../doc-page/sql-block#result-column-menu). Only row-axis columns can be pinned; **Pin all aggregate columns to left** pins them together at the left edge. For columns generated as values, subtotals, or totals, only **Column width** operations are available. ## Tips ### Drill down {#drill-down} Pivot Table can display rows hierarchically and let you collapse them. When you set two or more row fields and use **Tree** as the row-axis hierarchy type, you can expand and collapse each row group. When you set two or more column fields, the column axis also displays collapsible groups. Both hierarchies are initially expanded. Use the hierarchy as follows. 1. Set multiple row or column fields. * In the chart settings, set 2 or more fields for **Rows** or **Columns**, such as a major category and a minor category. * Example: state (major category) → city (minor category). 2. Use the toggle icons in the table to expand or collapse the hierarchy. 3. To change the row-axis display, select an option under **advanced settings** > **Layout** > **Default hierarchy type**. * **Grid**: displays a table format. You can't expand or collapse row-axis groups. * **Tree**: displays the hierarchy in a single column and shows aggregate values in each upper-level row. To expand or collapse all levels at once, select the toggle icon in the column header of the row axis. 4. If you select **Tree**, select **Start collapsed** to collapse all hierarchy levels on initial display. Additional notes: * You can set the row-axis hierarchy type only when there are 2 or more row fields. * Report viewers can freely expand and collapse the hierarchy. * When all Value aggregation methods cannot be re-aggregated for subtotals and totals, total rows and columns are not displayed, and the aggregate cells of collapsed groups are left empty. ### Differences by processing method {#processing-diff} Pivot Table shows different results depending on whether [in-memory processing](./concept/overview#in-memory-processing) was used or SQL-based processing was used. * With in-memory processing * There's no limit on the number of rows or columns, and all aggregated data can be displayed. * With SQL-based processing * When both rows and columns are specified, each axis has a unique item limit. Excess items are grouped into `(Others)` at the end of the axis. * The default is 30 for each axis. You can change **Max row items** / **Max column items** in the chart's **Basic** tab or under **Pivot view settings** in the [Explorer](../explorer#pivot). * `(Max row items + 1) × (Max column items + 1)` must be 1,000 or less. A combination that exceeds this limit is an error. * If you set only one of **Max row items** / **Max column items**, the unspecified side is treated as the maximum that fits when checking this product. * If the specified value is large, that product can still exceed the limit. For example, 700 on one axis with the other unset is an error. * When only rows or columns are specified, the specified axis displays up to 990 items. See [Limits](../../../reference/limits#fixed-limits) for the chart rendering limit. --- --- url: 'https://docs.codatum.com/features/notebook/chart/text-panel.md' description: A panel that displays the first value of a selected column --- # Text Panel Text Panel displays the first value of a selected column as text. It's useful when you want to show text from a SQL run result, or a dynamic summary on a dashboard together with the [AI agent](../../ai-agent/overview). It doesn't process data (no aggregation by dimensions or metrics). ## Drawing types {#drawing-types} Choose the display format with **rendering mode** in **advanced settings**. ![Text Panel Markdown](/chart-capture/textpanel-markdown-light.png "Markdown"){.light-only .chart-capture} ![Text Panel Markdown](/chart-capture/textpanel-markdown-dark.png "Markdown"){.dark-only .chart-capture} ![Text Panel Raw](/chart-capture/textpanel-raw-light.png "Plain text"){.light-only .chart-capture} ![Text Panel Raw](/chart-capture/textpanel-raw-dark.png "Plain text"){.dark-only .chart-capture} ## Specification ### Aggregation {#aggregation} Text Panel doesn't aggregate data. It displays the first value of the column selected in **Value** under **basic settings**. If the value is NULL, nothing is displayed. ### Specification by drawing type {#drawing-type-details} **Rendering mode** in **advanced settings** offers the following choices. * **Markdown**: renders the output text as markdown. * **Plain text**: displays the output text as-is. --- --- url: 'https://docs.codatum.com/features/notebook/chart/map-chart.md' description: >- A chart that displays data on a map using latitude/longitude, geohash, geocode, or GeoJSON --- # Map Chart Map Chart displays data on a map. You can specify locations using latitude/longitude, geohash, geocode, or GeoJSON. The available drawing types depend on the data format. ## Data formats {#data-formats} Map Chart can display the following data formats on a map. ### Latitude/longitude {#lat-lng} Draws objects at the specified latitude/longitude position. Specify numeric columns for latitude and longitude. Available with the following drawing types. ![Map Pin](/chart-capture/map-pin-light.png "Pin"){.light-only .chart-capture} ![Map Pin](/chart-capture/map-pin-dark.png "Pin"){.dark-only .chart-capture} ![Map Bubble](/chart-capture/map-bubble-light.png "Bubble"){.light-only .chart-capture} ![Map Bubble](/chart-capture/map-bubble-dark.png "Bubble"){.dark-only .chart-capture} ![Map Heatmap](/chart-capture/map-heatmap-light.png "Heatmap"){.light-only .chart-capture} ![Map Heatmap](/chart-capture/map-heatmap-dark.png "Heatmap"){.dark-only .chart-capture} ![Map Flow](/chart-capture/map-flow-light.png "Flow"){.light-only .chart-capture} ![Map Flow](/chart-capture/map-flow-dark.png "Flow"){.dark-only .chart-capture} \* Flow requires two sets (source and target) of latitude/longitude. ### Geohash {#geohash} Draws objects at the position specified in [geohash](https://en.wikipedia.org/wiki/Geohash) format. The following drawing types (same as latitude/longitude) draw an object at the center point of the specified geohash. * Pin * Bubble * Heatmap * Flow The following drawing type fills in the area of the specified geohash. (The size of the filled area varies depending on the precision of the geohash.) ![Map Mesh](/chart-capture/map-mesh-light.png "Mesh"){.light-only .chart-capture} ![Map Mesh](/chart-capture/map-mesh-dark.png "Mesh"){.dark-only .chart-capture} #### Geohash samples Here are sample geohashes. | Geohash {.nowrap} | Precision | Example location | Approximate area size | | --- | --- | --- | --- | | xn | 2 characters | Around Tokyo | 630km × 500km | | xn7 | 3 characters | Central Tokyo | 78km × 78km | | xn76 | 4 characters | Tokyo Station area | 20km × 10km | | xn76u | 5 characters | Around Tokyo Station | 2.4km × 2.4km | | xn76ur | 6 characters | Near Tokyo Station | 610m × 300m | | xn76urx | 7 characters | Close to Tokyo Station | 76m × 76m | | xn76urxk | 8 characters | Around Tokyo Station | 19m × 9m | #### BigQuery example In BigQuery, you can use the `ST_GEOHASH` function to convert latitude/longitude data to a geohash. Converting to a geohash allows more efficient area-based aggregation and grouping than handling latitude/longitude individually. The following example uses BigQuery's `ST_GEOHASH` function to convert latitude/longitude data to a geohash. ```sql SELECT ST_GEOHASH(ST_GEOGPOINT(longitude, latitude), 6) AS geohash, COUNT(*) AS station_count FROM `bigquery-public-data.new_york_citibike.citibike_stations` GROUP BY geohash ORDER BY station_count DESC ``` ### Geocode {#geocode} Fills in the area associated with a geocode. Available with the following drawing type. ![Map Area](/chart-capture/map-area-light.png "Area"){.light-only .chart-capture} ![Map Area](/chart-capture/map-area-dark.png "Area"){.dark-only .chart-capture} Specify a geocode using a string in one of the following formats. | Granularity {.nowrap} | Geocode format | Geocode example | | --- | --- | --- | | Country | 2-letter country code ([ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1), uppercase) | JP | | Prefecture (Japan only) | `"JP-"` + 2-digit prefecture code ([JIS X 0402](https://en.wikipedia.org/wiki/JIS_X_0402)) | JP-13 | | Municipality (Japan only) | `"JP-"` + 5-digit municipality code ([JIS X 0402](https://en.wikipedia.org/wiki/JIS_X_0402)) | JP-13101 | | First 2 digits of postal code (Japan only) | `"JP-POST-"` + first 2 digits of postal code | JP-POST-10 | | First 3 digits of postal code (Japan only) | `"JP-POST-"` + first 3 digits of postal code | JP-POST-100 | The geospatial data used to fill areas is a lightweight, processed version of the following sources. * Global country boundary data: [Natural Earth](https://www.naturalearthdata.com/) * Boundary data within Japan: ["National Land Numerical Information (Administrative Areas)" (Ministry of Land, Infrastructure, Transport and Tourism)](https://nlftp.mlit.go.jp/ksj/gml/datalist/KsjTmplt-N03-2025.html) * Postal code boundary data: [郵便番号境界データ(地図地理Sandbox)](https://hanishina.net/maps/yubindata.html) A geocode that's valid in format but not included in the above data can't be drawn. #### Geocode samples Here are sample geocodes. See the [CSV file of available geocodes](https://static.codatum.com/v/latest/public/geojson/codes.csv) for the full list of available geocodes. | Geocode {.nowrap} | Name | | --- | --- | | US | United States | | JP | Japan | | JP-01 | Hokkaido | | JP-02 | Aomori Prefecture | | JP-03 | Iwate Prefecture | | JP-01100 | Sapporo City | | JP-01101 | Sapporo, Chuo Ward | | JP-01102 | Sapporo, Kita Ward | | JP-01103 | Sapporo, Higashi Ward | | JP-01202 | Hakodate City | | JP-01203 | Otaru City | | JP-01204 | Asahikawa City | | JP-POST-10 | Postal codes 10X-XXXX | | JP-POST-100 | Postal codes 100-XXXX | ### GeoJSON {#geojson} Draws geometry data specified in GeoJSON format on a map. Available with the following drawing types. ![Map Polygon](/chart-capture/map-polygon-light.png "Polygon"){.light-only .chart-capture} ![Map Polygon](/chart-capture/map-polygon-dark.png "Polygon"){.dark-only .chart-capture} ![Map Polyline](/chart-capture/map-polyline-light.png "Polyline"){.light-only .chart-capture} ![Map Polyline](/chart-capture/map-polyline-dark.png "Polyline"){.dark-only .chart-capture} Specify JSON of the following geometry types as a string column. * `Point` * `LineString` * `Polygon` * `MultiPoint` * `MultiLineString` * `MultiPolygon` * `GeometryCollection` #### GeoJSON sample ```json { "type": "Polygon", "coordinates": [ [ [-73.9812, 40.7681], [-73.9581, 40.7681], [-73.9581, 40.8007], [-73.9812, 40.8007], [-73.9812, 40.7681] ] ] } ``` #### BigQuery example In BigQuery, you can use the `ST_ASGEOJSON` function to convert geometry data to GeoJSON format. The following example converts the `county_geom` column of the `bigquery-public-data.geo_us_boundaries.counties` table to GeoJSON format. ```sql SELECT * EXCEPT (county_geom), ST_ASGEOJSON(county_geom) AS county_geom FROM `bigquery-public-data.geo_us_boundaries.counties` WHERE state_fips_code = '36' -- New York ``` If the size of the geometry data you want to draw is large, it might hit the size limit for SQL run results and cause an error. In that case, you can use the `ST_SIMPLIFY` function to simplify the geometry data and reduce its size. Large geometry data also affects rendering performance, so simplify it to the minimum size necessary. ```sql SELECT * EXCEPT (county_geom), ST_ASGEOJSON(ST_SIMPLIFY(county_geom, 1000)) AS county_geom FROM `bigquery-public-data.geo_us_boundaries.counties` WHERE state_fips_code = '36' -- New York ``` ## Usage limitations {#limitations} Map Chart uses WebGL to render maps, which brings the following limitations. * It can't be drawn in browsers that don't support WebGL. * Because of limits on the number of WebGL contexts, trying to render many map charts at the same time might discard charts that were rendered earlier. * Redrawing restores the display, but be careful not to have too many map charts on a single page. --- --- url: 'https://docs.codatum.com/features/notebook/chart/word-cloud.md' description: A chart that visually shows the frequency or importance of keywords --- # Word Cloud Word Cloud aggregates a **value** (metric) for each **word** (dimension) and visualizes the weight of each word using font size and other visual cues. ![Word Cloud](/chart-capture/word-cloud-light.png "Word Cloud"){.light-only .chart-capture} ![Word Cloud](/chart-capture/word-cloud-dark.png "Word Cloud"){.dark-only .chart-capture} ## Specification ### Aggregation {#aggregation} Word Cloud [aggregates a value (metric) for each word (dimension)](./concept/dimension-metrics#dimension-metric) and displays the result. | Item {.nowrap} | Role | Notes | | --- | --- | --- | | **Word** | Dimension | Each word in the word cloud. | | **Value** | Metric | Determines the size of the word. | #### Example * Show content tags as a word cloud. * **Word**: tag name. * **Value**: number of pieces of content with that tag. ## Tips ### If some words don't appear {#missing-words} Word Cloud draws words in descending order of value, and words that don't fit in the display area are automatically hidden. As a result, words with small values might not be displayed. If you have many words and not all of them are shown, adjust **advanced settings** > **Word settings** > **font size range**, **word spacing**, or the chart's display area. Enabling **Automatically shrink words** lets font sizes automatically adjust for words that don't fit in the display area. However, with a large number of words, recalculating font sizes can make the chart feel slow. Because of this, the feature is disabled by default. Be mindful of the word count when enabling it. ### Frame {#frame-feature} Word Cloud supports the frame feature. See [Frame](./common-settings/frame#frame-feature) for details. --- --- url: 'https://docs.codatum.com/features/notebook/explorer.md' description: >- A feature for filtering, aggregating, and pivoting run results without writing SQL, and connecting the results to charts or SQL blocks --- # Explorer Explorer lets you explore SQL run results, chart data sources, and table preview data through a GUI. You can analyze data with filtering, sorting, aggregation, and pivoting without writing SQL, and even add charts or SQL blocks to the notebook from the results. ## Key features | Feature {.nowrap} | Description | | --- | --- | | [Switching views](#views) | Switch the exploration approach between **Raw data**, **Aggregated data**, and **Pivot**. | | [Setting conditions](#conditions) | Specify **Filter**, **Sort**, **Limit**, and more through a GUI. | | [Result display](#result-tabs) | In **Aggregated data** and **Pivot**, switch how results are shown between **Table** and **Chart**. In **Raw data**, switch between **Table** and **Distribution**. | | [Column header operations](#column-menu) | Add sorting, filters, or column statistics from a table's column. | | [Using exploration results](#use-results) | Add a chart or SQL block, or download data. | ## Opening Explorer {#open} You can open Explorer in any of the following ways. ### Doc page * Once a [SQL block](./doc-page/sql-block) has run successfully, select **Explore** in the run result header. * Select **Explore** from the float menu of a [chart](./chart/overview), or **Open in Explorer** in the chart's fullscreen view header. * Select **Explore** on a **Table preview** block. * On a run result or table preview table, select **Open Explorer** from the float menu, or **Open in Explorer** in the fullscreen view header. * Right-click a table cell and select **Open in Explorer** to open Explorer filtered by that cell's value. * From the icon on a value cell in [column stats](./doc-page/sql-block#column-stats), select **Open explorer**. ### Grid page * On a [grid page](./grid-page/overview), select **Open Explorer** from the float menu of a **Query result** table, or **Explore** from the float menu of a **Chart**. * **Open in Explorer** is also available in the fullscreen view header of a query result or chart, and in the right-click menu on a table cell. When opened from a **Chart** on a grid page, you can [add a chart](#use-results), but you can't add a SQL block. When opened from a **Query result**, only exploration and downloading (if allowed) are available. ## Layout {#layout} Explorer opens as a full-screen view, divided mainly into the following areas. | Area {.nowrap} | Content | | --- | --- | | Header | Title, **auto-run toggle**, adding a chart or SQL block, **Download**. | | Left pane | **Data source** (column list) and the condition form. | | Right pane | [Result display](#result-tabs). | ## Exploring data {#explore} 1. At the top of the condition form in the left pane, choose **Raw data**, **Aggregated data**, or **Pivot**. 2. Drag and drop columns from **Data source**, or add fields using each item's selector. Use **Filter columns** to narrow the list. You can toggle the display between **By data type** and **In original order**. 3. Set **Filter**, **Sort**, and **Limit** in [common conditions](#conditions). 4. If the right pane shows `Conditions changed. Please re-run the query.`, select **Run query**, or turn on **Auto-run** in the header. 5. Review the results with the display toggle in the right pane. In **Aggregated data** and **Pivot**, the options are **Table** and **Chart**. In **Raw data**, they are **Table** and **Distribution**. Turning on **Auto-run** re-runs SQL automatically whenever conditions change, for as long as Explorer stays open. It turns off again when you close Explorer. ## Using exploration results {#use-results} When you have edit permission on the notebook, you can do the following. | Operation {.nowrap} | Description | | --- | --- | | **Add chart** | Adds a chart suggested from the current exploration conditions, and closes Explorer. | | **Add chart and continue** | Adds the chart while keeping Explorer open. | | **Edit in chart editor** | Opens the chart editor, and closes Explorer. | | **Add SQL block** | Creates a new SQL block with SQL equivalent to the current conditions, and closes Explorer. | | **Add SQL block and continue** | Adds the SQL block while keeping Explorer open. | | **Download** | Downloads data based on the current Explorer conditions. | Adding a chart is available when Explorer was opened from a SQL block's run result, a chart under it, a **Block chart** (including inline charts), or a **Chart** on a grid page. The added chart is placed in the run result of the source SQL block. When opened from a grid page, the chart is also placed at the bottom of the grid page. When opened from a table preview, select **Add SQL block** first, then add the chart. ## Views {#views} Field settings carry over as much as possible when you switch views in the condition form. Details for each view are as follows. ### Raw data Explores unaggregated raw data. | Item {.nowrap} | Description | | --- | --- | | **Raw view settings** > **Columns** | Specifies the columns to display. | | **General settings** | **Filters** / **Sorts** / **Limit**. | ### Aggregated data Explores data grouped and aggregated by selected columns. | Item {.nowrap} | Description | | --- | --- | | **Aggregated view settings** > **Group by** | Specifies the columns to group by (equivalent to a chart's dimensions). | | **Aggregated view settings** > **Values** | Specifies the columns to aggregate and the **aggregation method** (equivalent to a chart's metrics). | | **Aggregate display settings** | When you specify multi-level **Group by** fields, you can choose **Flat** (default) or **Grid** for the row hierarchy. Both hierarchies keep the rows of each group together. Groups are ordered by where they first appear in the aggregated results. **Grid** is initially expanded and doesn't show subtotals. Collapsing a group displays its aggregate values in the parent row. To expand or collapse all groups of a **Group by** column at once, select the toggle icon in its column header. The lowest-level column doesn't have this icon. Expanding a column at once also expands the groups of the higher-level columns. | | **General settings** | **Filters** / **Sorts** / **Limit**. | Either **Group by** or **Values** is required. See [Dimensions and metrics](./chart/concept/dimension-metrics#aggregation) for details on **aggregation method**. ### Pivot {#pivot} Explores data aggregated across two dimensions: rows and columns. | Item {.nowrap} | Description | | --- | --- | | **Pivot view settings** > **Rows** | Specifies the columns to use as the row axis. | | **Pivot view settings** > **Columns** | Specifies the columns to use as the column axis. | | **Pivot view settings** > **Values** | Specifies the aggregated values shown in each cell. Required. | | **Pivot view settings** > **Sort rows** / **Sort columns** | Specifies the order of each axis. The default is value descending when the first **Value** supports subtotal and total calculations. Otherwise, the default is label ascending, and value sorting isn't available. | | **Pivot display settings** | For multi-level row axes, you can choose **Grid** (default) or **Tree** for the row hierarchy. In **Tree**, to expand or collapse all levels at once, select the toggle icon in the column header of the row axis. Multi-level column axes are displayed as collapsible groups. Both are initially expanded. When all Value aggregation methods cannot be re-aggregated, totals are not displayed and the aggregate cells of collapsed groups are left empty. | | **Pivot view settings** > **Max row items** / **Max column items** | Shown when both rows and columns are specified and SQL-based processing is used. Sets the unique-item limit for each axis (default 30 each if both are unset; excess items are grouped into `(Others)` at the end of the axis). `(Max row items + 1) × (Max column items + 1)` must be 1,000 or less. If you set only one of them, the unspecified side is treated as the maximum that fits within the rendering limit when checking this product. See [Pivot Table](./chart/pivot-table#processing-diff) for details. | | **General settings** | **Filters** (no **Sorts** or **Limit**). | ## Common conditions and options {#conditions} ### Filter **Filter** narrows down data by combining a column, an operator, and a value. Operators and the handling of **Custom SQL** are the same as a chart's [source filter](./chart/concept/filter-sort-limit#source-filter). **Custom SQL** isn't available for snapshot sharing (such as reports). ### Sort **Raw data** and **Aggregated data** let you specify **Sort**. You can sort by multiple columns. ### Limit **Raw data** and **Aggregated data** let you specify **Limit** between 1 and 1000. See [Limits](../../reference/limits#fixed-limits) for the upper bound. ### Disabling in-memory processing {#in-memory-processing} Turning on **Options** > **Disable in-memory processing** re-runs SQL according to the current conditions instead of processing already-fetched data. By default, if the result has 1000 rows or fewer and there's no **Custom SQL**, filtering and aggregation can be done through in-memory processing in the browser. If the source data has more than 1000 rows and has been truncated, SQL needs to be re-run. See [Chart concepts](./chart/concept/overview#in-memory-processing) for how this relates to the same option on charts. ## Result display {#result-tabs} In the right pane, switch how results are shown. In **Aggregated data** and **Pivot**, the options are **Table** and **Chart**. In **Raw data**, they are **Table** and **Distribution**. | Display {.nowrap} | Description | | --- | --- | | **Table** | Shows the data processed by the current conditions as a table. In the pivot view, this is a pivot table. | | **Distribution** | Choose **Parallel** or **Scatter matrix** in **Render type**, and check the distribution of up to 5 **Columns**. Requires 2 or more columns. | | **Chart** | Switch between suggested chart candidates for the current conditions using **Chart type**, and preview the appearance after adjusting **Render type**. | To review the processing SQL issued for the current conditions, select **Show SQL**. ## Column header operations {#column-menu} Select a column header in the **Table** display to access the following operations. For columns generated as Pivot values, subtotals, or totals, **Column width** operations are available. **Column statistics** are also available when Explorer can identify the source column. Applying a filter operation replaces the filter conditions already applied to that column. | Operation {.nowrap} | Description | | --- | --- | | **Sort** | Sorts by **Asc** or **Desc**. Use **Append** to add to existing sort conditions. | | **Filter** | Shows the following filter operations. If filters are applied, their types appear next to the item. Press Esc to return to the previous menu. **Filter by value**: In **Filter by value** (`IN`) or **Exclude by value** (`NOT IN`), select candidate values, then select **Apply**. If the result is truncated, use **Fetch non-sampled values** to load candidates from all rows. **Filter by condition**: Applies a condition such as **Equals**, **Does not equal**, **Between**, or **Greater than**. **Filter NULL**: Applies `IS NULL` or `IS NOT NULL`. | | **Column statistics** | Shows statistics for the source column over all rows of the SQL result before processing in a modal: **Count**, **Unique count**, and **Number of NULL**, plus **Max value** / **Min value** / **Avg value** depending on the values. Statistics are computed by running SQL. | | **Pin to left** / **Pin to right** | In Raw data, pins an individual column. In Aggregated data, only Group by columns are eligible, and in Pivot, only row-axis columns are eligible; **Pin all aggregate columns to left** pins all eligible columns in their configured order. Select the active option again to unpin them. | | **Column width** | Use **Fit to values** or **Reset to initial width** for the selected column. Use **Fit all columns to values** or **Reset all columns to initial widths** for every column. | ## Where you can use it {#availability} | Location {.nowrap} | Availability | | --- | --- | | Notebook (doc page / grid page) | Available. Add operations are limited to editing a doc page. | | [Report](./sharing/report/overview) | Available for **interactive reports** with **Enable explorer** turned on in the publish settings. Disabled by default. | | [Signed embed](./sharing/signed-embed/overview) | Available when **Enable explorer** is turned on in the publish options. Disabled by default. | | [Public link](./sharing/public-link/overview) | Not available. | See [Sharing](./sharing/overview#comparison) for a comparison of notebook sharing methods. --- --- url: 'https://docs.codatum.com/features/notebook/inline-table.md' description: 'Edit small tables in a notebook as a sheet or CSV, and reference them from SQL' --- # 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](#connector-reference)). ::: info This feature is in **preview**. To request access, contact Codatum support. ::: ## Inline table editor {#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](#formula) and [references](#reference) on columns. * With **Show CSV**, you edit the CSV text and the table [definition (YAML)](#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](./explorer). If no SQL block references the inline table, the editor stays on the current page. ## Creating and editing an inline table {#create-edit} You need edit permission on the notebook. When the notebook's [lock](./overview#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](#download) the table from the editor menu. You can't [write to Google Sheets](#write-google-sheets) when it's view-only. Inline tables in a [version](./version#inline-tables) are view-only. ### Creating an inline table in a sheet 1. In **Inline tables** in [the left sidebar](../../guide/screen-layout), open **Add**, then select **Create new** under **Inline table**. 2. Select **Add column** at the right end of the headers. 3. Enter **Name**, **Display name (optional)**, and **Data type**. SQL and formulas refer to the column by **Name**. 4. Select **Add**. 5. Enter values in the sheet. Use **Add row** at the end of the table to add rows. 6. 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 {#create-from-file} 1. In **Inline tables** in [the left sidebar](../../guide/screen-layout), open **Add**, then select **Upload CSV or Excel** under **Inline table**. 2. Select a CSV file (encoded in UTF-8, Shift\_JIS, or UTF-16 with a BOM) or an Excel file (.xlsx). 3. 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)](#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 become `YYYY-MM-DDTHH:MM:SS`. Fractions of a second are dropped. Time-only cells and duration cells (date and time values before March 1, 1900) become `HH:MM:SS`, and the hours can exceed 24 (such as `25: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.0` becomes `12000`). * Text cells, including values with leading zeros, are imported as they are. * Boolean cells become `true` or `false`. * Error cells (such as `#N/A` and `#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 {#create-from-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. 1. Run SQL in a SQL block. 2. Select the **Save result as inline table** icon at the top right of the SQL block. 3. Enter a name. 4. Select an option under **How to keep the data**. 5. If you select **Reference this SQL block**, select the **Key columns**. 6. 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](#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](#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](#datatypes), 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 {#create-from-connector} You can create an inline table from a table in an external service that you can read with a [connector reference](#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](#connector-reference). 1. In **Inline tables** in [the left sidebar](../../guide/screen-layout), open **Add**, then select **Create from connector** under **Inline table**. 2. Select **How to keep the data**. 3. Select the **Connector**. 4. Select the source. You select it in the same way as for a [connector reference](#connector-reference). 5. If you select **Reference the source**, select the columns that identify each row in **Key columns**. 6. In **Columns**, select the columns to include in the inline table. 7. Check the **Name**. 8. 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](#reference-spec). 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, `$id` is selected in **Key columns** by default. For Notion, `page_id` is 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](#connector-columns). 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](../../reference/limits). ### Creating an inline table with the AI agent {#create-by-agent} You can ask the [AI agent](../ai-agent/overview) to create inline tables from the chat. It can also save a SQL result, a tool result from an [agent connector](../../workspace/external-integrations/agent-connectors), 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](#refresh) them. ## Setting a formula {#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. 1. In the sheet, select a cell in the column. 2. 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. 3. 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 `=`. Press `Enter` or `F2`, 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 `Esc` to cancel editing. For formula syntax and calculation rules, see [Formulas](#formula-spec). ## Looking up values from a SQL block {#reference} A reference on a column looks up values from the result of a SQL block in the same notebook, matching rows by the [key](#key). You need the following: * Edit permission on the notebook. You can use this only when the notebook's [lock](./overview#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. 1. To the left of **Save**, select **Settings**. 2. Under **Key**, select the columns that identify each row. 3. Select **Apply**. 4. Select the header of the column that should receive values. 5. Open **Reference** in the column menu. 6. 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**. 7. 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. 8. Select **Column in the source**. 9. Select **Apply**. 10. 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**. 11. 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](#reference-spec). ## Looking up values from a connector {#connector-reference} When you use an [agent connector](../../workspace/external-integrations/agent-connectors) as a source, you can look up values from a table in an external service, matching rows by the [key](#key). You can use the following connectors as sources. | Connector {.nowrap} | 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](../../workspace/external-integrations/agent-connectors#inline-table) for agent connectors. You need the following: * Edit permission on the notebook. You can use this only when the notebook's [lock](./overview#lock) is set to **Unlocked**. * You're a [user](../../workspace/external-integrations/agent-connectors#sharing) of the connector. No AI profile permission is needed. * For a personal auth connector, your account connected to it. Connect it in [Connector authentication](../../account/settings/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. 1. To the left of **Save**, select **Settings**. 2. Under **Key**, select the columns that identify each row. 3. Select **Apply**. 4. 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**. 5. Choose the source. How you choose it depends on the connector (see the table below). 6. 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. 7. Select **Add source**. 8. Select the header of the column that should receive values. 9. In **Reference** in the column menu, choose the **Source** and the **Column in the source**. 10. Select **Apply**. 11. In **Reference** in the column menu, select **Refresh this reference**. 12. Select **Save**. | Connector {.nowrap} | 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](#revisions), restoring a [version](./version#inline-tables), 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](#reference-spec) 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](#connector-columns). For how connector sources are refreshed, see [References](#reference-spec). ## Refreshing an inline table {#refresh} 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](#reference). 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](../../guide/screen-layout), or select **Go to the linked SQL block** in the inline table editor. 1. Open the inline table editor. 2. 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](#revisions). * 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](#csv-changed). 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 {#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](#sheet-save). You can revert to a past revision as follows: 1. Open the menu in the inline table editor, then select **Revision history**. 2. 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](./version#inline-tables) and other resources are retained. ## Downloading an inline table {#download} You can download the values of an inline table as a CSV file or an Excel file (.xlsx). 1. 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](../../reference/limits). ## Writing to Google Sheets {#write-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](../../workspace/external-integrations/agent-connectors). You can't write when the notebook's [lock](./overview#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](../../workspace/external-integrations/agent-connectors#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. 1. Open the menu in the inline table editor, then select **Write to Google Sheets**. 2. Select a **Connector**. 3. Enter the URL or ID of the spreadsheet. 4. Select **Load**. 5. Select **Overwrite an existing sheet** or **Add a sheet**. 6. To overwrite, select the sheet. To add a sheet, enter the **Sheet name**. 7. Select **Overwrite sheet** or **Add sheet**. 8. 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-dd` format, and datetimes use the `yyyy-mm-dd hh:mm:ss` format. 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 as `00123` don'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](../../reference/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 {#sql-reference} 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 {#sheet-spec} ### Cell value priority {#value-priority} Each cell in the sheet takes the highest-priority value of the following three. | Priority {.nowrap} | Value {.nowrap} | 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 {#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](#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](#period). ### Formulas {#formula-spec} 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 {#formula-syntax} | Syntax {.nowrap} | 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 {#formula-prev-total} | Syntax {.nowrap} | 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](#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](#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](#formula-aggregates), `RUNNING_SUM`, `MOVING_AVG`, and `NEXT` can be narrowed with `WITHIN $column`. #### Aggregates over rows {#formula-aggregates} 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 {.nowrap} | 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. `AVG` averages the rows that aren't empty, and `RANK` doesn't rank empty rows. * You can't put an aggregate, `PREV`, or `TOTAL` inside an aggregate. #### Functions {#formula-functions} Function names are case-insensitive. Arguments in `[ ]` are optional. | Function {.nowrap} | 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](#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 {#formula-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 to `COALESCE`, `GREATEST`, `LEAST`, or `CONCAT`, 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.5` becomes 3, and `-2.5` becomes -3). * A wrong number of function arguments, an unsupported unit in `DATE_TRUNC` or `DATE_DIFF`, an unsupported format in `STRFTIME`, a formula that ends with a keyword such as `AND` or an operator, and `CAST` without `AS type` cause 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+Z` to redo it. * A column's own value can be used only inside `PREV`. Using it in `TOTAL` or an aggregate such as `SUM` would 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 {#formula-editor} 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+Space` to 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+Enter` to apply. ### References {#reference-spec} Set the following items in **Reference** in the column menu. | Item {.nowrap} | 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](#connector-reference), 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](#revisions). * 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](#connector-columns). 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](#connector-columns)). 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 {#connector-columns} Each connector reads the columns and rows of a source as follows. | Connector {.nowrap} | 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 as `1e3` aren'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-DD` or `YYYY/MM/DD` (the month and day can be one digit). Formats such as `4/1/2026` aren'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 `/` or `T`, 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.022Z` or `2024-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 as `0.15` and `¥1,200` as `1200`. * 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 become `YYYY-MM-DDTHH:MM:SS` (fractions of a second are rounded to the nearest second), so columns displayed as `4/1/2026` or `2026年4月1日` are also read as dates (DATE) and datetimes (DATETIME). Cells with a time or duration format become `HH:MM:SS` text. * 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 the `YYYY-MM-DD` form. **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](#create-from-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](#create-from-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,200` or `15%`) 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 {.nowrap} | 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 {.nowrap} | 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](../../reference/limits). * All pages of the data source are read. You can't filter them. ### Periods {#period} 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](#row-grouping) by fiscal year and quarter. | Item {.nowrap} | 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 {#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](#row-grouping) and [sorts and filters](#sort-filter). * [Column visibility](#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](#sheet-save) 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} **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](#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 `true` and then `false`. 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](#column-visibility) 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](#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](#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} **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](#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](#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](#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 {#layout-common} * Only rows that match the [filters](#sort-filter) are shown. * Cards and rows follow the [sorts](#sort-filter) 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 `PREV` and 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 {#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](#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](#kanban) and [Timeline](#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](#sheet-save). Subtotals aren't saved to the CSV. ### Sort and filter {#sort-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 (`TOTAL` and `PREV`) still use all rows. * Sorts and filters are saved in the [sheet settings](#sheet-save) 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 {#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 {#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](#views). 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 {#table-settings} Use **Settings** to the left of **Save** to view and set the following items. | Item {.nowrap} | Description | | --- | --- | | **Key** | The columns that identify each row. See [Key](#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](#reference) and [Looking up values from a connector](#connector-reference). | | **Period** | See [Periods](#period). | | **Column hierarchy** | The list of parent and child columns. Appears when the table has parent and child columns. | ### Column menu {#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 {.nowrap} | 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](#sort-filter). | | **Filter** | See [Sort and filter](#sort-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)](#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](#reference-spec). | | **Formula** | See [Formulas](#formula-spec). | | **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](#row-grouping): **Sum**, **Average**, **Max**, **Min**, **Count**, **Last value**, or **None**. | | **Add to key** / **Remove from key** | See [Key](#key). | | **Group rows by this column** / **Group by month** and similar items | See [Row grouping](#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](#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 {#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+D` on 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 `⌘D` copy 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+F` moves 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 hold `Shift` while selecting them, to select several rows. With cells selected, press `⌘-` (`Ctrl+-` on Windows) to delete the rows in the range. * Press `⌘S` / `Ctrl+S` to 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} 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+Enter` or 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 {#sheet-save} 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](#views) (the layout and its settings, the columns used for [row grouping](#row-grouping), [sorts and filters](#sort-filter), [column visibility](#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 {#csv-changed} When the CSV changes through editing in **Show CSV**, the AI agent, or a [refresh](#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)](#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) {#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 {#datatypes} 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](#column-menu). | Data type {.nowrap} | 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 {#versions} Inline tables are included in [versions](./version#inline-tables). See the version specification for behavior when you inspect, restore, or create a notebook from a version. ## Constraints {#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 (`Sales` and `sales`). 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](#connector-reference). * 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](./parameter/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](../../reference/limits#fixed-limits). --- --- url: 'https://docs.codatum.com/features/notebook/comment.md' description: Collaboration through comments and mentions on notebooks and reports --- # Comment Comments let you attach discussion or feedback to a range in the body of a notebook or report. You can also use `@` [mentions](#mention) in the body or in comments. See [Notification preferences](../../account/settings/notification) for notification settings. Whether you can comment follows the view permission of the target resource ([notebook permissions](../../permissions/resources/notebook), [report permissions](../../permissions/resources/report)). While a notebook is [locked](./overview#lock), you can't edit it, but you can still comment. ## Key features * [Adding a comment](#add-comment): create a thread on a selected range of the body * [Comment list](#comment-list): list and filter from **Comments** in [the right sidebar](../../guide/screen-layout) * [Mentions](#mention): mention a user in the body or in comments * [Comments in reports](#report-comments): availability and disabling in the report view ## Adding a comment {#add-comment} Prerequisite: you need view permission on the target notebook or report. 1. Select the text or block range in the body that you want to comment on. 2. From the menu that appears, select **Add comment**. 3. Enter your comment and select **Add**. A marker appears where existing comments are attached. Select **Open comment** to open the thread. For each comment, you can do the following. * **Edit** / **Delete** (your own comments) * **Add reaction** * **Resolve** * **Copy link** (link to the thread) ## Comment list {#comment-list} Open **Comments** in [the right sidebar](../../guide/screen-layout) to see a list of comments on the current page. In reports, you can also open this from **Comments** in the header. The list can be filtered as follows. | View {.nowrap} | Description | | --- | --- | | **Open** | Active comments and comments with broken references. | | **Active** | Unresolved comments whose target range is still valid. | | **Broken reference** | Comments whose target range can no longer be referenced, for example because it was deleted. | | **Resolved** | Comments closed with **Resolve**. | ## Mentions {#mention} While typing in the body or in a comment, type `@` to choose a workspace user from a list of candidates. Mentioned users receive a notification according to their [notification preferences](../../account/settings/notification). | Location {.nowrap} | Notification event (notebook) | | --- | --- | | Notebook body | **Mention in notebook** | | Notebook comment | **Mention in comment** / **Reply in comment** | For comments on reports, the targets are **Mention in comment** / **Reply in comment**. ## Comments in reports {#report-comments} You can comment on reports the same way as on notebooks. If **Disable comments** is turned on in the report settings, comments are unavailable for that report (see [Report settings](./sharing/report/overview#report-settings)). It's off (comments available) by default. Comments aren't available in signed embeds. --- --- url: 'https://docs.codatum.com/features/notebook/version.md' description: Automatic and manual notebook versions --- # Version Version lets you save, restore, and compare the analysis state of a notebook. Select **Version** from the menu on the right side of [the header](../../guide/screen-layout) in the notebook screen to show it in the right sidebar. Parameter values and run results within a version are specific to each user and aren't synced to other users. Parameter changes can also be synced to the URL (see [Specifying values from a URL](./parameter/url)). ## Kinds of versions {#kinds} | Kind {.nowrap} | Description | | --- | --- | | **Manual** | Created manually by a user. Never overwritten automatically. | | **Automatic** | Created automatically when changes are made. Not created more often than roughly once per hour. Older automatic versions are deleted. | | **Published** | Created when publishing a report, signed embed, or similar. | | **AI edit** | Created automatically before edits made by, for example, the [AI agent](../ai-agent/overview#operation-modes) (used for rollback). | ## Operations {#operations} From a version's menu, you can do the following. | Operation {.nowrap} | Description | | --- | --- | | **Restore this version** | Restores the current notebook to the content of the selected version. Requires edit permission on the notebook. | | **Create new from version** | Creates a new notebook from the selected version. | | **Compare with current notebook** | Compares the selected version with the current notebook. | | **Copy URL** | Copies the URL of a manual version. | | **Delete** | Deletes a manual version. | ## Inline tables {#inline-tables} [Inline tables](./inline-table) saved in a version are read-only. **Restore this version** restores the inline tables and references as of the save. **Create new from version** copies the inline tables and references as of the save into the new notebook. --- --- url: 'https://docs.codatum.com/features/notebook/export.md' description: Exporting notebooks and importing selected pages --- # Export and import You can export the content of a notebook as a file, and use an exported file to restore pages or create a new notebook. Exported files can be used as backups or with the [Codatum CLI](../cli/overview). ## Export From the menu in [the header](../../guide/screen-layout) inside a notebook, select **Export** to export in the following formats. | Menu | Format | Description | | --- | --- | --- | | **Export** | `.yml` | Exports the entire notebook as a file. Use this file for the import steps below. | | **Export as Markdown file** | `.cnb.md` | A notebook file format usable with the Codatum CLI (available in workspaces where the Codatum CLI is enabled). | | **Export as SQL files** | `.zip` | Exports SQL blocks as `.sql` files. See the `README.md` in the output for details. | | **Export as dbt project** | `.zip` | Exports SQL blocks as a dbt project. See the `README.md` in the output for details. | You can't export a notebook that contains [inline tables](./inline-table) or inline table references in any Web export format. This also applies when inline tables are disabled for the workspace but existing inline table references remain in the notebook. The Codatum CLI `notebook pull` command can retrieve a notebook with inline table references. The resulting `.cnb.md` file contains only the references, not the inline table CSV or column definitions. ## Import {#import} Import an exported `.yml` file into either of the following destinations. * **Import as a new notebook** * **Add pages to the open notebook** You can't import a `.yml` file that contains inline tables or inline table references. In both cases, after you select the file, choose the pages to import under **Target pages**. All pages are selected by default. Clear the pages you don't need, then select **Import**. ### Import as a new notebook {#import-as-new} 1. In the folder tree in [the left sidebar](../../guide/screen-layout) of the notebook list, open **Add notebook or folder**. 2. Select **Import from file**. 3. Select **Select file** and choose the `.yml` file. 4. Under **Target pages**, select the pages to import. 5. Check the [Fallback connection](#fallback-connection), then select **Import**. A new notebook is created that contains only the selected pages. ### Add pages to an existing notebook {#import-pages} 1. Open the destination notebook. 2. From the menu in [the header](../../guide/screen-layout), select **Import pages**. 3. Select **Select file** and choose the `.yml` file. 4. Under **Target pages**, select the pages to add. 5. Check the [Fallback connection](#fallback-connection), then select **Import**. The selected pages are appended to the open notebook. ### Fallback connection {#fallback-connection} This is the replacement connection used when a connection specified in the notebook isn't available. If you enable **Force replace all**, every connection is replaced with the fallback connection, regardless of availability. ::: tip You can still export a notebook that has become uneditable because it exceeds the size limit. Import only the pages you need into a new notebook to keep editing. ::: --- --- url: 'https://docs.codatum.com/features/notebook/folder.md' description: Notebook placement and access scope --- # Folder Notebooks are organized into folders. The **root folder** a notebook belongs to determines its [access scope](../../permissions/resources/notebook#access-scope). Moving a notebook across root folders also changes its access scope. In the folder tree in [the left sidebar](../../guide/screen-layout) of the notebook list, folders are shown under the following headings. | Heading {.nowrap} | Root folder name {.nowrap} | Permissions | | --- | --- | --- | | All members | Workspace | Access depends on the workspace role. | | Teamspaces | (each teamspace name) | Access depends on the resource role in the [teamspace](../../workspace/administration/teamspace). | | Direct shared | Shared | Accessible to users and groups granted [additional notebook permissions](./sharing/additional-permissions/overview). | | Personal | Private | Only the owner, if also a [workspace editor](../../workspace/administration/user#workspace-roles) or above, can operate on it. | The root folders shown also depend on the user's permissions. Depending on your contract, teamspace, shared, and private folders might not be available. See [Notebook permissions](../../permissions/resources/notebook#access-scope) for the conditions for each operation. ## Creating and managing {#manage} In the folder tree in [the left sidebar](../../guide/screen-layout), open **Add notebook or folder** to do the following. * **New notebook** * **Create from template** (see [Creating from a template](./overview#templates)) * **Import from file** (see [Export and import](./export)) * **New folder** From a folder's menu, you can **Rename folder**, **Move**, or **Delete**. You can also move or delete notebooks in bulk from the notebook list. ## Sorting and filtering the list {#list} When you open a folder, the [main area](../../guide/screen-layout) lists the subfolders and notebooks directly inside it. From the **Last edited** and **Created** column headers, you can sort notebooks and filter them by last editor or creator. To filter by name, use the search box above the list. * The default order is by name. * Subfolders appear first regardless of the sort order. They're hidden while a filter is applied. * Sorting and filtering apply to the notebooks directly inside the open folder. Notebooks in subfolders aren't included. --- --- url: 'https://docs.codatum.com/features/notebook/sharing/overview.md' description: 'Ways to share a notebook (permissions, report, public link, signed embed)' --- # Sharing This page summarizes the ways to share a notebook's content with other users or externally. You can access these from **Share** on the notebook screen. There's sharing through granting permissions, and sharing through snapshots (report / public link / signed embed). See [Notebook permissions](../../../permissions/resources/notebook) for details on permissions. ## Key features * Granting permissions: basic permissions based on the folder (workspace / teamspace / private), plus [additional notebook permissions](./additional-permissions/overview) * [Report](./report/overview): publish a notebook as a snapshot. For guest invitations, see [Invitations and joining](../../../workspace/administration/invite#guest-invite-from-report) * [Public link](./public-link/overview): a public link and embed that don't require login * [Signed embed](./signed-embed/overview): embedding in an external app using an API key ## Comparing sharing methods {#comparison} | Method {.nowrap} | Scope of operation | Authentication / permissions {.nowrap} | | --- | --- | --- | | Granting permissions | Editing, running SQL, parameters, Explorer | Login required; connection permission also required | | Report | Viewing; running SQL, parameters, and Explorer depend on publish settings | Login required; connection permission not required | | Public link | View only | Login not required | | Signed embed | Viewing; running SQL, parameters, and Explorer depend on settings | Login not required; authenticated with an API key and token | With snapshot sharing (report / public link / signed embed), changes to the notebook itself aren't automatically reflected. You need to select **Publish changes** to reflect them. --- --- url: >- https://docs.codatum.com/features/notebook/sharing/additional-permissions/overview.md description: >- Add permissions for teamspace and private notebooks to specific users or groups --- # Additional notebook permissions (Optional feature) Additional notebook permissions let you grant access to a notebook to specific users or groups, separately from the basic permissions determined by [folder](../../folder). See [Sharing](../overview#comparison) for a comparison of sharing methods. You can configure this for notebooks under the following folders. * [Teamspace](../../../../workspace/administration/teamspace) * Private You can't configure this for notebooks under the **Workspace** folder. A notebook granted additional permissions is shown in the other party's **Shared folder**. See [Notebook](../../../../permissions/resources/notebook#scope-shared) for the conditions for each operation. ::: tip This is an **optional feature**. Depending on your contract, it might not be available. ::: ## Configuring {#configure} Configuring additional permissions requires share permission on the notebook (the "sharing with users or groups" permission in [Notebook](../../../../permissions/resources/notebook)). 1. Open **Share** on the notebook screen. 2. Open **Additional notebook permissions** in the **Notebook** tab. 3. Select **Add group or member**, then choose a user or group and specify a role. You can grant the following roles. The default is **Notebook viewer**. | Role {.nowrap} | Description | | --- | --- | | **Notebook editor** | Can edit the notebook. | | **Notebook viewer** | Can view the notebook. | You can also change or remove a role from the same screen. You can't edit additional permissions when opening a notebook from the **Shared folder** side. ## Specification {#spec} * The workspace role and the notebook role are evaluated with AND. Even if you grant **Notebook editor**, the recipient can't edit if their workspace role is workspace viewer (see [Permission evaluation rules](../../../../permissions/overview#evaluation-rules)). * A notebook that's only accessible through additional permissions can't be deleted or moved, even with edit permission (see [Notebook](../../../../permissions/resources/notebook#scope-shared)). * Whether SQL can be run is determined by permissions on the target [connection](../../../../permissions/resources/connection), not by notebook permissions. * Moving a notebook between workspace / teamspace / private changes the scope of its basic permissions (see [Folder](../../folder)). --- --- url: 'https://docs.codatum.com/features/notebook/sharing/report/overview.md' description: Publishing a notebook as a report and sharing it with members and guests --- # Report (Optional feature) A report publishes the content of a notebook as a snapshot at the time it's published. You can share analysis results even with [members and guests](../../../../workspace/administration/user#member-and-guest) who don't have connection permissions. Viewing a report requires logging in to Codatum. Granting permissions and inviting guests after publishing is done from the report side. See [Invitations and joining](../../../../workspace/administration/invite#guest-invite-from-report) for guest invitations, and [Report permissions](../../../../permissions/resources/report) for details on permissions. See [Sharing](../overview#comparison) for a comparison of sharing methods, and [Comment](../../comment#report-comments) for comments. ::: tip This is an **optional feature**. Depending on your contract, it might not be available. ::: ## List {#list} Open [global nav](../../../../guide/screen-layout) > **Reports** to view reports you have access to. You can filter using the following tabs in the left sidebar. | Tab {.nowrap} | Description | | --- | --- | | **All reports** | A list of the reports you can view. | | **Recently viewed** | Reports you've recently opened. | | **Newly added** | Reports that were recently published. | | **Published by me** | Reports you've published. | | **Starred** | Reports you've starred. | You can also filter by tag. Tags aren't shown to [guests](../../../../workspace/administration/user#member-and-guest). Use **Manage tags** to go to the [tag](../../../../workspace/data-management/tag#tag-definition) management screen. ## Publishing {#publish} Publishing requires publish permission on the source notebook, and publish permission on the connections used by the pages being published. Notebooks accessed through a shared folder can't be published. See [Report permissions](../../../../permissions/resources/report) for details on permissions. 1. Open **Share** on the notebook screen, then select the **Report** tab. 2. Select **Create report**. 3. Configure the following, then select **Publish**. | Item {.nowrap} | Description | | --- | --- | | **Report name** | The name of the report. Defaults to the notebook name. You can also set an icon. | | **Pages to publish** | The pages to publish. At least one page other than a **section divider** is required. Defaults to all pages. | | **Embedded connections** | Automatically extracted from the pages being published. Publish permission on the target connections is required. | | **Report type** | Determines the range of operations available to viewers. Defaults to **Interactive report**. | | Publish options | Available options depend on the report type. | After publishing, you can do the following from the **Published reports** list. * Select the name to open the report. * **Publish changes**: republishes to reflect changes to the notebook. You can check the diff with **Compare notebook** before publishing. * **Report settings**: go to the report screen's settings, permissions, and invitations. * **Compare with current notebook** * **Delete** Changes to the notebook itself aren't automatically reflected. You need **Publish changes** to reflect them. Republishing is also required to change the report type, or to change a publish option that requires republishing. ### Bulk publishing changes {#bulk-publish} With **Bulk publish changes** in **Published reports**, you can publish notebook changes to multiple reports at once. Each report keeps the pages to publish, the report type, and the publish options from its last publish. Use the **Select all** checkbox to select every report that can be published. Clearing the checkbox removes that selection. The label is always **Select all**. When some of those reports are selected, the checkbox is indeterminate. Bulk publishing differs from **Publish changes** in the following ways: * You can't change settings. To change them, use **Publish changes** for each report. * However, parameters that are no longer used are removed from the fixed parameters, as with **Publish changes**. * You can't select a report that can't be published as is, and the reason is shown. For example: * A published page has been deleted from the notebook. * A report that uses [fixed parameters](#publish-options) now uses a parameter that isn't fixed. * The publishing account isn't added to the report's sharing settings. ## Publish settings {#publish-settings} You choose the report type and options when publishing. These publish settings determine the range of operations available to report viewers. If you change the report type, or change a publish-time option that requires republishing, you need to select **Publish changes** again. ### Report types {#report-types} | Type {.nowrap} | Description | | --- | --- | | **Interactive report** | Viewers can edit parameters and re-run SQL. | | **Refreshable report** | Viewers can only re-run SQL. | | **Static report** | Shows a fixed display of the run results at the time of publishing. SQL can't be re-run. | ### Publish options {#publish-options} The following options aren't available for a **static report**. | Option {.nowrap} | Description | Applies to | | --- | --- | --- | | **Enable downloads** | Lets report viewers download the source data. | Interactive report | | **Enable Explorer** | Lets report viewers explore the source data. | Interactive report | | **Use fixed parameters** | Fixes some parameters within the report. When you place a fixed parameter on a grid page, its referenced tile is displayed as read-only. When enabled, **Embed data at publish time** can't be used, and **Enable auto-run** is turned on. | Interactive report / Refreshable report | | **Embed data at publish time** | Publishes with the SQL run results at the time of publishing embedded. | Interactive report / Refreshable report | | **Enable auto-run** | Automatically runs SQL when the page loads. Turned on automatically if data isn't embedded. Can be changed after publishing from [Report settings](#report-settings) without republishing. | Interactive report / Refreshable report | | **Use parameter default values** | Uses parameter default values on auto-run. Dynamic default values, such as relative dates, are also recalculated. If there are fixed parameters, the fixed values take priority. Can be changed after publishing from [Report settings](#report-settings) without republishing. | Interactive report (when auto-run is enabled) | Permissions and invitations are configured on the report side after publishing. ## Report settings {#report-settings} From **Report settings** on the report screen, you can change the following settings without republishing. Changing them requires publish permission on the source notebook. **Auto-run** and **Use parameter default values** are the same items as the publish options. | Setting {.nowrap} | Description | | --- | --- | | **Report name** / **Tags** | The report's display name and [report tags](../../../../workspace/data-management/tag#tag-types). | | **Auto-run** | Automatically runs SQL when the page loads. Always on if data isn't embedded at publish time. | | **Use parameter default values** | Uses parameter default values on auto-run (interactive report). See [Relative dates](../../parameter/relative-date) for how relative dates are handled. | | **Sync parameter changes across pages** | Syncs changes to notebook-wide parameter values across published pages (interactive report). See [Parameter](../../parameter/overview#report-page-sync) for details. | | **Cache duration** | The maximum period SQL run results can be reused. 0 disables caching; the maximum is 24 hours, in 10-minute increments. | | **Hide SQL block** | Hides SQL blocks and built SQL. | | **Show only results within SQL block** | Hides the SQL portion and built SQL within a SQL block. Can't be set if **Hide SQL block** is enabled. | | **Disable comments** | Disables comments. See [Comment](../../comment#report-comments) for details. | **Publish settings** on the same screen shows the report type and publish options. To change them, go to the sharing screen from **Edit** and republish. ## Permissions and invitations {#permissions} Open **Share report** from **Share** on the report screen to configure the following. * **Users with access**: grant or remove Report Viewer for a user or group. * **Invite guest by email**: invite a user who hasn't joined the workspace as a guest. You can check or cancel pending invitations from **Pending guest invitations**. See [Report permissions](../../../../permissions/resources/report) and [Invitations and joining](../../../../workspace/administration/invite#guest-invite-from-report) for details. ## Report analytics {#analytics} Open **Report analytics** in the report screen's header to check viewing activity. You can choose from the following periods (default is **Last 7 days**). | Period {.nowrap} | Description | | --- | --- | | **Last 7 days** | The most recent 7 days. | | **Last 30 days** | The most recent 30 days. | | **All time** | The entire period since publishing. | The following metrics are shown. | Metric {.nowrap} | Description | | --- | --- | | **Total views** | The number of views within the period. | | **Unique users** | The number of users who viewed it within the period. | | **Average view duration** | The average view duration within the period. | In the user list, you can check **Name** / **First access** / **Last access**. ## Specification {#spec} * Re-running SQL, downloads, and the Explorer within a report don't require connection permission. A report viewer can run them if allowed by the publish settings. * The number you can create has a limit that depends on your contract (see [Limits](../../../../reference/limits#plan-limits)). * A [role](../../../../workspace/access-and-security/roles#editor-guest-invite) setting can disable guest invitations by [workspace editors](../../../../workspace/administration/user#workspace-roles). ## When you can't publish {#cannot-publish} Check the following. 1. Whether you have publish permission on the source notebook (notebooks accessed through a shared folder can't be published). 2. Whether you have publish permission on the connections used by the pages being published. 3. Whether you've reached the limit on the number of reports (global nav > **Workspace settings** > **Usage**). 4. Whether any SQL on the pages being published is still running (wait until it finishes, then publish again). --- --- url: 'https://docs.codatum.com/features/notebook/sharing/public-link/overview.md' description: >- Creating, sharing, and managing public links that publish a notebook without requiring login --- # Public link A public link publishes the content of a notebook as a snapshot at the time it's published. Anyone who knows the link can view it without logging in to Codatum. Besides the whole notebook, you can also share URLs for an individual page or an individual chart. Viewers can't do the following. * Change parameters (parameters placed on a grid page are also shown as read-only) * Re-run SQL * Download * Use the Explorer * Comment See [Sharing](../overview#comparison) for a comparison of sharing methods. ## Creating and managing {#create} Publishing requires publish permission on the source notebook, and publish permission on the connections used by the pages being published. Notebooks accessed through a shared folder can't be published. See [Notebook](../../../../permissions/resources/notebook) and [Connection](../../../../permissions/resources/connection) for details on permissions. 1. Open **Share** on the notebook screen, then select the **Public link** tab. 2. Select **Create public link**. 3. Configure the following, then select **Publish**. | Item {.nowrap} | Description | | --- | --- | | **Link name** | The name of the link. Defaults to the notebook name. You can also set an icon. | | **Published pages** | The pages to publish. At least one page other than a **section divider** is required. | | **Embedded connections** | Automatically extracted from the pages being published. Publish permission on the target connections is required. | | **Enable expiration** | When enabled, published content is deleted after the specified number of days. Disabled by default. When enabled, the default number of days is 30, and you can specify a range from 1 to 90. | After publishing, you can do the following from the **Published public links** list. * Select the name to view it (not a link if it has expired). * **Publish changes**: republishes to reflect changes to the notebook. You can check the diff with **Compare notebook** before publishing. * **Share**: copy the URL after configuring the display options. * **Compare with current notebook** * **Delete** Changes to the notebook itself aren't automatically reflected. You need **Publish changes** to reflect them. ### Bulk publishing changes {#bulk-publish} With **Bulk publish changes** in **Published links**, you can publish notebook changes to multiple public links at once. Each link keeps its link name, published pages, and expiration from its last publish. Use the **Select all** checkbox to select every public link that can be published. Clearing the checkbox removes that selection. The label is always **Select all**. When some of those links are selected, the checkbox is indeterminate. Bulk publishing differs from **Publish changes** in the following ways: * You can't change settings. To change them, use **Publish changes** for each link. * You can't select a link that can't be published as is, and the reason is shown. For example: * A published page has been deleted from the notebook. * Expired links aren't selected at first. If you select one and publish it, the link becomes accessible again. ## URL sharing options {#share-options} From **Share**, you can generate a URL at the following units. * **Entire report** * **Individual page** * **Individual chart** For **Entire report**, you can configure the following options. | Item {.nowrap} | Choices / content | | --- | --- | | **Header** | Show Codatum logo and title / Show Codatum logo only. Defaults to showing the Codatum logo and title. | | **SQL block** | Show / Show results only / Hide. Defaults to showing it. | | **Hide sidebar** | When enabled, hides the [left sidebar](../../../../guide/screen-layout). Disabled by default. | | **Theme** | Light theme / Dark theme / Sync with system | You can also get the embed code from the same screen. ## Specification {#spec} * Public link pages have `noindex` set, which suppresses indexing by search engines. * Data at the time of publishing is saved and shown as a snapshot. * If expiration is enabled, published content is deleted once the specified number of days has passed since publishing. * A [workspace policy](../../../../workspace/access-and-security/policy#policy-settings) can disable creating and updating public links. * The number you can create has a limit that depends on your contract (see [Limits](../../../../reference/limits#plan-limits)). * A [workspace owner](../../../../workspace/administration/user#workspace-roles) can check the list of active public links from the global nav > **Workspace settings** > **Public links**. You can filter by keyword and open the source notebook or the public link. ## When you can't publish {#cannot-publish} Check the following. 1. Whether you have publish permission on the source notebook (notebooks accessed through a shared folder can't be published). 2. Whether you have publish permission on the connections used by the pages being published. 3. Whether creating and updating is disabled by a [workspace policy](../../../../workspace/access-and-security/policy#policy-settings). 4. Whether you've reached the limit on the number of public links (global nav > **Workspace settings** > **Usage**). 5. Whether any SQL on the pages being published is still running (wait until it finishes, then publish again). --- --- url: 'https://docs.codatum.com/features/notebook/sharing/signed-embed/overview.md' description: >- Signed embed for embedding a notebook into an external app with an API key and token --- # Signed embed (Optional feature) A signed embed is a feature for embedding the content of a notebook, at the time it was published, into an external site or app. It's used together with the embedding destination's own authentication system, and doesn't require logging in to Codatum. Authentication uses an [API key](../../../../workspace/access-and-security/api-key) and a token issued server-side. Viewers can change parameters and re-run SQL. Downloads and the Explorer are controlled by publish options. Comments aren't available. See [Sharing](../overview#comparison) for a comparison of sharing methods. For integration steps, see [Integration steps](./integration). For data isolation per tenant, see [Multi-tenant](./multi-tenant). For embedding on the frontend, you can use the [Codatum Embed SDK](https://github.com/codatum/codatum-embed-js) (`@codatum/embed` / `@codatum/embed-react` / `@codatum/embed-vue`). ::: tip This is an **optional feature**. Depending on your contract, it might not be available. ::: ## Key features * [Publishing](#publish) / [Settings](#settings) * [Integration steps](./integration) * [Token issuance API](./issue-token) * [Multi-tenant](./multi-tenant) * [Use cases](./use-case) * [FAQ](./faq) ## Publishing {#publish} Publishing requires publish permission on the source notebook, and publish permission on the connections used by the pages being published. Notebooks accessed through a shared folder can't be published. 1. Open **Share** on the notebook screen, then select the **Signed embed** tab. 2. Select **Create signed embed**. 3. Configure the following, then select **Publish**. | Item {.nowrap} | Description | | --- | --- | | **Signed embed name** | The name of the embed. Defaults to the notebook name. You can also set an icon. | | **Published pages** | The pages to publish. At least one page other than a **section divider** is required. Defaults to all pages. | | **Embedded connections** | Automatically extracted from the pages being published. Publish permission on the target connections is required. | | **Enable downloads** | Lets embed viewers download the source data. Disabled by default. | | **Enable Explorer** | Lets embed viewers explore the source data. Disabled by default. | After publishing, you can do the following from the list. * Open the settings/preview screen from the name or **Settings**. * **Publish changes**: reflects changes to the notebook or to publish options. * **Compare with current notebook** * **Delete** Changes to the notebook itself aren't automatically reflected. You need **Publish changes** to reflect them. Changing downloads or the Explorer also requires republishing. ### Bulk publishing changes {#bulk-publish} With **Bulk publish changes** in **Published signed embeds**, you can publish notebook changes to multiple signed embeds at once. Each signed embed keeps its published pages and its download and Explorer settings from its last publish. Use the **Select all** checkbox to select every signed embed that can be published. Clearing the checkbox removes that selection. The label is always **Select all**. When some of those signed embeds are selected, the checkbox is indeterminate. Bulk publishing differs from **Publish changes** in the following ways: * You can't change settings. To change them, use **Publish changes** for each signed embed. * You can't select a signed embed that can't be published as is, and the reason is shown. For example: * A published page has been deleted from the notebook. * A newly used parameter isn't set as a [server-side parameter](#server-side-params). ## Settings {#settings} On the settings screen, you can change the following. | Item {.nowrap} | Description | | --- | --- | | **Signed embed name** | The display name of the embed. | | **API keys granted permission** | The API keys that can be used to issue tokens. At least one is required. | | **Server-side parameters** | Parameters whose value is specified server-side when issuing a token. Parameters not specified here become client-side parameters. | | **Allowed origins** | The origins allowed to embed. Specify values starting with `http://` or `https://`. If unset, embedding is allowed from any origin. | | **Publish options** | The download and Explorer settings. Changing these requires republishing. | ### Server-side parameters {#server-side-params} For each parameter, you can choose one of the following. | Type {.nowrap} | Description | | --- | --- | | **Fixed value** | A value fixed server-side. Users can't change the value, and the input field is also hidden. When a [parameter placed on a grid page](../../grid-page/overview#parameter-component) is referenced by SQL or charts on this page, its tile is displayed as read-only. | | **Initial value** | Sets an initial value, but users can change the value from the frontend's input field. | Changing a fixed value requires reissuing the token. See [Multi-tenant](./multi-tenant) for details. ## Specification {#spec} * The default token expiration is 3600 seconds (1 hour); the maximum is 86400 seconds (see [Limits](../../../../reference/limits#fixed-limits)). * If `cache_max_age` is omitted, the default is 86400 seconds. The maximum is also 86400 seconds. * The number you can create has a limit that depends on your contract (see [Limits](../../../../reference/limits#plan-limits)). * The **Signed embed** tab is shown when the signed embed feature is enabled for the workspace. ## When you can't publish {#cannot-publish} Check the following. 1. Whether you have publish permission on the source notebook (notebooks accessed through a shared folder can't be published). 2. Whether you have publish permission on the connections used by the pages being published. 3. Whether you've reached the limit on the number of signed embeds (global nav > **Workspace settings** > **Usage**). 4. Whether any SQL on the pages being published is still running (wait until it finishes, then publish again). --- --- url: 'https://docs.codatum.com/features/notebook/sharing/signed-embed/integration.md' description: >- Publishing a signed embed, the token issuance API, and integrating with the Embed SDK --- # Integration steps The steps for integrating a signed embed into an external app. For a feature overview, see [Signed embed](./overview). ## Prepare {#prepare} 1. Open global nav > **Workspace settings** > **API keys**, then create an [API key](../../../../workspace/access-and-security/api-key). Keep the API key and API secret on hand. 2. Publish from **Share** > **Signed embed** on the notebook screen. 3. On the settings screen, add the API key you'll use to **API keys granted permission**. 4. If you need data isolation per tenant, or need to restrict the embedding domain, configure **Server-side parameters** or **Allowed origins**. You can check a sample token-issuance request and the embed URL from **Setup guide** on the settings screen. ## Issuing a token {#issue-token} Call the following API server-side. Handle the API secret server-side only, and don't include it in the frontend. For the same user (`token_user_id`), the same fixed values, and the same `audit_note`, you can reuse the token within its expiration period. Reissue it when any of them changes. See [Token issuance API](./issue-token) for the OpenAPI spec. The JSON URL is as follows. ```text https://api.codatum.com/api/notebook/spec.json ``` ### Request | Field {.nowrap} | Required {.nowrap} | Description | | --- | --- | --- | | `api_key` | Required | The API key. | | `api_secret` | Required | The API secret. | | `integration_id` | Required | The signed embed's ID. You can check this on the settings screen. | | `page_id` | Required | The ID of the page to display. You can check this on the settings screen. | | `token_user_id` | Required | An ID that uniquely identifies the user within the embedding app. Used for auditing and for access control of run results. Doesn't affect Codatum workspace permissions. | | `params` | Required | An array of server-side parameters. Each element has `param_id` and `param_value` (a JSON-stringified value). You must include every server-side parameter you've configured. Even if you don't use server-side parameters, send an empty array `[]`. | | `expires_in` | Optional | The token's expiration, in seconds. Defaults to 3600; the maximum is 86400. | | `cache_max_age` | Optional | The maximum cache duration, in seconds. Defaults to 86400; the maximum is 86400. 0 disables caching. | | `audit_note` | Optional | An arbitrary string recorded in the [audit log](../../../../workspace/access-and-security/audit-log) for operations performed with this token. Codatum doesn't interpret it, and it doesn't affect behavior. The token carries it, so don't include confidential information. Up to 256 characters ([Limits and constraints](../../../../reference/limits#fixed-limits)). | ### Response | Field {.nowrap} | Description | | --- | --- | | `token` | The issued token. | ## Embedding on the frontend {#embed} Use the [Codatum Embed SDK](https://github.com/codatum/codatum-embed-js) to embed on the frontend. The packages are as follows. * [`@codatum/embed`](https://github.com/codatum/codatum-embed-js/tree/main/packages/embed#readme): the core SDK * [`@codatum/embed-react`](https://github.com/codatum/codatum-embed-js/tree/main/packages/embed-react#readme): a wrapper for React * [`@codatum/embed-vue`](https://github.com/codatum/codatum-embed-js/tree/main/packages/embed-vue#readme): a wrapper for Vue You can check the embed URL (`embedUrl`) from **Setup guide** on the settings screen. See each package's README for installation, options, and events. ```ts import { createEmbed } from '@codatum/embed'; const embed = createEmbed({ container: '#dashboard', embedUrl: 'https://app.codatum.com/protected/workspace//notebook/', tokenProvider: async () => { const res = await fetch('/api/codatum/token', { method: 'POST' }); const data = await res.json(); return { token: data.token }; }, }); await embed.init(); ``` `tokenProvider` is a callback where your own server issues and returns a token. It's called on initialization, on reload, and when the token is refreshed before it expires. See the [FAQ](./faq) for common questions about integration. --- --- url: 'https://docs.codatum.com/features/notebook/sharing/signed-embed/issue-token.md' description: The issueToken API for issuing signed embed tokens --- # Token issuance API An API for issuing tokens for signed embeds. For the integration flow and a description of the request/response, see [Integration steps](./integration#issue-token). You can get the machine-readable OpenAPI spec from the following URL. ```text https://api.codatum.com/api/notebook/spec.json ``` --- --- url: >- https://docs.codatum.com/features/notebook/sharing/signed-embed/multi-tenant.md description: >- Configuring a signed embed to isolate data per tenant using server-side parameters --- # Multi-tenant In a signed embed, using **fixed values** for server-side parameters lets you isolate the data each tenant in the embedding destination can view. You can reuse a single notebook for multiple tenants while ensuring each tenant can only view their own data. See [Signed embed](./overview#server-side-params) for the parameter types, [Integration steps](./integration) for the integration steps, and [Use cases](./use-case) for concrete design examples. ## Roles of each parameter {#param-roles} | Type | Purpose | | --- | --- | | Server-side parameter **fixed value** | A condition, such as a tenant ID, that viewers must not be able to change. It's not shown in the input form. | | Server-side parameter **initial value** | A value such as the store ID shown initially. The initial value is specified server-side, and can be changed from the input form afterward. | | Client-side parameter | A condition, such as a date range or category, specified dynamically from the input form or the embedding app. | ::: warning On the SQL side, always include the fixed-value parameter in your filter conditions. If you only filter on a lower-level identifier, such as a store, you might unintentionally allow access to another tenant's data. ::: ## Configuration examples {#examples} ### Using the input form on the signed embed side {#embed-form} 1. Make the tenant ID a **fixed value**, the initially displayed store ID an **initial value**, and things like the date range client-side parameters. 2. Issue a token server-side, including the fixed value and initial value in `params`. 3. Pass the client-side parameters when initializing the embed. 4. Viewers can change the initial value and the client-side parameters from the input form. For details, see [Use cases: Configuration example A](./use-case#example-a). ### Managing parameters on the embedding app side {#app-managed} 1. Make the tenant ID a **fixed value**, and everything else client-side parameters. 2. Issue a token server-side, including the fixed value in `params`. 3. Enable `hideParamsForm` when initializing the embed, and pass the values managed by the embedding app as client-side parameters. * Parameters placed on a grid page remain visible. Viewers can edit them when they're referenced by SQL or charts on this page and don't have fixed values. 4. To update the conditions, reuse the same token and resend the full set of client-side parameters. You can't send only the diff. 5. If the same viewer uses the same fixed value, the token can be reused within its expiration period. For details, see [Use cases: Configuration example B](./use-case#example-b). ### Updating a fixed value {#update-fixed} If you also make something like the store ID a **fixed value**, changing the target store requires reissuing the token. 1. Reissue the token server-side, specifying the new fixed value. 2. Send the new token and the full set of client-side parameters to the embed. 3. If you want to preserve client-side parameters the viewer changed before the redraw, record the change notifications sent from the embed and include them when resending. For details, see [Use cases: Configuration example C](./use-case#example-c). --- --- url: 'https://docs.codatum.com/features/notebook/sharing/signed-embed/use-case.md' description: Design examples for isolating data per tenant with a signed embed --- # Use cases Design examples for a signed embed, assuming a retail-support SaaS. For a summary of parameter roles, see [Multi-tenant](./multi-tenant); for publishing and settings, see [Signed embed](./overview); for integration steps, see [Integration steps](./integration). For code examples, also see the README of the [Codatum Embed SDK](https://github.com/codatum/codatum-embed-js/tree/main/packages/embed#readme). ## Scenario {#scenario} Assume a SaaS that supports retail store operations, embedding a dashboard of sales and KPIs per store. When a store manager or an area manager logs in, only the information related to their own store is shown. ## Notebook parameters {#params} Assume the source notebook has the following parameters. The parameter names are examples; they aren't required names. * `tenant_id` * The tenant ID the logged-in user belongs to. * [Text input](../../parameter/types#text-input). * `store_id` * The ID of the store to display. * [Text select](../../parameter/types#text-select). The choices are the store IDs within the tenant specified by `tenant_id`. * `date_range` * The aggregation period. * [Date range](../../parameter/types#date-range). The default value is a [relative date](../../parameter/relative-date), 7 days ending yesterday. * `product_category` * The product category to aggregate. * [Text multi select](../../parameter/types#text-multi-select). When nothing is selected, the SQL conditions show all categories. ## Configuration example A: using the signed embed's own form {#example-a} ### Notebook design assumptions * Fix `tenant_id` to restrict the data that can be accessed. * The SQL that extracts data must always include `tenant_id` as a filter condition. * Even when extracting store data, include `tenant_id` as a condition in addition to `store_id`, so that another tenant's store data can't be extracted. * Design `date_range` and `product_category` so any value can be specified. ### Parameter configuration * `tenant_id`: **server-side parameter fixed value** * `store_id`: server-side parameter initial value * `date_range`: client-side parameter * `product_category`: client-side parameter ### Flow up to display 1. Issue a token server-side. * Specify the user's `tenant_id` as the fixed value. * Among the stores tied to `tenant_id`, specify the `store_id` to display initially as the initial value. 2. Render initially on the frontend. * In the return value of the [Embed SDK](https://github.com/codatum/codatum-embed-js/tree/main/packages/embed#readme)'s `tokenProvider`, include the following client-side parameters in `params`. * For `date_range`, configure it to use the default value as the initial value, so the relative date is recalculated (see [Relative dates](../../parameter/relative-date#signed-embed)). * Specify an empty array as the initial value for `product_category`. 3. The user operates the dashboard. * The user can change `store_id`, `date_range`, and `product_category` from the input form. ## Configuration example B: managing parameters on the embedding app side {#example-b} ### Notebook design assumptions Same as configuration example A. ### Parameter configuration * `tenant_id`: **server-side parameter fixed value** * `store_id`: client-side parameter * `date_range`: client-side parameter * `product_category`: client-side parameter ### Flow up to display 1. Issue a token server-side. * Specify the user's `tenant_id` as the fixed value. 2. Render initially on the frontend. * Enable `displayOptions.hideParamsForm` to hide the parameter form. * Parameters placed on a grid page remain visible. Viewers can edit them when they're referenced by SQL or charts on this page and don't have fixed values. * In the return value of `tokenProvider`, include the `store_id`, `date_range`, and `product_category` managed by the embedding app in `params`. 3. The user operates the dashboard. * To update the display based on a condition change on the embedding app side, use the following steps. * Reuse the token used for the initial render, and reload the embed (for example, via `reload`) with the full set of updated client-side parameters included in `params`. * Send the full set (`store_id`, `date_range`, `product_category`), not just the diff. * If the same user uses the same fixed value, the token can be reused within its expiration period. ## Configuration example C: updating a server-side parameter's fixed value {#example-c} ### Notebook design assumptions * Fix both `tenant_id` and `store_id` to restrict the data that can be accessed. * Unlike configuration example A, this assumes `store_id` also needs to be fixed server-side. * Design `date_range` and `product_category` so any value can be specified, as in configuration example A. ### Parameter configuration * `tenant_id`: **server-side parameter fixed value** * `store_id`: **server-side parameter fixed value** * `date_range`: client-side parameter * `product_category`: client-side parameter ### Flow up to display 1. Issue a token server-side. * Specify the user's `tenant_id` and the `store_id` to display initially as fixed values. 2. Render initially on the frontend. * In the return value of `tokenProvider`, include the following client-side parameters in `params`. * For `date_range`, configure it to use the default value as the initial value, so the relative date is recalculated (see [Relative dates](../../parameter/relative-date#signed-embed)). * Specify an empty array as the initial value for `product_category`. 3. The user operates the dashboard. * `store_id` is a fixed value, so it can't be changed from the input form. Provide a store-switching UI on the embedding app side. * To change stores and re-render, reissue the token with the new `store_id`, then send the new token and the full set of client-side parameters. * Changing a fixed value requires reissuing the token. * Send the full set of client-side parameters (`date_range`, `product_category`), not just the diff. * If you want to preserve values the user changed before the redraw, record them using the Embed SDK's `paramChanged` event (`onParamChanged` in React / Vue) and include them when resending. * `date_range` and `product_category` can be changed from the input form. --- --- url: 'https://docs.codatum.com/features/notebook/sharing/signed-embed/faq.md' description: Frequently asked questions about signed embed --- # FAQ Questions about configuring and integrating a signed embed. For step-by-step details, see [Integration steps](./integration); for tenant isolation, see [Multi-tenant](./multi-tenant); for design examples, see [Use cases](./use-case). ## `Missing param: xxx` is shown when issuing a token When issuing a token, the request must include all of the server-side parameters you've configured. The missing parameter ID is shown as `xxx`. ## `The following parameters must be set by the server` is shown when sending a client-side parameter You're trying to change a server-side parameter from the client side. Changing a server-side parameter requires issuing a new token. ## Sending a client-side parameter doesn't change the value Check the following. 1. Whether the target parameter is configured as a server-side parameter. 2. Whether `param_value` is a valid JSON string. 3. Whether `param_id` matches an existing parameter ID. ## Can't embed after configuring allowed origins Check whether the origin of the page embedding it matches one of the origins you set in **Allowed origins**. If you've configured origins, you can't open the embed by attaching the token directly to the URL. ## No API key is granted Add the API key you want to use for issuing tokens to **API keys granted permission** on the settings screen. You can't issue a token if none is configured. ## Relative dates don't behave as expected Relative dates aren't recalculated for server-side parameters. Treat it as a client-side parameter, and configure it to use the default value as the initial value. See [Relative dates](../../parameter/relative-date) for details. --- --- url: 'https://docs.codatum.com/features/notebook/datetime-timezone.md' description: The timezones used to display and aggregate dates and times in SQL results --- # Dates, times, and timezones This page describes which timezone is used to display and aggregate dates and times in SQL results. The display timezone depends on the date and time type and on where the value is displayed. ## Kinds of dates and times {#types} Date and time types in data warehouses fall into three kinds, depending on whether they have a time and a timezone. | Kind {.nowrap} | Description | | --- | --- | | Datetime with a timezone | Represents a specific moment. The displayed time changes with the timezone. | | Datetime without a timezone | Represents a date and time as shown on a clock. The displayed time is the same in any timezone. | | Date | Represents a date without a time. | Type names differ between data warehouses. For example, `TIMESTAMP` is a datetime with a timezone in BigQuery, and a datetime without a timezone in Redshift. | Data warehouse {.nowrap} | Datetime with a timezone | Datetime without a timezone | | --- | --- | --- | | BigQuery | `TIMESTAMP` | `DATETIME` | | Snowflake | `TIMESTAMP_TZ`, `TIMESTAMP_LTZ` | `TIMESTAMP_NTZ` | | Redshift | `TIMESTAMPTZ` | `TIMESTAMP` | | Databricks | `TIMESTAMP` | `TIMESTAMP_NTZ` | | PostgreSQL | `TIMESTAMPTZ` (`timestamp with time zone`) | `TIMESTAMP` (`timestamp without time zone`) | ## Display timezone {#display} Datetimes with a timezone are displayed as follows, depending on where they're displayed. Datetimes without a timezone and dates are never shifted, wherever they're displayed. | Where it's displayed | Display | | --- | --- | | [SQL block](./doc-page/sql-block) results | Shows the database value as is. This is the same on any page. | | Places in charts that treat datetimes as time (such as time axes, table cells, and big number values) | Uses the viewer's timezone. | | Places in charts that treat datetimes as categories (such as pie chart item names, legends, and category axes) | Shows the database value as is. | | Result values inserted as is into text or tables in [markup pages](./markup-page/overview), or formatted with `formatDate()` | Uses the viewer's timezone. | | Values processed with other expressions in [markup pages](./markup-page/overview) | Shows the database value as is. | For PostgreSQL `timestamptz`, the database value is converted to UTC regardless of the database's timezone setting ([Value representation](../connection/warehouses/postgresql#value-representation)). To change how values are displayed, you can do the following. * To display SQL block results in the viewer's timezone in a readable format, use a [table chart](./chart/table-chart). You can also set the format with the [date formatter](./chart/common-settings/value-format#date-formatter) without changing the SQL. * To set the format or timezone where the database value is shown as is, convert the value to a string in SQL (for example, BigQuery's `FORMAT_TIMESTAMP('%Y-%m-%d', ts, 'Asia/Tokyo')`). * To show the same time to every viewer regardless of their timezone, convert the value to a datetime without a timezone in SQL (for example, BigQuery's `DATETIME(ts, 'Asia/Tokyo')`). ## Truncating and extracting in charts {#truncate-extract} When a chart dimension [truncates or extracts](./chart/concept/dimension-metrics) a datetime with a timezone, the calculation uses the dimension's **Timezone**. For example, if **Timezone** is UTC, truncating by day splits days at midnight UTC. Places that treat datetimes as time display them as follows. Places that treat them as categories show the database value as is, even for truncated values. | Target | Display | | --- | --- | | Truncating by `YEAR` / `MONTH` / `WEEK` / `DAY` | Uses the dimension's **Timezone**. Every viewer sees the same date, regardless of their timezone. | | Truncating by `HOUR` / `MINUTE` | Uses the viewer's timezone. | | Extracting | The number extracted in the dimension's **Timezone** is shown as is. | ## Exported files {#export} Exported PNG and PDF files show dates and times in the timezone specified for the export. | Export method | Timezone | | --- | --- | | Screenshot in [workflows](../workflow/steps) | The **Timezone** of the Run Report specified in **Run ID** | | Exports by the [AI agent](../../workspace/external-integrations/agent-connectors) | The timezone specified for the report run (UTC if not specified) | | `notebook render page` / `notebook render chart` in [Codatum CLI](../cli/overview) | The timezone specified with `--tz` (the local timezone of the environment if not specified) | ## Date parameters {#parameter} The **Date input** and **Date range** [parameters](./parameter/types) are passed to SQL as dates without a time or timezone. The date that a [relative date](./parameter/relative-date) refers to depends on the timezone of the place that calculates it (such as the browser). --- --- url: 'https://docs.codatum.com/features/notebook/faq.md' description: Frequently asked questions about notebooks --- # FAQ Frequently asked questions about notebooks. For details, see the page for each feature. ## A notebook feels slow {#performance} If a notebook is slow to load, or edits take a while to appear, the notebook or page might be too large. ### Units of loading and rendering {#processing-units} Notebook processing works in the following units. | Process {.nowrap} | Unit {.nowrap} | Description | | --- | --- | --- | | Loading | Notebook | When you open a notebook, the contents of all pages are loaded | | Collaborative editing sync | Notebook | The entire notebook is synced together | | Rendering | Page | Only the open page is rendered | Switching pages doesn't reload the notebook; it only re-renders the page. If you [reference an SQL block on another page](./doc-page/sql-block#sql-block-ref), changing that other page can also trigger a re-render. ### Checking the current size {#check-size} You can check the notebook size in **Size** after opening **About this notebook** in [the header](../../guide/screen-layout) inside the notebook. When the notebook size exceeds 1MB, a warning appears at the bottom of the screen. When it exceeds 10MB, editing is disabled. Even if the notebook hasn't reached the 10MB size limit, larger notebooks affect performance, so consider splitting around 1MB. ### Narrowing down the cause from symptoms {#diagnose} | Symptom {.nowrap} | Likely cause | What to do | | --- | --- | --- | | Opening the notebook is slow | The whole notebook is large | [When the whole notebook is slow](#slow-notebook) | | Editing or interaction feels slow Switching pages is slow | That page has a lot of content | [When only a specific page is slow](#slow-page) | Opening a notebook includes both loading the whole notebook and rendering the page. If it's still slow after you switch to a lighter page, the whole notebook is likely the cause. If it's slow only on a specific page, that page is likely the cause. ### When the whole notebook is slow {#slow-notebook} Because the whole notebook is loaded and synced, adding pages and blocks makes opening and collaborative editing slower. References between SQL blocks and parameters are also calculated across the whole notebook. Instead of keeping adding pages to one notebook, split notebooks by analysis theme or use case. (Consider splitting around about 10 pages per notebook.) To split an existing notebook, follow these steps. 1. Export the notebook you want to split. 2. For each destination notebook, select the pages to include and import them as a new notebook. 3. If you keep the original notebook, delete the pages you've already moved. See [Export and import](./export#import-as-new) for the steps. When you split notebooks, you might end up writing the same SQL in multiple notebooks. Save shared SQL as a [saved query](../saved-query/overview) and reference it from each notebook. ::: tip A notebook keeps internal data for collaborative editing. Codatum cleans up unused data automatically, but it doesn't remove all of it. As a result, repeated editing can make the notebook larger than its visible content. If you [export](./export) the notebook and import it as a new notebook, that internal data isn't carried over, so the size can become smaller without changing the content. ::: ### When only a specific page is slow {#slow-page} Opening a page renders all blocks and charts on that page. The more blocks and charts you place on one page, the longer display and editing can take. In this case, [add a page](./overview#add-page) and split the content. Pages that aren't open aren't rendered, so you can reduce the amount of rendering per page. Within the same notebook, you can [reference an SQL block on another page](./doc-page/sql-block#sql-block-ref), so you can keep SQL references when you split pages. ## A notebook can't be edited because it exceeds the size limit {#size-limit} You can't edit a notebook when its size exceeds 10MB. See [Limits](../../reference/limits#fixed-limits). You can still [export](./export) a notebook you can't edit. Import only the pages you need into a new notebook to continue editing. See [Export and import](./export#import-as-new) for the steps. ## Column names aren't suggested in a SQL block {#column-suggest} Column name suggestions are available only when you use a [table](./doc-page/sql-block#references) reference or a [reference to another SQL block](./doc-page/sql-block#sql-block-ref). Suggestions aren't available when you write a table ID as a string, or when you reference a [saved query](../saved-query/overview). See [SQL block](./doc-page/sql-block#constraints) for details. --- --- url: 'https://docs.codatum.com/features/workflow/overview.md' description: Scheduled runs and automation through steps --- # Workflow (Beta) (Optional feature) Workflow runs the steps of a saved query or report in order, on a schedule, and connects them to follow-up actions like email, Slack, or an LLM. Open it from [global nav](../../guide/screen-layout) > **Workflows**. Viewing and editing are available to the users and groups set as **owners** of the workflow. Creating a workflow requires [workspace editor](../../workspace/administration/user#workspace-roles) permission or higher. See [Workflow permissions](../../permissions/resources/workflow) for details. ::: info This feature is in **beta**. The specification might change without notice. ::: ::: tip This is an **optional feature**. Depending on your contract, it might not be available. ::: ## Key features * [Creating and managing](#create-manage): Create, edit, activate/deactivate, run manually, duplicate, and delete. * [Schedule](#schedule): Hourly / daily / weekly / monthly, or a cron expression, with a time zone. * [Steps](./steps): Run Query / Run Report / Screenshot / Email / LLM / HTTP Request / Slack. * [Execute-if conditions](./template-variables#execute-if) and [template variables](./template-variables): Pass results from earlier steps to later ones, and run steps conditionally. * [Run history](#run-history): Review past runs and the outcome of each step. * [Owners](../../permissions/resources/workflow): The users and groups who can view and edit the workflow. * [Use cases](./use-case): Example setups such as Slack notifications. ## Screen layout | Screen {.nowrap} | Contents | | --- | --- | | List | Shows name, status, trigger, steps, last run, updated date, and owners. Includes **New workflow** and search | | Create/edit | Set **General**, **Trigger** (**Schedule**), and steps | | Detail | Has **Workflow settings** and **Run history** tabs. You can **Run now** / **Edit** / **Activate** or **Deactivate** / **Delete** | The row menu in the list also has **Edit** / **Duplicate** / **Deactivate** or **Activate** / **Delete**. ## Creating and managing {#create-manage} ### Creating You can create a workflow in any of the following ways. Creating requires [workspace editor](../../workspace/administration/user#workspace-roles) permission or higher. 1. Open global nav > **Workflows** and select **New workflow**. If the [AI agent](../ai-agent/overview#enable) is available, then select one of the following: * **Create with chat**: The AI agent side panel opens in a new session with a draft in the input box. Edit the schedule and steps in the draft, then send it. * **Create manually**: The editor opens. 2. From the [right sidebar](../../guide/screen-layout) > **Workflows** on a [query](../saved-query/overview) detail, select **New workflow**. In this case, the workflow opens with step 1 already set to Run Query for that query. 3. Ask the [AI agent](../ai-agent/overview#workflow) to create one. You can also ask the AI agent to update, activate, and run the workflow. A newly created workflow starts as **Inactive**. To start running on a schedule, **Activate** it after saving. The creator is automatically set as an owner. ### Editing and saving Open the editor from **Edit** on the detail screen or in the list. Select **Save** to update the definition. ### Activating and deactivating | Action {.nowrap} | Description | | --- | --- | | **Activate** | Sets the status to **Active** and runs it on the configured schedule. If there are unsaved changes, save first. You can't activate a workflow if you've reached the limit on active workflows | | **Deactivate** | Sets the status to **Inactive**; scheduled runs stop | You can run a workflow manually with **Run now** even when it's **Inactive**. If the editor has unsaved changes, save first. ### Duplicating and deleting | Action {.nowrap} | Description | | --- | --- | | **Duplicate** | Creates a new, **Inactive** workflow with `(copy)` added to the name. Requires create permission | | **Delete** | Deletes the workflow after confirmation. It stops running, and its run history also becomes inaccessible | ## Schedule {#schedule} Configure this under **Trigger** > **Schedule** in the editor. | Item {.nowrap} | Description | | --- | --- | | **Frequency** | Choose from **Hourly** / **Daily** / **Weekly** / **Monthly** / **Custom (cron)** | | **Start minute** | For **Hourly**. Choose from `00`-`55` in 5-minute steps | | **Start time** | For **Daily** / **Weekly** / **Monthly**. Set the hour (`00`-`23`) and minute (`00`-`55` in 5-minute steps) | | **Day of the week** | For **Weekly**. Select one or more days | | **Date** | For **Monthly**. Choose one day from `1`-`28` | | **Cron expression** | For **Custom (cron)**. Specify five fields (minute hour day-of-month month day-of-week). For example, `*/30 * * * *` runs every 30 minutes. Minutes must be multiples of 5, and runs must be at least 10 minutes apart. You can specify `*/10` or `0,30`, but not `*/5`. You can't restrict both day-of-month and day-of-week. Set one of them to `*` | | Time zone | Set together with **Start minute** / **Start time** / **Cron expression** | **Next 5 scheduled runs**, below the settings, shows the next five run times for the schedule. Times are shown in your browser's time zone. If the workflow's time zone differs, the time in the workflow's time zone appears in parentheses. * A run is skipped if the previous run is still in progress at its scheduled time. Skipped runs don't appear in [Run history](#run-history). * On daylight saving time transition days, a time that doesn't exist isn't run, and a time that occurs twice might run twice. The actual runs can differ from **Next 5 scheduled runs**. Schedule constraints are also listed in [Limits](../../reference/limits#fixed-limits). ## Status ### Workflow | Label {.nowrap} | Meaning | | --- | --- | | **Active** | Scheduled to run | | **Inactive** | Not scheduled to run | ### Run (job) | Label {.nowrap} | Meaning | | --- | --- | | **RUNNING** | In progress. Select **Stop** to cancel | | **SUCCESS** | Completed | | **FAILED** | Failed | | **CANCELLED** | Cancelled, for example by stopping it | ### Step result | Label {.nowrap} | Meaning | | --- | --- | | **PENDING** | Not started yet | | **RUNNING** | In progress | | **SUCCESS** | Completed | | **ERROR** | Failed | | **SKIPPED** | Skipped due to an [execute-if condition](./template-variables#execute-if) | | **CANCELLED** | Cancelled | The trigger shown for a run is the user for manual runs, and **Schedule** for scheduled runs. ## Run history {#run-history} The **Run history** tab on the detail screen shows past runs. ## Constraints * A workflow can have up to 20 steps ([Limits](../../reference/limits#fixed-limits)). * A workflow can have up to 30 owners ([Limits](../../reference/limits#fixed-limits)). * The maximum number of active workflows depends on your contract ([Limits](../../reference/limits#plan-limits); check under global nav > **Workspace settings** > **Usage**). * Workflow names must be 1-100 characters, and descriptions up to 1,000 characters. ## Permissions See [Workflow permissions](../../permissions/resources/workflow) for the conditions for each action. The list shows workflows you own. [Workspace owners](../../workspace/administration/user#workspace-roles) and users whose custom role has **Manage** selected for **Workflows** in [Roles](../../workspace/access-and-security/roles#permissions-workflow) can see every workflow in the workspace in the list. --- --- url: 'https://docs.codatum.com/features/workflow/steps.md' description: Actions and settings you can add to a workflow --- # Steps A step is a unit of processing that a workflow runs in order from top to bottom. Add one from **Add step** in the editor, and drag to reorder. See [Limits](../../reference/limits#fixed-limits) for the maximum number of steps. Steps are grouped as follows when you add them. | Group {.nowrap} | Contents | | --- | --- | | **Codatum actions** | Run Query / Run Report / Screenshot / Email / LLM / HTTP Request | | **Slack** | Connected Slack workspaces (shown by Slack workspace name) | Each step can have an [execute-if condition](./template-variables#execute-if). For embedding values in the body, messages, and so on, see [Template variables](./template-variables). ## Run Query Runs the specified [saved query](../saved-query/overview) and makes the result available to later steps. | Item {.nowrap} | Description | | --- | --- | | **Query** | The saved query to run. You select it together with its connection | Later steps can reference up to 20 rows of the result through template variables (see [Limits](../../reference/limits#fixed-limits)). For example variables, see [Template variables](./template-variables#variables). If you create a workflow from the right sidebar on a query detail, this step opens already configured. ## Run Report (Beta) Runs a [report](../notebook/sharing/report/overview). Placing it right before a Screenshot step lets you capture the latest results. ::: info This feature is in **beta**. The specification might change without notice. ::: | Item {.nowrap} | Description | | --- | --- | | **Report** | The report to run | | **Use default parameters** | Off by default. When on, resets parameters to the report's default values before running | | **Update report after run** | Off by default. When on, saves the run's results back to the report | | **Timezone** | Used to calculate relative dates in default parameters and to display dates and times when a Screenshot step captures this step's result. Defaults to the browser's timezone. UTC is used if not set | ## Screenshot (Beta) Captures a specific report page as a PNG or PDF. The resulting file URL can be used in a later Email or Slack attachment. ::: info This feature is in **beta**. The specification might change without notice. ::: | Item {.nowrap} | Description | | --- | --- | | **Report** | The target report | | **Page** | The page to capture | | **Run ID** | The ID of the report run. If a Run Report step immediately precedes this one, a template variable referencing that step's `runId` might be filled in automatically | | **Format** | **Type** is PNG / PDF. **Theme** is **Light** / **Dark** (default is light). **Locale** is `en-US` / `ja-JP` (defaults based on browser language). When **Type** is PDF, you can also choose **Paper size** (A4 / A3) and **Orientation** (**Landscape** / **Portrait**). The default is A4 landscape. Timestamps are displayed in the **Timezone** of the Run Report specified in **Run ID** | ## Email Sends email to users or groups in the workspace. | Item {.nowrap} | Description | | --- | --- | | **To** | Choose 1-20 users or groups ([Limits](../../reference/limits#fixed-limits)) | | **Subject** | Up to 200 characters. Supports [template variables](./template-variables) | | **Body** | Sent as HTML. Supports [template variables](./template-variables) (up to 5,000 characters) | | **Attachment** | Optional. You can specify a file URL from an earlier step, such as Screenshot, using a template variable | The sender is `noreply@workflow.codatum.com`. The email footer includes a link back to the workflow. ## LLM Runs natural language processing using an [AI profile](../../workspace/codatum-ai/ai-profile). Not selectable if Codatum AI is disabled for the workspace. When the workflow runs, the context (notebooks or folders) linked to the AI profile isn't loaded. | Item {.nowrap} | Description | | --- | --- | | **AI Profile** | The AI profile to use. Create and review profiles under **AI Profile settings** | | **Prompt** | The content sent to the LLM. Supports [template variables](./template-variables) (up to 5,000 characters) | ## HTTP Request (Beta) {#http-request} Sends an HTTP request to the specified URL. You can send query results or LLM output to an external service that accepts webhooks. ::: info This feature is in **beta**. The specification might change without notice. ::: | Item {.nowrap} | Description | | --- | --- | | **Method** | Choose `GET` or `POST`. The default when you add the step is `POST`. | | **URL** | The destination. Specify an `http` or `https` URL. You can use [template variables](./template-variables). | | **Headers** | Select **Add header** to specify a key and value, up to 50 headers (see [Limits](../../reference/limits#fixed-limits)). Keys can be up to 128 characters, and values up to 2048 characters. Values can use [template variables](./template-variables). When you add the step, `Content-Type: application/json` is already set. | | **Body** | Choose **None** or **JSON**. The default when you add the step is **JSON**. **JSON** content can use [template variables](./template-variables) (up to 5000 characters). When **Method** is `GET`, the body is fixed to **None**. | Header values are saved as part of the workflow definition. Users who can view the workflow can see the values in the editor. ### Sending and results {#http-request-behavior} | Item {.nowrap} | Description | | --- | --- | | Template expansion | The URL, header values, and body are sent after template variables are expanded at run time. If the expanded body isn't valid JSON, the step fails. | | Headers added automatically | Every request includes `X-Codatum-Workspace-Id` (the workspace ID) and `X-Codatum-Workflow-Id` (the workflow ID). If the body is **JSON** and there's no `Content-Type` header, `Content-Type: application/json` is added. | | Headers that aren't sent | Headers that carry the client IP address, such as `X-Forwarded-For`, aren't sent even if you specify them. | | URLs you can't send to | Requests can't be sent to internal network destinations, such as `localhost` or private IP addresses. This also applies to the address that the host name resolves to and to redirect destinations. If you specify a destination that isn't allowed, the step fails. | | Redirects | The request is sent again to the redirect destination, up to 3 times (see [Limits](../../reference/limits#fixed-limits)). For `GET`, headers aren't sent when a redirect leads to a different origin. Headers are still sent when the redirect only changes `http` to `https` on the same host and neither URL specifies a port. For `POST`, the request is sent again with its body and headers only when the status is `307` or `308` and the redirect stays within the same origin or is the `http` to `https` change described above. For other redirects, the step fails. Specify the final destination as the URL. | | Timeout | 30 seconds (see [Limits](../../reference/limits#fixed-limits)). | | Success | The step succeeds when the response status code is below 400. | | 4xx responses | The step fails without retrying. | | 5xx responses, timeouts, and connection errors | The step retries automatically after a delay. If the retries don't succeed, the step fails. Each retry sends the request again, so the destination might receive the same request more than once. | | Output | Later steps can reference the response status code (`statusCode`). It isn't shown in **Insert variable**. The response body can't be referenced. | To embed query results or LLM output in the body, convert them to JSON values with the `json` filter. Values that contain line breaks or `"` break the JSON if you embed them as is. The `json` filter output already includes `"`, so don't wrap it in `"`. This example references a Run Query step with the step ID `query` and an LLM step with the step ID `llm`. ```liquid { "text": {{ llm.text | json }}, "rows": {{ query.rows | json }} } ``` ## Slack {#slack} Sends a message to a specified channel. Before you use it, [connect a Slack workspace](../../workspace/external-integrations/slack#connect). For requirements such as posting to private channels, see [Posting to channels](../../workspace/external-integrations/slack#channels). To save the step, you must be a user or an admin of the connection. For details, see [Slack integration permissions](../../workspace/external-integrations/slack#permissions). ### Settings The display name is the connected Slack workspace's name. | Item {.nowrap} | Description | | --- | --- | | **Channel** | The destination. Select **Refresh channels** to fetch the list again | | **Message Text** | Supports [template variables](./template-variables) (up to 5,000 characters). For formatting syntax, see [Slack's message formatting guide](https://docs.slack.dev/messaging/formatting-message-text/) | | **File** | Optional. You can specify a file URL from an earlier step | | **Thread (optional)** | Specify the message timestamp from an earlier Slack step to reply in that thread | | **Include Link to Codatum** | On by default. Adds a link back to the workflow. Viewing the link requires owner permission | --- --- url: 'https://docs.codatum.com/features/workflow/template-variables.md' description: Inserting variables and writing execute-if conditions --- # Template variables In a workflow's message body, prompt, execute-if condition, and similar fields, you can use template variables to embed results and run information from earlier steps. Select **Insert variable** in the input field to choose from the available variables. The syntax is based on the [Liquid template language](https://shopify.github.io/liquid/). The maximum template string length depends on the field (up to 5,000 characters for body/prompt fields, and up to 100 characters for execute-if conditions). ## Variables {#variables} **Insert variable** lets you choose from the following groups. You can only reference the output of steps before the current one. Templates wrap a path in double curly braces. :::: tip ::: v-pre Example: the workflow run ID is `{{ run.id }}`, and the query's row count is `{{ query.rowCount }}`. ::: :::: ### Workflow run | Label {.nowrap} | Path | Description | | --- | --- | --- | | **Workflow Run ID** | `run.id` | The ID of the run | | **Start Time** | `run.startedAt` | The start time of the run | | **Trigger Type** | `run.trigger` | `schedule` or `manual` | ### Earlier steps Suggested variables depend on the step type. The identifier is the step ID (for example, `query`, or `query_1` if there are multiple). | Step {.nowrap} | Key variables | | --- | --- | | Run Query | **Row count** (`rowCount`), each column of the **First Row**, **Rows** (a loop over rows, up to 20) | | Run Report | **Run ID** (`runId`) | | Screenshot | **File URL** (`fileUrl`), for attachments | | Slack | **Message Timestamp** (`messageTs`), for specifying a thread | | LLM | **Text**, and usage (prompt/completion/total tokens) | Column suggestions for Run Query's **First Row** appear if you've run the target query and saved it beforehand. ### Example An example that includes the row count and the first few rows of a query result in a message. You can insert similar content from **Row count** and **Rows** in **Insert variable**. ```liquid Count: {{ query.rowCount }} {% for row in query.rows limit:5 %} - {{ row.account_name }} {% endfor -%} ``` ## Execute-if condition {#execute-if} Writing an expression in a step's optional **Execute if** field runs that step only when the condition is true. The placeholder example compares whether the row count is greater than 0 (you can enter this by choosing **Row count** in **Insert variable**). The condition is evaluated after template variables are expanded. If left blank, the step runs when there's no failure in earlier steps, and is skipped otherwise (it runs only on implicit success). You can use the following functions in a condition expression. | Function {.nowrap} | Meaning | | --- | --- | | `success()` | True when there's no failure in earlier steps | | `failure()` | True when an earlier step failed. Useful for error-notification steps | | `always()` | Always true. Useful for steps you want to run even after a failure | You can combine these with `AND` / `OR` and comparisons (`>` / `=` and so on). A condition that doesn't include a status function is skipped if an earlier step failed. --- --- url: 'https://docs.codatum.com/features/workflow/use-case.md' description: Practical examples using Workflow --- # Use cases Example workflow setups. For a feature overview, see [Workflow](./overview); for step details, see [Steps](./steps); and for variable syntax, see [Template variables](./template-variables). ## Notifying Slack {#slack-notification} An example that prepares a saved query counting accounts created within the last day, and notifies Slack only when new accounts were registered. The overall setup is as follows. * **Trigger**: Schedule (daily at 10:00) * **Step 1**: Run Query (fetches accounts from the last day) * **Step 2**: Slack (notifies only if there's at least one result) ### 1. Prepare a saved query {#prepare-query} Prepare a [saved query](../saved-query/overview) with SQL that returns accounts created within the last day, based on their creation timestamp. ```sql SELECT * FROM `codatum-example.example.accounts` WHERE created_at >= TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 1 DAY) ORDER BY created_at DESC ``` ### 2. Create the workflow and set the trigger {#create-workflow} [Create a workflow](./overview#create-manage) and set the following under **Trigger** > **Schedule**. * **Frequency**: **Daily** * **Start time**: `10:00` (for example, using Japan Standard Time as the time zone) ::: tip If you create it from the [right sidebar](../../guide/screen-layout) > **Workflows** on the query detail, it opens with step 1 already set to Run Query for that query. ::: ### 3. Configure Run Query for step 1 {#step-run-query} If you created the workflow from the Workflow screen, select the saved query you prepared. If you created it from the query detail, it's already selected. ### 4. Configure Slack for step 2 {#step-slack} [Connect the workspace to Slack](../../workspace/external-integrations/slack#connect) beforehand. The app joins a public channel automatically on first delivery. For a private destination channel, add the app to that channel. | Item {.nowrap} | Example setting | | --- | --- | | **Channel** | The notification destination (for example, `notification_codatum`). If a private channel doesn't appear in the list, check that the app has been invited there | | **Message Text** | See the [message text example](#message-body) below | | **Thread (optional)** | If you have multiple Slack steps, specifying an earlier step's message timestamp replies in that thread | | **Include Link to Codatum** | Adds a link back to the workflow. Viewing the link requires owner permission | | **Execute if** | See the [execute-if example](#execute-if-example) below | #### Message text example {#message-body} You can choose **Row count**, **First Row**, and **Rows** from **Insert variable**. :::: tip ::: v-pre * Choosing `account_name` under **First Row** inserts `{{ query.rows[0].account_name }}`. * Choosing **Rows** inserts a loop over rows. Each iteration references `row` (for example, `{{ row.account_name }}`). ::: :::: An example that includes the count and up to the first 5 rows. ```liquid Accounts created in the last day: {{ query.rowCount }} Recently created accounts (up to 5 shown) {% for row in query.rows limit:5 %} Account name: {{ row.account_name }} Created at: {{ row.created_at }} {% endfor -%} ``` #### Execute-if example {#execute-if-example} To send to Slack only when step 1's query has results, set the following expression as **Execute if**. If the condition isn't met, this step doesn't run. See also [Execute-if condition](./template-variables#execute-if). ```liquid {{ query.rowCount }} > 0 ``` You can enter this by choosing **Row count** in **Insert variable**. `query` holds step 1's Run Query output. If you have multiple Run Query steps, it becomes `query_1` and so on. See [Template variables](./template-variables#variables) for details. ### 5. Save and activate {#activate} **Save**, then **Activate**. Scheduled runs begin. --- --- url: 'https://docs.codatum.com/features/ai-agent/overview.md' description: >- An AI agent that performs data analysis and notebook operations from natural language --- # AI agent (Beta) (Optional feature) The AI agent takes natural language instructions and autonomously performs data analysis and notebook creation and editing. It can reference the catalog and notebook content while running SQL, checking results, and creating charts. The model, permissions, and fixed context it uses are managed through an [AI profile](../../workspace/codatum-ai/ai-profile). For preparing context that's loaded automatically, see [Agent context](./agent-context). If you're using the legacy AI Assistant, see [AI Assistant](../ai-assistant/overview). ::: info This feature is in **beta**. The specification might change without notice. ::: ::: tip This is an **optional feature**. Depending on your contract, it might not be available. ::: ## Key features * [Official documentation](#support-docs): Find instructions and settings in the official documentation * [Sending data to the LLM](#llm-data): How data is handled for training purposes, and what information might be sent to the LLM. * [Enabling it](#enable): Enable the AI agent under **AI feature settings** in workspace settings. * [Display modes](#display-modes): Side panel / full page. * [Drafts](#drafts): Saving and restoring unfinished messages. * [Pinning](#pinning): Save and reorder sessions and Canvases in a personal list. * [Session sharing](#session-sharing): Share conversations and Canvases within your workspace for viewing only. * [Session branching](#session-fork): Branch a conversation from partway through, and continue in a new session. * [Canvas](#canvas): List, view, share, and download pages created by the AI agent. * [Routines](./routines): Run saved instructions on a schedule. * [Working with workflows](#workflow): Review, create, update, and run workflows. * [Approval modes](#operation-modes): **Manual** / **Auto** / **Allow all** (how often the agent asks before running operations). * [Specifying context](#mention-context): Use `@` to specify tables, notebooks, saved queries, and more. * [Attaching files](#attach-files): Attach images, CSV, PDF, Excel, and other files to a message. * [Voice input](#voice-input): Enter what you say as text in the chat input field. * [Agent context](./agent-context): The `.agent` folder or page, and context from an AI profile. * [Message queue](#message-queue): Queue, edit, or send a message ahead of turn while a run is in progress. * [Conversation history summary](#conversation-summary): Summarize a long conversation history. * [Memory](#memory): Remember your preferences and feedback across sessions. * [Settings](#user-settings): User preferences (language and Enter to newline), operations allowed without asking, execution budget, auto-loading context, and memory. * [AI profile](../../workspace/codatum-ai/ai-profile): Manage the model, permissions, and fixed context used. * [Agent usage](../../workspace/codatum-ai/agent-usage): Check session and token usage. * [Codatum Data Connection](../connection/overview#codatum-data-connection): Analyze conversation history, tool executions, and token usage with SQL. * [Agent connectors](../../workspace/external-integrations/agent-connectors): Integrations with external tools (MCP / API). * [Slack integration](#slack): Send requests to the AI agent from Slack. * [Running and delivering reports](../../workspace/external-integrations/agent-connectors#managed-slack): Run published reports and send pages as PNG or PDF. ## Official documentation {#support-docs} When you ask about Codatum features or procedures, the AI Agent searches the official documentation and reads relevant pages to answer. The execution history shows **Search Support Docs** and **Read Support Docs**. Follow the links in the answer to check the referenced pages. ## Sending data to the LLM {#llm-data} Only external LLM services that contractually guarantee your input data won't be used for training are used. If you want to use your own API key, you can configure this under **Custom** in [AI profile](../../workspace/codatum-ai/ai-profile#types). For details, see the [AI Feature Policy](https://codatum.com/ai-policy). As the AI agent analyzes and processes data, it might send table data, SQL execution results, attached files, and similar information to the LLM service. Check your organization's AI usage policy before using this feature. ## Enabling it {#enable} Enabling AI features requires [Workspace Owner](../../workspace/administration/user#workspace-roles) permission. 1. Open [global nav](../../guide/screen-layout) > **Workspace settings** > **AI feature settings**. 2. Turn on AI features overall using the switch at the top of the screen. 3. Turn on **AI Agent** under **Available AI features**. You can also individually enable the following features on the same screen. | Feature {.nowrap} | Description | | --- | --- | | **AI Agent** | Performs data analysis, SQL execution, chart creation, and more from natural language | | **Voice input** | Lets users enter messages to the AI agent [by voice](#voice-input). It's off by default. You can turn it on or off while **AI Agent** is on | | **AI code completion** | Provides inline SQL completion within a SQL block | | **AI name suggestion** | Automatically suggests names for SQL and charts | ## Opening it {#open} You can open it in any of the following ways. 1. Open [global nav](../../guide/screen-layout) > **AI Agent** (full page). 2. Open the **AI Agent** icon at the bottom right of the screen (side panel). 3. Open the side panel with the **AI Assistant** shortcut (⌘+L / Ctrl+L by default; see [Keyboard shortcuts](../../account/settings/keyboard-shortcut)). 4. Select **Mention in the AI agent** from a SQL block in a notebook. If it isn't enabled, **AI Agent is disabled** is shown, and you can go to the enablement screen from **Manage settings**. ## Slack integration {#slack} You can ask Codatum Agent to work from Slack DMs or channel mentions. Connect the workspace and link each user's account before use. The agent runs with the permissions of the linked Codatum account. ### Enabling agent requests from Slack {#enable-slack} You need permission to change workspace integrations. Also [enable the AI agent](#enable) for the workspace. 1. Open [Global navigation](../../guide/screen-layout) > **Workspace settings** > **External integrations** > **Slack integration**. 2. Select **Connect Slack** and authorize the connection in Slack. 3. Turn on **Allow Codatum Agent to start from Slack** for the connected Slack workspace. If an existing connection shows **Update permissions**, select it and reauthorize in Slack first. A connection used for notifications doesn't accept agent requests until you allow the agent to start from Slack. ### Linking your account and sending requests {#use-slack} You can choose from Codatum workspaces that you can view, are connected to the current Slack workspace, and allow agent requests from Slack. If a workspace requires IP access control or multi-factor authentication, meet its [access requirements](#slack-access-control) before approving. 1. Open the Codatum app's home in Slack and select **Connect Account**. 2. Sign in to Codatum and check the account to link. 3. Check the **Codatum workspace** and select **Approve**. If more than one workspace is available, select the one you want to use. 4. Select **Workspace**, **AI Profile**, and **Approval mode** in the Slack app's home. 5. Send the app a DM, or mention it in a channel message. Before using another workspace for the first time, select **Authorize workspace** and approve it in your browser. Authorization started from an existing conversation applies to that conversation's workspace. Changes to **Workspace** and **AI Profile** apply to new chats and threads. They don't affect existing conversations. In **Approval mode**, you can select the [approval mode](#operation-modes) (**Manual**, **Auto**, or **Allow all**) for each workspace. If you don't select one, **Auto** is used. Messages you send from Slack run in the mode selected here, even in conversations whose mode you changed in Codatum. A change applies when you send your next message, including to existing threads and requests in progress. When an operation needs confirmation, the app posts a confirmation message in the thread. **Allow once**, **Always allow**, and **Deny** work the same as the confirmation in Codatum (see [Approval modes](#operation-modes)). If you select **Always allow**, a dialog shows the range that will be added, and the operation runs after you confirm. Only the user who started the conversation can respond to the confirmation message. If you allow or deny the operation in Codatum, the confirmation message in Slack shows the result. To see the details of the operation, select **Open session in Codatum** in the confirmation message. The app's messages and app home are shown in the [language setting](../../account/settings/basic#interface) of the linked account. Before you link your account, or if you haven't set a language in Codatum, they follow your Slack language setting. ### Disconnecting Slack integration {#disable-slack} To unlink your own account, select **Disconnect account** in the Slack app's home. To stop agent requests from Slack for the workspace, turn off **Allow Codatum Agent to start from Slack** in Codatum's **Slack integration** settings. ### Access control when linking Slack {#slack-access-control} When you approve the link in your browser, Codatum checks the selected workspace's [IP access control and multi-factor authentication requirements](../../workspace/access-and-security/security). If IP access control applies to you, approve from an allowed IP address. Settings from other workspaces you belong to don't apply. Codatum doesn't check your IP address or multi-factor authentication for each subsequent request from Slack. Changing these settings doesn't require you to approve an authorized workspace again. Accounts linked before workspace authorization was introduced can also continue without reauthorization. To apply the current settings, disconnect your personal account link and link it again. ## Display modes {#display-modes} | Display {.nowrap} | How to open | Description | | --- | --- | --- | | Side panel | **AI Agent** at the bottom right of the screen | Makes it easy to use the notebook you're viewing as context | | Full page | [Global nav](../../guide/screen-layout) > **AI Agent** | Lets you view chat content in a larger area. From the [left sidebar](../../guide/screen-layout), you can use **New session**, **Canvases**, **Routines**, and **Session history**. You can also get here from **⋯** (horizontal three-dot icon) > **Open in full page mode** in the side panel header | The side panel shows **Recent session** on the new session screen when session history is available. In full-page mode, open past sessions from **Session history** in the left sidebar. Session history shows sessions where you have sent a message from the Codatum interface. Messages sent only through Slack or the API do not add a session to this history. Opening a session through a link does not add it either; sending a message from the Codatum interface does. The order and timestamps reflect your latest message sent from Codatum. ## Drafts {#drafts} Drafts expire 30 minutes after the last edit. Expired drafts are removed when you reload the page or switch back to a session. Input currently displayed in the editor is not cleared automatically after 30 minutes. Unfinished messages are saved automatically as drafts for each session within the same browser tab. Your input is restored when you reload the page or return from another session. Sessions without a draft have an empty input field. Successfully sending a message or deleting all input removes the draft. A failed send keeps it. Drafts aren't synchronized across tabs or devices. Closing the tab ends draft storage. ## Canvas {#canvas} The AI agent can present analysis results and other content as an HTML Canvas. Each Canvas receives its own URL when it's created and remains available after its original session ends. A Canvas can include charts and tables drawn with JavaScript. The AI agent can load SQL results, [agent connector](../../workspace/external-integrations/agent-connectors) tool results, and CSV, TSV, JSON, and Excel files attached in the chat into a Canvas as data, and update the Canvas by replacing only the data. A Canvas can't load images or scripts from external sites. For the limits on the data you can load, see [Limits](../../reference/limits#fixed-limits). You can open a Canvas preview from the chat. In the preview, you can select **Open in a new tab** from the menu to view the displayed version on its dedicated page. The owner can switch versions, and switching versions also updates the page URL to that version. A URL without a version opens the latest version. Viewers and people using a public link always see the latest version, and the version is removed from the URL. The owner can change sharing settings from **Share**. In the AI agent's full page, the preview appears beside the chat. ### Canvases {#canvas-list} Open **Canvases** from the [left sidebar](../../guide/screen-layout) on the full page to review the Canvases you can access as cards. Each card shows a thumbnail, name, description, sharing status, and last updated time. The first 20 appear first. Select **Load more** to load the next page. Use the tabs at the top to change which Canvases appear. | Tab {.nowrap} | Description | | --- | --- | | **All** | Shows every Canvas you can access. | | **Created by me** | Shows Canvases you created. | | **Shared** | Shows Canvases that other people shared with you. | Enter words in the search box to the right of the tabs to show the Canvases in the selected tab whose name, description, or content matches. Results are sorted by relevance. When you enter several words separated by spaces, only Canvases that match all of them appear. The description and content are searched in the latest version. The content includes text drawn by JavaScript, such as labels in tables and charts drawn from data loaded into the Canvas. Matching text from the content or description appears below the card's description. The search words are kept in the URL, so the same results appear when you return after opening a Canvas. For the length limit of search words, see [Limits](../../reference/limits#fixed-limits). On the **Pinned** tab, only the name and description are matched. Canvases that contain all of the space-separated words appear, in the order you pinned them. The sharing status on a card is **Public**, **Owner**, or **Shared**. Selecting a card that you own and whose creating session still exists opens the full-page chat and preview. Other cards open the dedicated URL page. When **All** or **Created by me** has no Canvases, you can start a new session from **Create canvas**. The input field is prefilled with a request to create a Canvas. When **Shared** has no Canvases, **Nothing shared** is shown. When no Canvas matches the search, **No canvases match "(search words)"** is shown. From the Canvas in chat, the preview, and the dedicated URL page, you can select **Download HTML** or **Download PDF** from **Download** to save the content. The PDF uses A4 portrait, and people viewing a public link can download it without signing in. A downloaded HTML file also contains the data imported into the Canvas (see [Sharing settings](#canvas-sharing)). Get the dedicated URL from **Share** > **Copy link**. Opening that URL shows a page with only the Canvas. If the Canvas is shared with **Anyone with the link**, people can view it without signing in. Opening a restricted Canvas shows a sign-in path that returns to the same URL. If you are signed in and can use the workspace, the logo at the top left takes you to the workspace home. In a workspace where the AI agent is available, Workspace Viewers and higher see the AI agent launcher. Workspace Guests do not see it. When you open the AI agent from a Canvas page, it uses the displayed Canvas as context. Owners can ask the agent to read or edit the Canvas. Viewers can ask it to read the Canvas but not edit it. The AI agent can search Canvases by name or content. It searches the Canvases you can access, the same set as **All** in the Canvas list. If you mention a Canvas only by name in chat, the AI agent searches for it. The owner can also change sharing settings from this page and switch versions. If the AI agent session open on this page creates a new version, the page switches to the latest version and drops the version from the URL. It doesn't switch when the agent isn't open or a different session is open. If you need to set up multi-factor authentication, the Canvas page shows the setup path regardless of whether the Canvas is public. If a temporary problem prevents the workspace from loading, you can retry from the same URL. ### Sharing settings {#canvas-sharing} The owner can change these settings under **Share**. | Item {.nowrap} | Description | | --- | --- | | **People with access** | Grants view access to users, groups, or all workspace members. | | **General access** | Choose **Only people with access** or **Anyone with the link**. If you select **Anyone with the link**, people can use the same URL without signing in. You can't select it if [workspace policy](../../workspace/access-and-security/policy#policy-settings) prevents public link creation. | Viewers and people using a public link always see the latest version. When the Canvas is edited, viewers see the new content right away. Only the owner and users granted Canvas access through [session sharing](#session-sharing) can view earlier versions. All data imported into a Canvas is passed to viewers, including columns and rows that the Canvas doesn't display. This also applies to people using a public link and to HTML files that are downloaded or sent. Ask the AI agent to import only data that viewers are allowed to see. The SQL and connection used to get the data aren't included for people using a public link or in HTML files that are downloaded or sent. However, signed-in viewers can see the SQL and connection by asking the AI agent to read the Canvas, because refreshing a Canvas reruns the SQL. ## Working with workflows {#workflow} You can ask the AI agent to review, create, update, and run [workflows](../workflow/overview). For example, you can create a workflow, run it to check the result, and then activate it, all within the conversation. | Operation {.nowrap} | Description | | --- | --- | | Review | Lists the workflows you can view, and shows a workflow's definition, its recent runs, and the step results of each run. | | Create | Creates a workflow with the name, description, schedule, and steps you specify. | | Update | Changes the name, description, schedule, and steps, and activates or deactivates the workflow. | | Run | Runs the workflow once now, waits for the result, and reports it. | ### Workflow operation behavior {#workflow-behavior} | Item {.nowrap} | Description | | --- | --- | | Permissions | Creating, updating, and running require permission to create workflows ([workspace editor](../../workspace/administration/user#workspace-roles) or higher). Reviewing doesn't require that permission. Whether you can operate on an individual workflow follows [Workflow permissions](../../permissions/resources/workflow). | | Status after creation | A newly created workflow starts as **Inactive**. To start scheduled runs, ask the AI agent to activate it, or select **Activate** on the workflow screen. | | Sending during a run | A run actually sends the steps that send data outside Codatum: Slack, Email, and HTTP Request. You can't check the result without sending. You can also run a workflow that is **Inactive**. | | Updating an active workflow | Changes to steps or the schedule take effect from the next scheduled run. | | Approval | Creating, updating, and running ask for approval when the approval mode is **Manual** or **Auto**. The approval shows the target as **Workflow** and a **Steps** summary. For create, it also notes that the workflow stays inactive until it's activated. For a run, it notes that the Slack, email, and HTTP steps that send data outside Codatum will actually be sent. For an update to an active workflow, it notes that the change takes effect from the next scheduled run. | | Scope of **Always allow** | If you select **Always allow** for a run or an update, only that workflow runs without asking. **Allowed without asking** shows `Test-run workflow "(workflow name)"` or `Update workflow "(workflow name)" (including activation)`. | | Slack destination | For Slack steps, you can ask for a destination by channel name, such as `#sales`. The channel name is converted to the channel when the workflow is saved. | | Available conversations | Available in conversations from the Codatum screen, Slack, and the API. Approve operations that need approval in Codatum. Not available while a [routine](./routines) runs or while you're switched to a [service account](../../workspace/access-and-security/service-account#unavailable). | ## Approval modes {#operation-modes} At the bottom left of the chat input field, you can choose how often the AI agent asks you before it runs an operation. The default is **Auto**. | Mode {.nowrap} | Description | | --- | --- | | **Manual** | Asks before side effects, such as running SQL or editing files. | | **Auto** | Asks only before high-impact actions, such as external writes or deletes. | | **Allow all** | Runs every operation without asking, including creating or changing routines. | When you switch modes, the new mode applies to the rest of a request in progress, starting with its next operation. Approval requests shown before you switch stay as they are. The mode doesn't change which operations the AI agent can use. Available operations depend on your [permissions](#permissions) and the AI Profile settings. When the agent edits a notebook, an **AI edit** [version](../notebook/version#kinds) is created automatically before the edit so that you can roll back. Creating and editing [Canvases](#canvas) runs without asking in every mode. To restore a Canvas to an earlier version, ask the AI agent. Workspace Guests can't switch modes. [Routine](./routines) runs use each routine's [approval](./routines#approval) settings instead of this mode. ### Approving operations {#approval} When an operation needs approval, the chat shows the operation with **Deny**, **Allow once**, and **Always allow**. If you select **Deny**, the operation doesn't run. If you select **Allow once**, only that operation runs. If you select **Always allow**, the operation runs and the same kind of operation is added to **Allowed without asking** in [Settings](#user-settings). After that, the agent runs that operation without asking in any mode. To see the range that will be added, hover over **Always allow**. For BigQuery, SQL that needs to scan more than the **Execution budget (BigQuery)** isn't executed, and the chat shows **Not executed**. No charges are incurred. The AI agent either reruns the SQL with a narrower filter, such as a date range, or, if a full scan is needed, asks for approval before running it and shows the required scan size and the reason. In **Allow all**, it runs without asking. Approved SQL also doesn't scan much more than the size shown. For **Run SQL** and **Run Explorer Query** on BigQuery, the **Result** includes the bytes billed (`totalBytesBilled`) and slot time in milliseconds (`totalSlotMs`) for that query. When no scan happens, such as when the cache is used, they are 0. If exceeding the budget is the only reason for asking, **Always allow** isn't shown. It is shown when the operation itself also needs approval, such as in **Manual** mode. Even for an operation added this way, SQL that exceeds the execution budget still asks for approval before it runs. For data sources other than BigQuery, the AI agent asks for approval before running SQL and shows the reason when it expects to scan a large amount of data (except in **Allow all**). ## Specifying context {#mention-context} In the chat input field, type `@` to specify what you want the AI agent to reference. You can also select tables, saved queries, notebooks, and pages in the notebook you currently have open from **Add** (`+`) in the input field. | Target {.nowrap} | Description | | --- | --- | | **Table** | A table in the catalog | | **Saved Query** | A saved query | | **Notebook** | A notebook in the workspace | | **Notebook Page** | A page in the notebook you currently have open (when a notebook is open) | | **SQL Block** | A SQL block in the notebook you currently have open (when candidates exist) | | **Chart** | A chart in the notebook you currently have open (when candidates exist) | ## Attaching files {#attach-files} Select **Attach files** under **Add** (`+`) in the chat input field to attach images and files to a message. You can also drag and drop files onto the input field. When you send the message, the attached files are saved to the session and the AI agent can reference them. The limits are also listed in [Limits](../../reference/limits#fixed-limits). | Type {.nowrap} | Supported formats | Handling | | --- | --- | --- | | Image | JPEG / PNG / WebP / GIF / SVG / BMP / HEIC / HEIF | The image is resized so that its longer side is 1,568 px and converted to JPEG before sending. You can't attach an image that exceeds 2 MB after resizing. You can attach HEIC and HEIF images only in browsers that can display HEIC, such as Safari. If the model of the AI profile doesn't support image input, the AI agent can't read the contents of the image. | | File | CSV / TSV / TXT / Markdown / JSON | Each file can be up to 10 MB. The AI agent can read the contents of files encoded in UTF-8, Shift\_JIS, or UTF-16 with a BOM. | | File | PDF | Each file can be up to 10 MB and 500 pages. The AI agent reads the text on each page, including text added as annotations and values entered in form fields. It can't read figures, images, the contents of scanned pages, or comments such as sticky notes. You can't attach a password-protected PDF or a PDF that has no readable text. | | File | Excel (.xlsx) | Each file can be up to 10 MB. An .xlsx file is compressed, and you can't attach one whose uncompressed size exceeds 50 MB. The AI agent reads the cell values on all sheets. For formula cells, it reads the calculated values. It can't read formatting, charts, or images. You can't attach .xls files. | * You can attach up to 10 files to a message, including chart images specified with `@`. * You can't attach a PDF or Excel file if the text read from it exceeds 10 MB. * If you send a message that includes a PDF or Excel file that can't be attached, an error shows the reason. * Attachments that you haven't sent aren't saved in your [draft](#drafts). They're removed when you reload the page or switch sessions. * If sending fails, the attachments stay in the input field. * Attached files appear in the sent message and are stored in Codatum for the session's retention period. ## Voice input {#voice-input} You can enter what you say as text in the chat input field. This feature is available when it's enabled for your workspace. To enable it, see [Enabling it](#enable). ### Entering text by voice {#use-voice-input} 1. While the input field is empty, select **Voice input** (the microphone icon) in place of the send button. 2. If your browser asks for permission to use the microphone, allow it. 3. Speak. Text that is still being recognized appears faded at the end of the input field, and is added to the input field when it's finalized. 4. Select **Stop voice input**. 5. Review the input field, and then send the message. ### Voice input behavior {#voice-input-behavior} * **Voice input** appears in place of the send button when the input field is empty. * Recognized text is only added to the input field. It isn't sent to the AI agent until you send it. * Faded text that is still being recognized isn't included in the message you send. * You can edit the input field while recording. Recognized text is always added to the end of the input field. * The recognition language is the **Language** setting (**日本語** / **English**) in [account settings](../../account/settings/basic#interface). * Your voice is sent to an external speech recognition service to convert it to text. Codatum doesn't store your voice. Recording stops automatically in the following cases. Text finalized before the stop stays in the input field. Recording doesn't resume automatically after it stops. | Condition {.nowrap} | Description | | --- | --- | | A recording reaches 4 minutes | **Voice input stopped because it exceeded 4 minutes.** appears. This limit is also listed in [Limits](../../reference/limits#fixed-limits). | | No text is recognized for 30 seconds | No message appears. | | You switch to another tab or minimize the window | No message appears. | | The microphone is disconnected | **Voice input stopped because the microphone was disconnected.** appears. | | You switch to another session or close the panel | Text that is still being recognized is discarded. | Recording continues when the input field loses focus or when you use another window. ### If you can't use the microphone {#voice-input-troubleshooting} 1. If **Microphone access is blocked. Allow it in your browser settings.** appears, allow Codatum to use the microphone in your browser's site settings. 2. If **No available microphone was found.** appears, check that a microphone is connected and that no other app is using it. 3. If **Voice input is not supported in this browser.** appears, use a browser listed in [Requirements](../../reference/requirements). ## Chat screen actions {#chat-actions} On the full page, you can perform the following actions from the [left sidebar](../../guide/screen-layout). In the side panel, you can perform them from the header. | Action {.nowrap} | Description | | --- | --- | | **New session** | Starts a new session. | | **Canvases** | Lists the Canvases you can access. Available only from the left sidebar on the full page. See [Canvases](#canvas-list). | | **Session history** | Lists past sessions by when you last sent a message and lets you switch between them. On the full page, the 20 most recent sessions are shown first. Select **Load more** to load the next page. The full-page and side-panel lists use icons to show **Running**, **Waiting for approval**, and **Error**. A completed session you haven't opened yet shows **Unread**. Opening the session clears the unread mark. | | **Session info** | Check the start time, **Total tokens**, and more. If the session has usage of **Custom** [AI profiles](../../workspace/codatum-ai/ai-profile) with cost tracking, **Estimated cost** shows the sum of those estimates in USD. In sessions that ran SQL on BigQuery, the totals of **Bytes billed** and **Slot time** are also shown. It's shown at the top of **⋯** in the header. | | **⋯** (horizontal three-dot icon) | Open it from the header. Below the session info, it lists **Rename session**. In the side panel, it also lists [**Share session**](#share-session), [**Settings**](#user-settings), and **Open in full page mode**. On the full page, **Share session** and **Settings** appear directly in the header, and **⋯** isn't shown for a new session. **Share session** appears when you can change the sharing settings. **Rename session** appears when a session is open and isn't view-only. On the full page, you can also click the session name in the header to rename it. | | **Close** | Closes the side panel (in side panel mode). | In the chat input field, you can change the following settings in addition to the operation mode. * The connection to prefer * Select one under **Connection** in **Add** (`+`), and it appears above the input field. Select the displayed connection to change it, or select `×` to remove it. * Both the selection and its removal carry over to the next session you start. * The agent looks for tables in the selected connection first, and then in the other connections you can access. When it runs SQL on a connection other than the selected one, it names that connection in its response. The agent never changes this selection. * **AI Profile** Charts and tables in a message show the results of what the agent ran during the session. These results are stored in Codatum for the session retention period. ## Pinning {#pinning} You can pin sessions and Canvases you can view to a personal list for each workspace. Pins and their order sync across devices without affecting other users. While you're switched to a [service account](../../workspace/access-and-security/service-account#shared), pins are shared by all users who can switch to that service account. ### Adding and removing pins {#manage-pins} 1. Hover over a session in the session list. 2. Select **Pin** at the right end of the row. 3. To remove a pin, select **Unpin** on the row under **Pinned**. For a view-only session opened from a shared link, you can pin it from the header. For a Canvas, select **Pin** from the **Canvas actions** (…) menu in its header or from the top-right corner of its card in the Canvas list. On touch devices, the list buttons are always visible. ### Reordering pins {#reorder-pins} 1. Open the session list. 2. Under **Pinned**, drag an item to reorder it. ### Pin display and retention {#pin-behavior} | Item {.nowrap} | Description | | --- | --- | | **Pinned** | The full page shows sessions and Canvases together. The side panel shows sessions only. The heading appears above the session list when at least one item can be displayed. Pinned sessions aren't duplicated in the regular history. | | Canvas list | A **Pinned** tab appears when at least one Canvas is pinned. Existing tabs continue to show the same items. | | Order | New pins appear first. Reordering in the Canvas **Pinned** tab changes the order of Canvases while preserving session positions in the mixed list. Reordering in the side panel changes session order while preserving Canvas positions. | | Shared items | You can pin items you have permission to view. Deleted items and items you can no longer access are hidden from the list. | | Versions | Pins refer to a Canvas, not a specific version. Opening a pinned Canvas shows the latest version. | | Retention | Pinned sessions are still deleted 30 days after their last activity. Pinning and reordering don't extend retention. | Opening a Canvas from **Pinned** in the session list follows the same navigation as the [Canvas list](#canvas-list). Your own Canvas opens its original session and preview on the full page if that session still exists. Otherwise, it opens the dedicated Canvas page. A Canvas accessed through session sharing disappears from the list when that sharing ends unless you have another viewing permission. See also [Limits](../../reference/limits#fixed-limits). ## Session sharing {#session-sharing} You can share your session with users, groups, or all members of the same workspace for viewing only. Viewers can follow new messages in real time. ### Configuring session sharing {#share-session} Only the session creator with the Workspace Viewer role or higher can change sharing settings. For [sessions that run with a service account's permissions](../../workspace/access-and-security/service-account#agent-sessions), all users of the service account, including Workspace Owners, can change them. Workspace Guests can't change sharing settings or view shared sessions. 1. In the session header, select **Share session**. In the side panel, select **⋯** > **Share session**. 2. Select recipients from **Add group or user**. 3. To include Canvases, enable **Allow viewing canvases in this session**. Changes are saved immediately. 4. Select **Copy link** and send the link to the recipients. ### Session sharing behavior {#session-sharing-behavior} | Item {.nowrap} | Description | | --- | --- | | Viewer actions | Viewers can read the conversation, tool results, and session info. They can't send messages, approve tools, stop execution, edit the title, or change sharing settings. | | Tool results | SQL results, charts and tables in messages, and connector responses are shared, even when the viewer doesn't have access to the original connection or other source. | | **Allow viewing canvases in this session** | On by default. Viewers can access every version of the included Canvases, including Canvases created or edited later in this session. | | Session history | The creator's history shows **Shared**. The session isn't added to the viewer's regular history. Viewers open it from the shared link and can pin it to open it from **Pinned** later. | | Access requirements | Viewers must sign in to the same workspace. Workspace guests can't view shared sessions, including users whose role changes to guest after sharing. | | Removing access | **Remove** the recipient. The change is saved automatically. It can take up to 5 minutes to stop access in an open session. | | Retention | The session is deleted 30 days after its last activity, ending sharing. Sharing doesn't extend retention. | Canvases accessible through a session aren't added to **Shared** in the Canvas list. Removing session sharing also removes that Canvas access. If a Canvas is shared separately, viewers retain access under its own sharing settings. See also [Limits](../../reference/limits#fixed-limits). ## Session branching {#session-fork} You can take a conversation in a different direction from partway through, or rewrite a message you've sent and send it again. The original session stays unchanged, and you continue in a new session that contains a copy of the conversation up to the branch point. ### Branching actions {#fork-actions} | Action {.nowrap} | Where it appears | Description | | --- | --- | --- | | **Branch into a new session** | Your messages | Opens a new session with a copy of the conversation before that message, and puts the message text in the input box. No message is sent. Attachments aren't added to the input box, so attach them again if needed. | | **Branch into a new session** | The end of a finished response | Opens a new session with a copy of the conversation up to that response. No message is sent. | ### Branching behavior {#fork-behavior} | Item {.nowrap} | Description | | --- | --- | | Original session | Isn't changed. You can branch from a session that is running or waiting for approval, as long as you branch from a point that has finished. Processing in the original session continues, and tools waiting for approval stay that way. | | Copied content | Messages, tool results, attachments, charts and tables in messages, and conversation history summaries up to the branch point are copied. Session settings such as the title, connection, AI profile, and approval mode are also carried over. | | Content not copied | Sharing settings, queued messages, and pins aren't carried over. | | Canvases | Aren't duplicated. If you edit a Canvas in the new session, the original Canvas is updated. Sharing the new session doesn't share the Canvases of the original session. | | Returning to the original session | **Open original session** appears at the top of the conversation in the new session. | | Who can branch | The creator of the session. You can't branch from a session that was shared with you. | | Drafts | What you've typed in the input box of the original session stays there and doesn't move to the new session. | | Retention period | The retention period of the new session starts when it's created. | ## Message queue {#message-queue} If you send a message while **Thinking...** or **Running** is shown, a waiting list appears above the input field, under the heading **Queued messages**. Once the current run finishes, queued messages are processed in order starting from the first one. While there's text in the input field, the send button reads **Add to queue**. Sending a message while a tool is waiting for approval interrupts the current turn and starts processing your new message. Tools waiting for approval are rejected. Your new message takes priority over messages already in the queue. This also applies to messages sent in a Slack thread. | Action {.nowrap} | Description | | --- | --- | | **Send now** | Interrupts the run in progress and sends that message immediately | | **Edit** | Edits a queued message. While editing, use **Save** / **Cancel** | | **Delete** | Removes the message from the queue | ## Conversation history summary {#conversation-summary} Enter `/` in the input field and select **Summarize conversation history** to summarize the conversation history in the current session. You can continue adding new messages to the queue while the summary runs. Select **Stop generating response** to stop the summary. ## Memory {#memory} The AI agent saves preferences and feedback you share in a conversation as memory, and refers to it in later sessions. Memory is stored as topics, and each topic has a **Name**, a **Description**, and **Content**. Memory is stored per user and per workspace. While you're switched to a [service account](../../workspace/access-and-security/service-account#shared), the service account's memory is used. You can turn it on or off with **Enable Memory** in the **Memory** section of [**Settings**](#user-settings) (on by default). When it's off, the AI agent neither refers to nor saves memory, but existing topics aren't deleted. If you change it while the AI agent is responding, the change takes effect from its response to your next message. While memory is on, **Context usage** in the chat input field shows a **Memory** row with the number of topics. ### Managing memory {#manage-memory} 1. Open [**Settings**](#user-settings), and select **Manage memories** in the **Memory** section. 2. Select the topic to edit from the **Topics** list. 3. Edit the **Description** or **Content**. The change is saved when the field loses focus. 4. To delete a topic, select **Delete**, then select **Delete** in the confirmation dialog. Both **Description** and **Content** are required. While either is empty, the change isn't saved, and the saved content is restored the next time the topic is displayed. You can't rename a topic. A deleted topic can't be restored. ## Settings {#user-settings} You can change these from **Settings** in the header. In the side panel, use **⋯** > **Settings**. The settings are grouped into the following sections. | Section {.nowrap} | Item | Description | | --- | --- | --- | | **User Preferences** | **Language** | The language the AI agent responds in. The language you select also carries over to sessions you start later. It isn't shown in view-only sessions. | | **User Preferences** | **Enter to newline** | When on, Enter inserts a line break and a modifier key+Enter sends. When off, Enter sends. | | **Allowed without asking** | (List of operations) | Operations you added by selecting **Always allow** in [Approving operations](#approval). If you **Delete** one, the agent asks again according to the approval mode. This item appears only after you add at least one operation. Allowing an operation here never grants more access than the destination itself allows. | | **Execution budget (BigQuery)** | **Scan size limit** / **No limit** | For BigQuery, SQL that needs to scan more than the limit isn't executed as is. See [Approving operations](#approval) for details. The limit is set in GB, in steps of 0.1 GB with a minimum of 0.1 GB. If left empty, it's 1024 GB. With **No limit**, no approval is asked based on scan size. | | **Auto-load Agent Context** | **Personal** / **Teamspace** / **Notebook page** | All on by default. See [Agent context](./agent-context#auto-load-settings). | | **Memory** | **Enable Memory** / **Manage memories** | See [Memory](#memory). | ## Permissions {#permissions} The AI agent's actions are carried out within the user's permission scope. The notebooks it can explore and the connections it can use are also limited to what the user can access. In the following sessions, the [service account](../../workspace/access-and-security/service-account#permissions)'s permissions are used instead of the user's. * Sessions you operate while switched to a service account * Sessions run by a [routine](./routines#run-as-service-account) whose **Run permission** is a service account * Sessions that run with a service account's permissions, when a user of the service account continues them from their own account ([AI agent sessions](../../workspace/access-and-security/service-account#agent-sessions)) You can configure additional restrictions under **Tool permissions** in the [AI profile](../../workspace/codatum-ai/ai-profile#tool-permissions) (notebooks, connections, connectors, web search / fetch). You must also be listed in the connector's [Admins and users](../../workspace/external-integrations/agent-connectors#sharing). If you want to confirm every SQL execution, set the [approval mode](#operation-modes) to **Manual**. Operations added to **Allowed without asking** in [Settings](#user-settings) still run without asking in **Manual**. ### If you can't view a session {#session-access-denied} You need permission to view a session, including when you follow **Open session in Codatum** in Slack or a shared link. 1. If you can't access the workspace, ask a workspace administrator to check your access. 2. If **You do not have permission to view this session** appears, ask the session's creator to grant you viewing permission. 3. After permission is granted, reload the page. Deleted or expired sessions can't be viewed. --- --- url: 'https://docs.codatum.com/features/ai-agent/routines.md' description: Schedule recurring AI agent tasks and review their results. --- # Routines (Optional feature) A routine runs saved AI agent instructions on a schedule. Use routines for recurring analysis, canvas creation, and Slack posts. [Enable the AI agent](./overview#enable) in your workspace before using routines. ::: tip This is an **optional feature**. Depending on your contract, it might not be available. ::: ## Creating with chat {#create-with-chat} 1. Open [Global nav](../../guide/screen-layout) > **AI Agent**. 2. Select **Routines** in the [left sidebar](../../guide/screen-layout). 3. Select **Create routine** > **Create with chat**. 4. Edit the draft to specify your data and destination, then send it. 5. Review and approve the routine proposed by the AI agent. In an existing session, you can also ask the AI agent to create or edit a routine. You can also ask from Slack or API conversations. If the operation needs approval, approve it in Codatum or in the confirmation message posted in the Slack thread. ## Creating manually {#create-manually} 1. In **Routines**, select **Create routine** > **Create manually**. 2. Set **Name**, **AI profile**, **Schedule**, and **Instruction**. 3. To run with a service account's permissions, select the service account in **Run permission**. 4. Select **Save**. The routine runs with the permissions of the **Run permission** account and the selected AI profile. **Run permission** defaults to your own account. If you're a user of a service account, you can select that service account instead ([Running as a service account](#run-as-service-account)). If you create a routine while switched to a service account, that service account becomes the run permission. External actions such as posting to Slack also require the relevant [agent connectors](../../workspace/external-integrations/agent-connectors). A routine can use only connectors whose [Admins and users](../../workspace/external-integrations/agent-connectors#sharing) include the run permission account and allowed by the AI profile. Check them under **Agent connectors available with the run permission** on the create and settings pages. A routine run doesn't wait for confirmation. Whether operations that need confirmation run is decided by the routine's [approval](#approval) settings. The [approval mode](./overview#operation-modes) from chat isn't used. In routine runs, the AI agent reports and responds in the language the instruction is written in. The [**Language**](./overview#user-settings) setting of the run permission account isn't used. ## Running, pausing, and editing {#manage} Open a routine from the list to manage it. Only its owner can edit settings, run it manually, or resume it ([Sharing and permissions](#sharing)). | Action {.nowrap} | Behavior | | --- | --- | | **Run now** | Runs without waiting for the schedule. Unavailable while a job is running. | | **Edit** | Changes the name, status, AI profile, run permission, schedule, instruction, or [approval](#approval) settings ([Changing the run permission](#change-run-as)). | | **Disable routine** | Pauses scheduled runs. | | **Resume** | Resumes scheduled runs for a paused routine. | | **Delete** | Deletes the routine. | ## Approval {#approval} A routine run doesn't wait for confirmation. The **Approval mode** options and which operations need confirmation are the same as in chat. However, operations that would need confirmation are skipped, and the AI agent continues the run without them. You can review skipped operations in **Run history** ([Reviewing results](#results)). | **Approval mode** {.nowrap} | Description | | --- | --- | | **Manual** | Operations that would ask for confirmation in chat run only if they're in **Allowed without asking**. | | **Auto** | Writes to external services and deletions run only if they're in **Allowed without asking**. Other operations aren't restricted. | | **Allow all** | All operations run. | * New routines default to **Auto**. When you create a routine in an AI agent chat without specifying a mode, it uses the session's approval mode. Routines created before approval settings were added use **Allow all**. * **Allowed without asking** is set for each routine. The [Allowed without asking](./overview#user-settings) list in chat settings isn't used. * In BigQuery, SQL that exceeds the execution budget doesn't run unless the mode is **Allow all**. Adding it to **Allowed without asking** doesn't change this. * Changes to approval settings take effect from the next run. You can set **Allowed without asking** in the following ways. * When you create a routine in an AI agent chat, the AI agent proposes the operations the routine uses every run, based on the operations run in that session. You can review them in the confirmation before the routine is created. * In **Run history**, select **Allow next time** under **Not allowed**. * If an operation the instruction needs is not allowed, the AI agent proposes adding it. Select **Save proposed changes** to add it. The AI agent can propose only operations that were not allowed in that run. * With **Edit**, remove operations you no longer need. ## Running as a service account {#run-as-service-account} When **Run permission** is a [service account](../../workspace/access-and-security/service-account), the routine runs with the service account's permissions instead of its creator's. Your team can operate shared routines without depending on a particular user's permissions. You can select a service account that you're a [user](../../workspace/access-and-security/service-account#users) of. Workspace owners can select any service account. A routine whose run permission is a service account works as follows. * All users of the service account, including workspace owners, are owners and can edit settings, run the routine manually, resume it, and delete it. You can't add or remove owners individually. Manage users in the service account's [Admins and users](../../workspace/access-and-security/service-account#users). * Agent connectors that use personal authentication aren't available. * The routine reads the service account's personal [memory](./overview#memory). * Users of the service account can open the sessions the routine runs and continue them from their own accounts without switching ([AI agent sessions](../../workspace/access-and-security/service-account#agent-sessions)). * Runs fail after the service account is deleted. ### Changing the run permission {#change-run-as} Owners can change **Run permission** with **Edit**. You can change it to a service account that you're a user of, or to your own account. You can't change it to another user's account. 1. Open the routine and select **Edit**. 2. Select a different **Run permission**. Who owns the routine with that run permission appears below the field. 3. Select **Save**. For a routine with run history, a confirmation appears. Review it and select **Save**. If you change the run permission from a service account to your own account, the instruction and routine memory, including what other users wrote, run with your permissions. Other users can no longer edit the settings. Sharing settings for viewing and routine memory don't change when you change the run permission. Sessions created by past runs keep the previous run permission. People who could open them before can still open and continue them. The new owners may not be able to open them. When such a session is continued, routine memory is loaded only if the session's run permission account can still view the routine. A job that's already running finishes with the previous run permission. A **Queued** job that hasn't started yet doesn't run and appears in **Run history** as **Failed**. The new run permission applies from the next run. ## Reviewing results {#results} On the detail page, **Settings** shows the instruction and upcoming runs. **Run history** shows scheduled times, statuses, and summaries. **Memory** shows information saved by the routine. If operations were skipped because of the approval settings, **Not allowed (count)** appears in **Run history**. Select it to see the operations. Owners can select **Allow next time** to add an operation to [Allowed without asking](#approval). SQL skipped for exceeding the execution budget is marked "(over the execution budget)" and can't be added, even if the operation also needed confirmation. When the AI agent proposes changes to the instruction, schedule, or **Allowed without asking**, **Change proposed** appears. Select **Review details** to review the proposal. ## Change history {#change-history} On the detail page, **Change history** lists the creation of the routine and each change to its settings, newest first. Each row shows the date, who made the change, how it was changed, and the changes. Select a row to compare it with the previous save. * A change is recorded when you save a change to the name, instruction, schedule, timezone, AI profile, run permission, or approval settings. Pausing, resuming, and changing sharing settings aren't recorded. * **Changes** shows **Created** for the creation, and the changed items for each change. * **Changed via** is one of **Created in the editor**, **Edited in the editor**, **From a conversation**, **Saved from a run proposal**, **Allowed from a run**, or **---**. * **From a conversation** means the routine was created or changed in an AI agent chat. The session title and link appear only to people who can open that session. * **Saved from a run proposal** means a change proposed by the AI agent was saved with **Save proposed changes**. * **Allowed from a run** means an operation was added with **Allow next time** in **Run history**. * **---** records the content, at the time change history became available, of a routine created before then. * Anyone who can view the routine can review its change history. ## Schedule {#schedule} Select **Frequency** from **Hourly**, **Daily**, **Weekly**, **Monthly**, or **Custom (cron)**. With **Custom (cron)**, you specify a five-field cron expression (minute hour day-of-month month day-of-week). For example, `*/30 * * * *` runs every 30 minutes. * Minutes must be multiples of 5. * Runs must be at least 10 minutes apart. You can specify `*/10` or `0,30`, but not `*/5`. * You can't restrict both day-of-month and day-of-week. Set one of them to `*`. * A run is skipped if the previous run is still in progress at its scheduled time. Skipped runs appear in **Run history** as **Skipped**. Schedule constraints and the instruction length limit are also listed in [Limits](../../reference/limits#fixed-limits). ## Sharing and permissions {#sharing} The owner can use **Share** to grant viewing access to users, groups, or all workspace members. Viewers cannot edit settings. The owner is the **Run permission** account. If the run permission is a service account, all users of that service account are owners ([Running as a service account](#run-as-service-account)). Automatic runs do not check workspace IP access control or multi-factor authentication. For the effect of settings changes, see [Checks by access method](../../workspace/access-and-security/security#access-control-by-entry-point). Workspace owners can view, disable, and delete routines owned by other users. They cannot edit settings, run those routines manually, or resume them. For routines whose run permission is a service account, workspace owners are also owners and can edit settings, run them manually, and resume them. --- --- url: 'https://docs.codatum.com/features/ai-agent/agent-context.md' description: Preparing context that the AI agent loads automatically --- # Agent context You can prepare context that the AI agent loads automatically, using notebooks. For how to use it in chat, see [AI agent](./overview). Agent context doesn't change access permissions. The information it can reference and the operations it can perform are limited to the permission scope of the user and the [AI profile](../../workspace/codatum-ai/ai-profile) in use. ## Agent context folder {#agent-context-folder} Create a folder named `.agent` directly under your personal folder or the root of a teamspace. You can select **New Agent Context folder** from the folder menu in the left sidebar. | Location | Auto-load | | --- | --- | | `.agent` directly under your personal folder | Always loaded when on (**Personal** in **Settings**) | | `.agent` directly under a teamspace | Loaded while you have a notebook from that teamspace open (**Teamspace** in **Settings**) | | `.agent` directly under the workspace | Not auto-loaded. Loaded only if specified as context on an [AI profile](../../workspace/codatum-ai/ai-profile) | | `.agent` anywhere else | Not auto-loaded | For a `.agent` folder directly under a personal folder or a teamspace, every notebook within it—including those in subfolders—is loaded. This includes SQL blocks as well as text. ## Agent context page {#agent-context-page} If you add a page named `.agent` within a notebook, its content is loaded while that notebook is open (**Notebook page** in **Settings**). You can use it to pass things like how to calculate a metric, including through SQL blocks. Use a `.agent` page for assumptions specific to a notebook, and a `.agent` folder for information shared across a person or team. ## AI profile context {#ai-profile-context} The notebooks, folders, and plain text linked to the [AI profile](../../workspace/codatum-ai/ai-profile) selected for the session also become context. If you specify a folder, notebooks in its subfolders are included too. Referencing a context notebook or folder requires the user to have view permission for it. An AI profile that includes a notebook you can't view can't be used. ## Auto-load settings {#auto-load-settings} In the **Auto-load Agent Context** section of [**Settings**](./overview#user-settings), you can turn each type on or off. | Item {.nowrap} | Default | Target | | --- | --- | --- | | **Personal** | On | `.agent` directly under your personal folder | | **Teamspace** | On | `.agent` directly under the teamspace the current notebook belongs to | | **Notebook page** | On | The `.agent` page within the current notebook | Context configured on an AI profile isn't covered by these switches. It's always loaded as part of the settings of whichever AI profile is currently selected. You can check which notebooks and pages are currently being auto-loaded from **Context usage** in the chat input field. ## Always-loaded vs. loaded on demand {#load-strategy} You can separate information that's always loaded from information referenced only when needed, based on where you place notebooks and how you link them to an AI profile. | Loading approach | Setting | Behavior | | --- | --- | --- | | Always load personal context | Place notebooks in `.agent` directly under your personal folder, and turn on **Personal** | Loads every notebook in the folder and its subfolders whenever the AI agent runs | | Load teamspace context | Place notebooks in `.agent` directly under a teamspace, and turn on **Teamspace** | Loaded while you have a notebook from that teamspace open | | Load notebook-specific context | Create a `.agent` page in a notebook, and turn on **Notebook page** | Loads the `.agent` page while that notebook is open | | Always load through an AI profile | Set it as the AI profile's plain text, context notebook, or context folder | Loaded every time that AI profile is used | | Reference only when needed | Keep only an index notebook under `.agent`, and put details in a regular folder with a page link to it | The index is auto-loaded, and details are referenced through the link only when a question calls for it | For the agent to reference a detail notebook when needed, the user must be able to view it, and the AI profile's **Notebook access** must be set to **All accessible notebooks**. With **Current notebook only**, details placed outside the current notebook can't be referenced. ## Index notebook {#index-notebook} Notebooks in a `.agent` folder are auto-loaded. Placing a large volume of detailed specifications or past analyses there uses up context on information unrelated to the question at hand. You can put details in regular notebooks and folders, and keep an index notebook under `.agent`. An index should include the following. * What information is available * What kinds of questions it's relevant to * A **link to the page** of the notebook that's the source of truth * Where the notebook is stored * Keywords useful for searching * How to handle cases where information can't be found or a judgment can't be made ::: warning For each reference, set a link to the target page, not just the notebook name. A notebook name or storage location alone doesn't let the AI agent locate a page outside the `.agent` folder directly. Open the target page, copy its URL, and insert it into the index as a link. ::: Here's an example structure. Replace `WORKSPACE_ID` / `NOTEBOOK_ID` / `PAGE_ID` with the actual URL. ```markdown # Agent Context Index ## Common rules * Treat the "KPI Definitions" notebook as the source of truth for metric definitions * If a definition can't be found, don't guess—ask the user * Confirm the target period and time zone before writing SQL ## Knowledge Map ### Sales and orders * Reference: [Sales and order metrics](https://app.codatum.com/workspace/WORKSPACE_ID/notebook/NOTEBOOK_ID/PAGE_ID) * Location: "Data Knowledge" teamspace * When to use: analysis of sales, orders, and cancellations * Search keywords: sales, orders, cancellations, GMV ``` ### Example folder structure {#folder-structure-example} For example, you can arrange the index and source-of-truth notebooks as follows. Folder and notebook names other than `.agent` are up to you and don't affect behavior. Following the GitHub convention of placing one notebook named README in each folder as its entry point makes the intent clear to both people and AI agents. ```text "Data Knowledge" teamspace ├── .agent │ └── README (overall index) ├── Sales and Orders │ ├── README (entry point for this folder) │ └── Order cancellation analysis └── Customers and Churn └── README ``` A bulleted list of links to the target pages, each with a one-line description, is enough for the content of a README. When the hierarchy gets deeper, link from a parent README to the READMEs of its subfolders, so that details can be reached by following READMEs. ```markdown # README * [Sales and Orders Guide](page URL): source of truth for metric definitions and aggregation SQL * [Customers and Churn Guide](page URL): definitions of customer segments and churn rate * If a definition can't be found, don't guess—ask the user ``` Splitting folders by domain, such as sales or customers, keeps them easy to reference from the index and to update. For the idea of managing knowledge as a collection of documents, the Google Cloud article on the [Open Knowledge Format](https://cloud.google.com/blog/products/data-analytics/how-the-open-knowledge-format-can-improve-data-sharing/) is also a useful reference. ## Configurations to avoid {#avoid} Avoid the following configurations. * Putting every detailed specification or past analysis into a `.agent` folder * Duplicating the same metric definition across multiple contexts * Writing only a summary without indicating the source of truth or a reference * Writing rules with no clear update date or scope of application * Trying to control access permissions or tool execution scope through context Configure access scope and available tools through notebook and teamspace permissions, and through [AI profile](../../workspace/codatum-ai/ai-profile#tool-permissions) tool permissions. --- --- url: 'https://docs.codatum.com/features/ai-assistant/overview.md' description: >- A chat-based AI Assistant for creating SQL and charts and answering questions (deprecated; new provisioning discontinued) --- # AI Assistant (Deprecated) (Optional feature) AI Assistant is a chat-based AI that generates and corrects SQL, creates charts, and answers questions about how to use Codatum, based on natural language instructions. **New provisioning of AI Assistant has ended.** Its successor is [AI agent](../ai-agent/overview). If you're using AI Assistant, follow this page for procedures and specifications. If you're using the AI agent, see [AI agent](../ai-agent/overview). ::: warning This feature is **deprecated** and will be removed in a future release. ::: ::: tip This is an **optional feature**. Depending on your contract, it might not be available. ::: ## Key features * [Sending data to the LLM](#llm-data): How data is handled for training purposes, and what information might be sent to the LLM. * [Availability](#availability): Required permissions and settings. * [Enabling it](#enable): Enable it under **AI feature settings** in workspace settings. * [Opening it](#open): Open it from global nav, a shortcut, or a notebook. * [Roles](#roles): **AI Analyst** / **AI Support**. * [Display modes](#display-modes): Dock sidebar / float / fullscreen. * [Sessions](#sessions): Starting a new session, history, and language/connection settings. * [Notebook integration](#notebook-integration): Applying SQL/charts, fixing errors, and more. * [Relationship with the AI agent](#vs-ai-agent): Differences in how work proceeds and how settings are managed. ## Sending data to the LLM {#llm-data} Only external LLM services that contractually guarantee your input data won't be used for training are used. If you want to use your own API key, you can configure this under **Custom** in [AI profile](../../workspace/codatum-ai/ai-profile#types). For details, see the [AI Feature Policy](https://codatum.com/ai-policy). AI Assistant might send SQL, the schema of referenced tables, and the messages you enter to the LLM service. Check your organization's AI usage policy before using this feature. ## Availability {#availability} If you're using AI Assistant, the following are required. * Write permission on the notebook. * AI features overall and **AI Assistant** enabled under **AI feature settings** in workspace settings. Depending on your contract, it might not be available. ## Enabling it {#enable} Enabling AI features requires [Workspace Owner](../../workspace/administration/user#workspace-roles) permission. 1. Open [global nav](../../guide/screen-layout) > **Workspace settings** > **AI feature settings**. 2. Turn on AI features overall using the switch at the top of the screen. 3. Turn on **AI Assistant** under **Available AI features**. You can also individually enable the following features on the same screen. | Feature {.nowrap} | Description | | --- | --- | | **AI Assistant** | A chat-based AI that creates SQL and charts and also answers questions | | **AI code completion** | Provides inline SQL completion within a SQL block | | **AI name suggestion** | Automatically suggests names for SQL and charts | If you're using the AI agent, the same switch is labeled **AI Agent**. For setup steps, see [Enabling the AI agent](../ai-agent/overview#enable). ## Opening it {#open} You can open it in any of the following ways. 1. Open **AI Assistant** at the bottom of [global nav](../../guide/screen-layout). If it isn't enabled, go to the enablement screen from **Enable AI Assistant**. 2. Use the **AI Assistant** shortcut (⌘+L / Ctrl+L by default; see [Keyboard shortcuts](../../account/settings/keyboard-shortcut)). 3. On a doc page, type `/` and select **AI Analyst**. 4. From the menu at the top right of a SQL block, select **Open with this SQL**, or **Performance optimization** / **SQL refactoring**. 5. Select **Fix with AI** on a SQL block that has an error. 6. Start a how-to session from **AI support** in the help menu. 7. Select **Summarize**, **Revise and Refine**, or **Translate to** from the menu shown when you select text. ## Roles {#roles} You can switch between the following roles in the chat screen. | Role {.nowrap} | Description | | --- | --- | | **AI Analyst** | Assists with generating and correcting SQL and charts | | **AI Support** | Answers questions about how to use Codatum and provides guidance on its features | ## Display modes {#display-modes} You can switch the display from the header. | Display {.nowrap} | Description | | --- | --- | | **Dock sidebar** | Pins it to the edge of the screen | | **Float** | Displays it floating on screen, and you can move it | | **Fullscreen** | Shows the chat in a larger view | ## Sessions {#sessions} You can perform the following actions from the header. | Action {.nowrap} | Description | | --- | --- | | **Start new session** | Starts a new session | | **Session history** | Lists recent sessions and lets you switch between them | In the chat input field, you can configure the following. | Item {.nowrap} | Description | | --- | --- | | Response language | **The Assistant's response language** | | Connection | In **AI Analyst** mode, the connection the response assumes (this determines the SQL syntax assumed) | Sending a message uses **Request**. From the input field, you can pass context with **Add notebook SQL** / **Add table metadata**. ## Notebook integration {#notebook-integration} While you have a notebook's doc page open, you can apply SQL or charts generated by AI Assistant to the notebook. * Drag the generated SQL, or select **Apply**, to reflect it in the original SQL block. * For charts too, you can **Apply** to the source chart or drag it onto a notebook page. * From a SQL block, you can start a session that includes the target SQL using **Open with this SQL**, **Fix with AI** on an error, and similar. AI Assistant presents suggestions in the chat, and you apply them to the notebook yourself using **Apply** and similar. For autonomous notebook editing, see [AI agent](../ai-agent/overview#operation-modes). ## Relationship with the AI agent {#vs-ai-agent} | Item {.nowrap} | AI Assistant | AI agent | | --- | --- | --- | | Availability | Deprecated. New provisioning has been discontinued | Beta. An [optional feature](../ai-agent/overview) | | How work proceeds | Suggests in chat; you apply the changes | Proceeds autonomously with analysis, notebook editing, and more | | Context | Adding SQL/tables to a message, and similar | `@` mentions, agent context, AI profile, and more | | Model and permission settings | Workspace AI feature settings | [AI profile](../../workspace/codatum-ai/ai-profile) | For details on the successor feature, see [AI agent](../ai-agent/overview). --- --- url: 'https://docs.codatum.com/features/cli/overview.md' description: A CLI for operating Codatum from your terminal --- # Codatum CLI (Beta) `cdm` is a CLI for operating Codatum's features from your terminal, CI, or an AI agent. It doesn't replace everything you can do in the web UI; it mainly covers file-based editing, syncing, and validation of notebooks and the catalog, along with authentication. The quickest way to get started is issuing a token from [Personal Access Tokens](../../account/settings/pat#issue-token) and running `cdm auth login`. For command details, see the [Codatum CLI documentation](https://cli-docs.codatum.com). ::: info This feature is in **beta**. The specification might change without notice. ::: ## Prerequisites {#prerequisites} * See [Requirements](../../reference/requirements#codatum-cli) for supported operating systems. * Not available if the Codatum CLI is disallowed by a [workspace policy](../../workspace/access-and-security/policy#policy-settings). * For the timing of IP access control and multi-factor authentication checks, see [Checks by access method](../../workspace/access-and-security/security#access-control-by-entry-point). ## Key features * Operating Codatum from your terminal, CI, or an AI agent. * Creating, syncing, and previewing notebooks in markdown form (`.cnb.md`, a local representation of a [notebook](../notebook/overview) in Codatum). * Managing catalog annotations with YAML (such as `.cann.yaml`). * Authenticating with a PAT (issue one under [Personal Access Tokens](../../account/settings/pat#issue-token); for managing them within a workspace, see [Personal Access Tokens](../../workspace/access-and-security/pat#operations)). * Operating Codatum with a service account's permissions, for example from CI, by using a [service account PAT](../../workspace/access-and-security/pat#issue-service-account-token). --- --- url: 'https://docs.codatum.com/workspace/overview.md' description: 'The unit for managing resources, and the settings menu structure' --- # Workspace A workspace is an independent area for each organization that uses Codatum. Resources such as connections, notebooks, reports, catalogs, and workflows belong to a single workspace and can't be referenced from other workspaces. ::: tip You can switch the workspace you're working in, or join a workspace you've been invited to, from the [workspace icon in the global nav](../guide/navigation#workspace-icon). ::: For how organizations relate to workspaces, see [Organization](../organization/overview#organization-and-workspace). You manage the organization name, country, organization owners, and billing in [Organization settings](../organization/overview#organization-settings). Open it from the workspace icon at the top of the [global nav](../guide/screen-layout) > **Organization settings**. Only an organization owner can make these changes. ## Settings You can open workspace settings from the [global nav](../guide/screen-layout) > **Workspace settings**. Each menu provides the following settings. ### Administration {#administration} | Menu {.nowrap} | Content | | --- | --- | | [General](./administration/basic) | Workspace name, icon, allowed domains, and more | | [Users](./administration/user) | Managing members and guests, assigning workspace roles, and viewing registered sign-in methods | | [Groups](./administration/group) | Managing permission-granting units that group users together | | [Teamspaces](./administration/teamspace) | Creating and managing areas where specific members co-manage notebooks | | [Notebook themes](./administration/theme) | Creating and managing notebook themes | ### Access and security {#access-and-security} | Menu {.nowrap} | Content | | --- | --- | | [Workspace policy](./access-and-security/policy) | Restrictions on public links and Codatum CLI | | [Audit logs](./access-and-security/audit-log) | Records of important operations and system events | | [Public links](../features/notebook/sharing/public-link/overview) | Listing and monitoring active public links | | [Roles](./access-and-security/roles) | Reviewing built-in roles, changing guest invitations for Editor, and creating and managing custom roles | | [Service Accounts](./access-and-security/service-account) | Creating and managing accounts that are independent of any user | | [API keys](./access-and-security/api-key) | Managing API keys used for signed embeds and more | | [Personal Access Tokens](./access-and-security/pat) | Listing, suspending, and revoking PATs within the workspace, and issuing PATs for service accounts | | [Security](./access-and-security/security) | Controlling IP access control and multi-factor authentication | ### Data management {#data-management} | Menu {.nowrap} | Content | | --- | --- | | [Connections](./data-management/connection) | Connection settings to a data warehouse | | [Tags](./data-management/tag) | Tag definitions for tables, columns, queries, reports, and more | ### Codatum AI {#codatum-ai} | Menu {.nowrap} | Content | | --- | --- | | [AI feature settings](../features/ai-agent/overview#enable) | Enabling the [AI agent](../features/ai-agent/overview#enable) / [AI Assistant](../features/ai-assistant/overview#enable), code completion, and more | | [AI profiles](./codatum-ai/ai-profile) | Managing LLM connections and context | | [Agent usage](./codatum-ai/agent-usage) | Checking agent session and token usage | ### External integrations {#external-integrations} | Menu {.nowrap} | Content | | --- | --- | | [MCP clients](./external-integrations/mcp) | Configuring MCP clients and managing connections | | [Agent connectors](./external-integrations/agent-connectors) | Managing external services used by AI agents, MCP clients, and inline tables | | [Slack integration](./external-integrations/slack) | Managing connections to Slack workspaces | ### Subscriptions {#subscriptions} Only an [organization owner](../organization/settings/members#owners) can change the plan. If you aren't an organization owner, you can't change the plan. A Workspace Owner can view the plan. You manage the billing address, payment method, and invoices in **Billing** in [organization settings](../organization/overview#organization-settings). Opening **Billing** in workspace settings takes you to **Billing** in organization settings. | Menu {.nowrap} | Content | | --- | --- | | Plan | Checking and changing your current plan. Changing it is limited to organization owners | | Billing | Goes to Billing in organization settings. Organization owners only | | Usage | Checking member counts and usage/limits for each feature | --- --- url: 'https://docs.codatum.com/workspace/administration/basic.md' description: >- Managing workspace name, icon, and allowed domains, and viewing organization details --- # General Manage the workspace's name, icon, and allowed domains, and view its organization details. Only a Workspace Owner can change workspace settings or delete the workspace ([Workspace permissions](../../permissions/workspace)). Open this from the [global nav](../../guide/screen-layout) > **Workspace settings** > **General**. ## Settings {#settings} | Item {.nowrap} | Description | | --- | --- | | Workspace ID | The ID that uniquely identifies the workspace | | Icon | The icon shown in the [global nav](../../guide/screen-layout) | | Workspace name | The name shown when switching workspaces and elsewhere. Use 1 to 50 characters; URLs and email addresses aren't allowed ([Fixed limits and constraints](../../reference/limits#fixed-limits)). | | Country | The country used for contracts and billing. Change it in [Organization settings](../../organization/settings/general#settings) | | Organization name | The organization's legal name used for contracts and invoices. Change it in [Organization settings](../../organization/settings/general#settings) | | Allowed domains | See [Invitations and joining](./invite#allowed-domains) for details | ## Danger zone {#danger-zone} You can **delete the workspace**. Deleting it also deletes all related data, including notebooks, folders, and comments. Depending on your payment method, you might not be able to delete it. If that happens, contact Codatum support. --- --- url: 'https://docs.codatum.com/workspace/administration/user.md' description: 'Members, guests, workspace roles, and registered sign-in methods' --- # Users A user is an [account](../../account/overview#account-and-user) that belongs to a workspace. Users are classified as members or guests, and every user is assigned exactly one workspace role for each workspace they belong to. You can manage users within a workspace from [global nav](../../guide/screen-layout) > **Workspace settings** > **Users**. For permissions by workspace role, see [Workspace permissions](../../permissions/workspace); for inviting users, see [Invitations and joining](./invite). ## Members and guests {#member-and-guest} | Category {.nowrap} | Workspace roles included {.nowrap} | Summary | | --- | --- | --- | | Member | Workspace Owner, Workspace Editor, Workspace Viewer, custom roles | Users who use the workspace's main features | | Guest | Workspace Guest | Users who can only access limited resources, such as explicitly shared reports | * **User** = member + guest (every account that belongs to the workspace) * **Member** = user excluding guests Guests can't belong to a group. Also, **Workspace settings** in the [global nav](../../guide/screen-layout) isn't shown to guests. ## Workspace roles {#workspace-roles} Every user is always assigned exactly one workspace role. | Role {.nowrap} | Summary | | --- | --- | | Workspace Owner | Has full administrative permissions for the workspace, including user management | | Workspace Editor | Can create and edit content such as notebooks and connections. Can't invite users or change workspace settings | | Workspace Viewer | Can view content but can't edit it | | Workspace Guest | Can only view limited resources, such as shared reports | | Custom role | A role created in the workspace. Has the permissions chosen in the role ([Custom roles](#custom-role-assignment)) | For permissions by role, see [Permissions overview](../../permissions/overview) and [Workspace permissions](../../permissions/workspace). ### Custom roles {#custom-role-assignment} In workspaces where [custom roles](../access-and-security/roles) are available, you can assign custom roles created in the workspace in addition to the built-in roles. You create, edit, and delete custom roles on [Roles](../access-and-security/roles). * You can assign them to users and service accounts. You can't assign them to guests, and you can't change a guest's role to a custom role. * You assign and change roles by changing a role on the **Users** screen and in [email invitations](./invite#email-invite). For service accounts, choose the role on the [Service accounts](../access-and-security/service-account#permissions) screen. * Only a Workspace Owner can grant or revoke the Workspace Owner role. Workspace Owner doesn't appear in the role options for anyone else. * Users whose role has the [**Members**](../access-and-security/roles#permissions-member) permission can invite and remove users other than Workspace Owners, and change their roles. ## Sign-in methods {#sign-in-methods} Users who can change workspace settings (Workspace Owners and users whose role has the [**Workspace settings**](../access-and-security/roles#permissions-workspace) permission) can view the sign-in methods registered to each user's account in the **Sign-in** column on the **Workspace members** and **Workspace guests** tabs. If a user has registered both Google and a password, both methods are shown. Sign-in methods belong to the account and are shared across its workspaces. For adding or removing your own sign-in methods, see [Sign-in & security](../../account/settings/login). Users whose information can't be found show **Unknown**. If fetching the information fails, the column shows **Unavailable**. ## Deleting a user {#delete-user} Workspace Owners and users whose role has the [**Members**](../access-and-security/roles#permissions-member) permission can remove a user from the workspace from the **Users** screen. Only a Workspace Owner can remove a Workspace Owner. When removed, that user's [Private](../../permissions/resources/notebook#scope-private) folder (including the notebooks and folders within it) is deleted. Connections with the Private access level whose only connection owner is that user are also deleted. Notebooks in other access scopes, such as the workspace or a teamspace, remain intact. ## Leaving a workspace {#leave-workspace} You can leave a workspace that you belong to. Any user can leave regardless of their workspace role, including guests. 1. In the [global nav](../../guide/screen-layout), go to the workspace icon > **Browse all** to open the [workspace selection screen](../../guide/navigation#workspace-icon). 2. In the **Your workspaces** list, open the menu at the right end of the workspace's row, and select **Leave workspace**. 3. To confirm, enter the workspace name, and then select **Leave workspace**. Leaving a workspace has the following constraints: * The last Workspace Owner can't leave. Make another user a Workspace Owner first. * When you leave, your Private folder and the Private connections where you are the only connection owner are deleted, the same as when [a user is deleted](#delete-user). This can't be undone. * To return to a workspace you left, you need to join it again, for example through an [invitation](./invite). --- --- url: 'https://docs.codatum.com/workspace/administration/group.md' description: A unit for granting permissions to a group of users --- # Group (Optional feature) A group is a unit for managing multiple users together and granting them access to resources in bulk. Manage groups from [global nav](../../guide/screen-layout) > **Workspace settings** > **Groups**. A user can belong to multiple groups. Permissions granted to a group are inherited by its [members](./user#member-and-guest) and its [Group Owners](#group-owner). For how permission evaluation works, see [Permissions overview](../../permissions/overview). ::: tip This is an **optional feature**. Depending on your contract, it might not be available. ::: ## Creating and managing 1. Open [global nav](../../guide/screen-layout) > **Workspace settings** > **Groups**. 2. From **New group**, specify the **group name** and **members**. 3. Select **Edit** on a row in the list to open **Group settings**. **Group settings** lets you check and manage the following. * **Group name** / **icon** * **Group Owners** * **Group members** * **Granted permissions** (connection / teamspace / notebook / report) A Workspace Owner can select **Audit logs** from the row menu to open the [audit logs](../access-and-security/audit-log) for operations on the group. You can also add members from the following entry points. * **Add to group** in [global nav](../../guide/screen-layout) > **Workspace settings** > **Users** * Specifying a group during email invitations in [Invitations and joining](./invite#email-invite) ## Required roles {#required-roles} For the roles required to create and manage groups, and which resource roles can be granted, see [Group permissions](../../permissions/resources/group). ## Group Owner {#group-owner} A **Group Owner** can edit the target group and manage its members even without being a Workspace Owner. Permissions granted to a group are also granted to its Group Owners. Both users and [service accounts](../access-and-security/service-account) can be Group Owners. * A group can have up to 3 owners ([Fixed limits and constraints](../../reference/limits#fixed-limits)). * A group can also operate without any owners (zero is allowed). ## Granting permissions Permissions are granted to a group mainly through the sharing and permission settings of each resource. The typical label when selecting a target is **Add group or member**. Examples of resources you can grant permissions on: * [Connection](../../permissions/resources/connection) * [Teamspace](../../permissions/resources/teamspace) * [Notebook](../../permissions/resources/notebook) * [Report](../../permissions/resources/report) **Granted permissions** in the group settings lets you check permissions that have already been granted. For connections and teamspaces, you can sometimes change the role from here too. You can make the change if you can change the permissions of that connection or teamspace. ## Automatic assignment by allowed domain {#auto-assign-by-domain} Automatically assigning a group by email domain is set up not on the group screen, but under [global nav](../../guide/screen-layout) > **Workspace settings** > [**General**](./basic) > **Allowed domains**. You can specify a **default group** for each domain. For the join flow and constraints, see [Invitations and joining](./invite#allowed-domains). ## Constraints * A [Workspace Guest](./user#member-and-guest) can't belong to any group. * You can check the maximum number of groups from global nav > **Workspace settings** > **Usage** ([Fixed limits and constraints](../../reference/limits#plan-limits)). --- --- url: 'https://docs.codatum.com/workspace/administration/invite.md' description: >- Email invitations, invite links, allowed domains, and guest invitations from reports --- # Invitations and joining How to invite and join users to a workspace. Configuring email invitations, invite links, and allowed domains requires the member management permission. Workspace Owners and users whose role has the [**Members**](../access-and-security/roles#permissions-member) permission have it ([Workspace permissions](../../permissions/workspace)). Inviting guests from the report screen requires the [**Guest invitations**](../access-and-security/roles#permissions-member) permission instead of the member management permission. Among the built-in roles, Workspace Editor also has it. Here's a comparison of the ways to join. | Method {.nowrap} | Who performs it | Role/group on joining {.nowrap} | How to join {.nowrap} | | --- | --- | --- | --- | | [Email invitation](#email-invite) | Users with the member management permission | Specified at invitation time | Join from the [workspace selection screen](../../guide/navigation#workspace-icon) | | [Allowed domain](#allowed-domains) | The joining user | Specified at setup time | Join from the [workspace selection screen](../../guide/navigation#workspace-icon) (enter a verification code from email) | | [Invite link](#invite-link) | The user who received the link | Editor (fixed), no group | Join by opening the link | | [Guest invitation from a report](#guest-invite-from-report) | A user with report sharing and guest invitation permissions | Guest, no group | Join from the [workspace selection screen](../../guide/navigation#workspace-icon) | ## Flow for the invitee {#invitee-flow} To join a workspace after being invited, the invitee needs a Codatum account. If they don't have one, they first need to create an account via [Sign up](../../account/signup). After creating an account, or if they already have one, they check and accept the invitation from the [workspace selection screen](../../guide/navigation#workspace-icon). To join via an allowed domain, they need to enter a verification code sent by email ([Joining via an allowed domain](#join-via-allowed-domain)). An [invite link](#invite-link) lets them join directly, without going through the selection screen. If they aren't logged in, they log in or sign up, then return to the original link to join. For organization owner invitations, see [Members](../../organization/settings/members#invitee-flow). ## Email invitation {#email-invite} Open [global nav](../../guide/screen-layout) > **Workspace settings** > **Users**, then select **Invite users** > **Send invitation email**. Sending invitation emails requires the member management permission. You can specify the following. * **Email address** * Turn on **Bulk invite** to enter multiple email addresses, one per line. You can specify up to 20 at a time ([Fixed limits and constraints](../../reference/limits#fixed-limits)). * With bulk invite, the same role and groups apply to all the email addresses you enter. * **Workspace role** * In workspaces where [custom roles](../access-and-security/roles) are available, you can also choose a custom role. * Only a Workspace Owner can choose Workspace Owner. * **Group** * To specify a group, in addition to the member management permission, you need the [**Groups**: Manage](../access-and-security/roles#permissions-member) permission or must be a [Group Owner](../../permissions/resources/group) of that group. * Workspace Owners can specify any group. The following constraints apply. * Invitations expire 7 days after creation ([Fixed limits and constraints](../../reference/limits#fixed-limits)). * You can send up to 200 invitation emails in any 1-minute period, 400 in any 1-hour period, and 600 in any 24-hour period from a workspace. This includes new invitations, resends, and guest invitations from reports ([Fixed limits and constraints](../../reference/limits#fixed-limits)). * You can't specify a group if you select Guest ([Members and guests](./user#member-and-guest)). * You can't invite an email address that already belongs to the workspace. * You can't send duplicate invitations to the same email address. * If an error occurs during a bulk invite, sending stops at that point. The sent email addresses are removed from the input field, and only the unsent ones remain. The recipient of the invitation email checks the invitation on the [workspace selection screen](../../guide/navigation#workspace-icon) and selects **Join** or **Decline** (see [Flow for the invitee](#invitee-flow)). * The invited email address must match the account's email address. * Selecting **Join** applies the role and group specified at invitation time. * Selecting **Decline** deletes the invitation. ### Pending invitations {#pending-invitations} You can check unaccepted invitations from **Pending invitations** in [global nav](../../guide/screen-layout) > **Workspace settings** > **Users**. | Display / action {.nowrap} | Content | | --- | --- | | **Pending Invite** | Within the expiration period and not yet accepted | | **Invite expired** | Past the expiration date | | **Resend** | Resends the invitation email and extends the expiration to 7 days from the resend time | | **Delete** | Cancels the invitation | ## Allowed domains {#allowed-domains} Configure this under [global nav](../../guide/screen-layout) > **Workspace settings** > [**General**](./basic) > **Allowed domains**. Changing this requires the member management permission. An account whose email address matches an allowed domain can join that workspace. Joining isn't automatic — they need to select **Join** from the list on the [workspace selection screen](../../guide/navigation#workspace-icon) (see [Flow for the invitee](#invitee-flow)). You can set the following for each domain. * **Default role** * **Default groups** Only a Workspace Owner can set Workspace Owner as the default role. The following constraints apply to domains you can add. * You choose from the email domains of existing members. * Free email domains can't be added. For automatic group assignment via allowed domains, also see [Group](./group#auto-assign-by-domain). ### Joining via an allowed domain {#join-via-allowed-domain} To join via an allowed domain, you need to enter a verification code sent to your account's email address. This is required regardless of how you log in (for example, with a password or Google). 1. On the [workspace selection screen](../../guide/navigation#workspace-icon), select **Join** for the workspace you want to join. 2. Enter the verification code sent to your account's email address. ### Verification code {#join-verification-code} The following constraints apply to the verification code for joining via an allowed domain. * The code expires 10 minutes after it's sent ([Fixed limits and constraints](../../reference/limits#fixed-limits)). * If you don't receive the code or it expires, select **Send a new code** to resend it. You can resend 60 seconds after the previous code was sent ([Fixed limits and constraints](../../reference/limits#fixed-limits)). * When you send a new code, any code sent before it can no longer be used. * After too many incorrect entries, the code can no longer be used. Send a new code. ## Invite link {#invite-link} Open [global nav](../../guide/screen-layout) > **Workspace settings** > **Users**, then use **Invite link** within **Invite users**. Viewing, generating, and regenerating the invite link requires the member management permission. * Share the generated link with the person you want to invite. * What happens when they open the link depends on their login state: * **Logged in**: they join the workspace immediately. * **Not logged in**: after logging in or [signing up](../../account/signup), they join the workspace (see [Flow for the invitee](#invitee-flow)). * A user who joins via an invite link is assigned **Workspace Editor**. The link has the following specifications. * Regenerating it issues a new link, and the old one stops working. * The invite link itself has no expiration date. * There's no way to disable it. If you no longer need it, **regenerate** it. ## Guest invitation from a report {#guest-invite-from-report} Open **Share** on the report screen, select **Share report**, and specify an email address in **Invite guest by email**. You can invite a user who hasn't joined the workspace as a [guest](./user#member-and-guest). The recipient of the invitation email checks the invitation on the [workspace selection screen](../../guide/navigation#workspace-icon) and selects **Join** or **Decline** (see [Flow for the invitee](#invitee-flow)). * Accepting the invitation adds them to the workspace as a Workspace Guest, and grants Report Viewer on the target report. * Inviting a guest requires the **Guest invitations** permission in addition to the permission to change report permissions. For details, see [Report permissions](../../permissions/resources/report#guest-sharing). * A Workspace Owner can remove the guest invitation permission from Workspace Editor ([Changing guest invitations for Editor](../access-and-security/roles#editor-guest-invite)). * You can check or cancel guests you've invited from **Pending guest invitations** in the same panel. To share with a user who has already joined the workspace, use the report's sharing settings instead. For a feature overview, see [Report](../../features/notebook/sharing/report/overview). ## When multiple join methods overlap {#overlapping-invites} If an email invitation is pending and the user joins via an allowed domain or an invite link instead, the role from the join method they used takes priority. * Joining via an allowed domain: the domain's default role applies (the role specified in the invitation isn't used). * Joining via an invite link: Workspace Editor applies (the role specified in the invitation isn't used). Even if a guest invitation from a report is pending, joining via an invite link makes the user a Workspace Editor. If you want them to join as a guest, have them accept via **Join** on the email invitation. --- --- url: 'https://docs.codatum.com/workspace/administration/teamspace.md' description: An area for specific members to co-manage notebooks --- # Teamspace (Optional feature) A teamspace is a notebook folder with permission management. Only users and groups granted a permission can view the notebooks within that teamspace. Use it when you want to separate access by team rather than publishing to the entire workspace. Create and manage teamspaces from [global nav](../../guide/screen-layout) > **Workspace settings** > **Teamspaces**. In the [left sidebar](../../guide/screen-layout) of the notebook screen, each teamspace name is shown as a root folder. For the overall folder layout, see [Folder](../../features/notebook/folder). ::: tip This is an **optional feature**. Depending on your contract, it might not be available. ::: ## Creating and managing 1. Open [global nav](../../guide/screen-layout) > **Workspace settings** > **Teamspaces**. 2. Select **New teamspace**. 3. Enter a **teamspace name** (you can also set an icon). 4. To add members at creation time, specify users or groups and their roles under **Permissions**, then select **Create**. To grant permissions later, add them from **Teamspace settings** after creation. The creator becomes the Teamspace Owner. The roles that can be granted at creation are Teamspace Editor / Teamspace Viewer (owners are managed from settings after creation). The list shows **Name** / **Permissions** / **Owner**. Select **Edit** from the row menu to open **Teamspace settings**, and use **Delete** to delete the teamspace. A Workspace Owner can select **Audit logs** to open the [audit logs](../access-and-security/audit-log) for operations on the teamspace. **Teamspace settings** lets you check and manage the following. * **Teamspace name** / icon * **Teamspace Owners** * **Permissions** (granting roles to users and groups) ## Required roles {#required-roles} For the roles required to create and manage teamspaces, and which resource roles can be granted, see [Teamspace permissions](../../permissions/resources/teamspace). ## Teamspace Owner {#teamspace-owner} A **Teamspace Owner** can edit the target teamspace and manage its permissions even without being a Workspace Owner. A Teamspace Owner is also granted the permissions of a Teamspace Editor. * A teamspace can have up to 3 owners ([Fixed limits and constraints](../../reference/limits#fixed-limits)). * A teamspace can also operate without any owners (zero is allowed). Workspace Owners and users whose custom role has **Manage** selected for **Create and manage teamspaces** in [Roles](../access-and-security/roles#permissions-notebook) can always manage it. The typical label when selecting who to grant permissions to is **Add group or member** (or **Add member** if the group feature is disabled). For the roles required to view, edit, share, and publish notebooks within a teamspace, see [Notebook](../../permissions/resources/notebook#scope-teamspace). ## Constraints * You can check the maximum number of teamspaces from global nav > **Workspace settings** > **Usage** ([Fixed limits and constraints](../../reference/limits#plan-limits)). * Deleting a teamspace also deletes all the notebooks and folders under it. This operation can't be undone. --- --- url: 'https://docs.codatum.com/workspace/administration/theme.md' description: The visual theme for a notebook's appearance --- # Notebook theme (Optional feature) A notebook theme lets you customize a notebook's fonts and colors. It's reflected in chart colors and in the text, background, and borders across the page. ::: tip This is an **optional feature**. Depending on your contract, it might not be available. ::: ## Settings {#settings} A theme has the following settings. ### Common | Item {.nowrap} | Description | | --- | --- | | **Theme name** | The name of the theme | | **Font family** | If you specify multiple fonts, the ones listed first are prioritized | | **Base font size** | The size of text, inputs, buttons, and other elements throughout the page is based on this size. If a chart's **Advanced settings** specify a **Base font size**, the chart setting takes priority. | ### Light theme / Dark theme You can set the following separately for light and dark. * **Chart color** * **Status color** * **Primary color** * **Focus color** * **Link color** * **Background color** * **Text color** * **Border color** You can copy settings such as chart colors between light and dark (excluding background, text, and border colors). ## Creating and applying {#create-apply} ### Creating 1. Open [global nav](../../guide/screen-layout) > **Workspace settings** > **Notebook themes**. 2. Configure it from **Create notebook theme**. Creating and editing requires [Workspace Owner](./user#workspace-roles) permission. ### Applying From the notebook screen's menu > **Notebook theme**, choose the theme to apply to the notebook. Notebook edit permission is required. For operations on the target notebook, see [Notebook](../../features/notebook/overview). The default theme is applied to new notebooks. It doesn't affect existing notebooks. ## Scope of effect {#scope} When you change an existing notebook theme, the change is reflected in notebooks that use that theme. The theme at the time of publishing is reflected in [reports](../../features/notebook/sharing/report/overview), [public links](../../features/notebook/sharing/public-link/overview), and [signed embeds](../../features/notebook/sharing/signed-embed/overview). To apply theme changes to published resources, republish them (for example, with **Publish changes**). --- --- url: 'https://docs.codatum.com/workspace/access-and-security/policy.md' description: Policies for public links and Codatum CLI --- # Workspace policy (Optional feature) From [global nav](../../guide/screen-layout) > **Workspace settings** > **Workspace policy**, you can set workspace-wide restrictions. Only a Workspace Owner can change these ([Workspace permissions](../../permissions/workspace)). ::: tip This is an **optional feature**. Depending on your contract, it might not be available. ::: ## Settings {#policy-settings} | Item | Description | | --- | --- | | Disable public link creation and updates for this workspace | Disables creating and updating (republishing) public links. Existing public links aren't deleted | | Disable Codatum CLI for this workspace | Existing PATs aren't deleted, but creating new ones and using issued PATs is disabled. The [Codatum CLI](../../features/cli/overview) also becomes unusable | To disable guest invitations by Workspace Editors, use [Roles](./roles#editor-guest-invite). --- --- url: 'https://docs.codatum.com/workspace/access-and-security/audit-log.md' description: Records of important operations and system events --- # Audit logs (Optional feature) Audit logs record important operations performed in your workspace. You can search them by period and conditions from [global nav](../../guide/screen-layout) > **Workspace settings** > **Audit logs**. Workspace Owners and users whose role has the [**Audit logs**](./roles#permissions-workspace) permission can view them ([Workspace permissions](../../permissions/workspace)). ::: tip This is an **optional feature**. Depending on your contract, it might not be available. ::: ## What's recorded {#records} For the list of recorded events and the fields each event contains, see [Audit event definitions](https://audit-docs.codatum.com/). ## Searching {#search} 1. Go to [global nav](../../guide/screen-layout) > **Workspace settings** > **Audit logs**. 2. Specify the **Period**. 3. To narrow the results, select **Add condition**, and then specify a field, an operator, and a value. 4. Select **Search**. To narrow the results further, you can add a value as a condition from a row in the results or from the event fields shown when you expand a row. ## Search conditions {#search-conditions} * Specify a field listed in [Audit event definitions](https://audit-docs.codatum.com/) in dot notation, such as `actor.principal.uid`. * Values are compared as strings. * You can add up to 20 conditions. When you specify multiple conditions, the results include only events that match all of them (AND). The following operators are available. | Operator {.nowrap} | Description | | --- | --- | | is | The value matches the specified value. | | is not | The value doesn't match the specified value. Events that don't have the field are also included. | | is any of | The value matches any of the comma-separated values. | | starts with | The value starts with the specified string. | | contains | The value contains the specified string. | | does not contain | The value doesn't contain the specified string. Events that don't have the field are also included. | | exists | The field has a value. | | does not exist | The field has no value. | ## Information in the list {#columns} | Column {.nowrap} | Description | | --- | --- | | Time | When the operation was performed. | | Actor | Who performed the operation. | | Event / Resource | The event type (for example, `notebook.rename`) and the name of the resource. | | Status | **Success** / **Deny** / **Failure** | | IP | The IP address the request came from. | The list shows the newest events first. Scroll down to load more. ## New and legacy formats {#formats} Audit log records come in a new format and a legacy format. What you can search in [global nav](../../guide/screen-layout) > **Workspace settings** > **Audit logs** are records in the new format, which started on September 15, 2026. For the recording period of each event, see [Audit event definitions](https://audit-docs.codatum.com/). To review operations from before recording in the new format started, use the legacy audit logs. Open them from the **legacy audit logs** link in the description at the top of the audit logs screen. The legacy audit logs show operations as sentences in English, and you can search them by user, group, API key, or keyword. ## Retention and export {#retention} * Records in the new format are retained for 3 years from the date they're recorded. Records in the legacy format are retained for 1 year from the date they're recorded ([Limits](../../reference/limits#fixed-limits)). * Export from the screen isn't currently available. If you need an export, contact Codatum support. --- --- url: 'https://docs.codatum.com/workspace/access-and-security/roles.md' description: >- Review built-in roles, change guest invitations for Editor, and create, edit, and delete custom roles built from the permissions you choose --- # Roles You can review the permissions of each workspace role. You can also remove the guest invitation permission from the built-in Workspace Editor role, and create and manage custom roles by choosing permissions. ## Built-in roles and custom roles {#built-in-and-custom} There are built-in roles and custom roles. Both are [workspace roles](../administration/user#workspace-roles), and each user or service account is assigned exactly one. | Type {.nowrap} | Description | | --- | --- | | Built-in role | Workspace Owner, Workspace Editor, Workspace Viewer, and Workspace Guest. Their permissions are fixed, and you can't change or delete them. The exception is that you can [remove guest invitations](#editor-guest-invite) from Workspace Editor. | | Custom role | A role you create for each workspace. You choose a level for each area in [Permissions](#permissions). | A custom role defines the default permissions across the whole workspace. Custom roles have no upper limit. When a user with a custom role is granted a resource role on a connection or teamspace, they can perform operations on that resource even if the custom role doesn't include them. Only the built-in Workspace Viewer and Workspace Guest roles act as an upper limit ([Evaluation rules](../../permissions/overview#evaluation-rules)). Custom roles are assigned and counted as follows: * You can assign them to users and service accounts. You can't assign them to guests. * Users with a custom role are [members](../administration/user#member-and-guest), not guests. * Permissions limited to Workspace Owners, such as deleting the workspace or granting the Owner role, can't be included in a custom role. ## Viewing roles {#view} Open the [global nav](../../guide/screen-layout) > **Workspace settings** > **Roles** to see the list of roles. All members except Workspace Guests can view the list and the details of each role. Viewing roles is available in every workspace, regardless of your contract. | Column {.nowrap} | Description | | --- | --- | | **Name** | Built-in roles are marked **Built-in**. | | **Description** | The description of the role. | | **Assigned** | The number of users and service accounts assigned the role. Pending invitations aren't included. | | **Updated** | When a custom role was last updated, and the member who updated it. | Select a row to open the role details, which show **General** (name and description) and **Permissions**. The Workspace Viewer details show the operations a viewer can't perform even when granted a resource role. ## Changing guest invitations for Editor (Optional feature) {#editor-guest-invite} You can remove the **Guest invitations** permission from the built-in Workspace Editor role. When you remove it, Workspace Editors can no longer [invite guests from reports](../administration/invite#guest-invite-from-report). ::: tip This is an **optional feature**. Depending on your contract, it might not be available. ::: Only a Workspace Owner can change this setting. 1. Open the [global nav](../../guide/screen-layout) > **Workspace settings** > **Roles**, and select **Editor**. 2. Under **Permissions**, turn the **Guest invitations** switch on or off. The change works as follows: * The change applies to every user and service account with the Workspace Editor role. * Removing the permission doesn't affect guests who have already been invited. * Custom roles aren't affected. Whether a custom role can invite guests depends on **Guest invitations** in its [permissions](#permissions-member). * If this feature becomes unavailable because your contract changes, the removal stays in effect. You can only give guest invitations back to Workspace Editor. ## Custom roles (Beta) (Optional feature) {#custom-role} A custom role is a workspace role that you build by choosing a permission level for each area. You can create roles with combinations of permissions that the built-in roles don't have, such as Editor permissions plus some management permissions, or view-only access to the areas you need. ::: info This feature is in **beta**. The specification might change without notice. ::: ::: tip This is an **optional feature**. Depending on your contract, it might not be available. ::: ### Creating a role {#create} Only a Workspace Owner can create roles. 1. Open the [global nav](../../guide/screen-layout) > **Workspace settings** > **Roles**. 2. From **New role**, choose a starting point. * **Blank role**: Every area starts at **None**. * **Start from Editor**: Starts with the same permissions as Workspace Editor. 3. Enter a **Name** and **Description**. * The name must be unique among the roles in the workspace, ignoring case. You can't use built-in role names, such as Owner or Editor. * For the maximum length of the name and description, see [Limits](../../reference/limits#fixed-limits). 4. Under **Permissions**, choose a level for each area. 5. Select **Create**. To start from an existing custom role, select **Duplicate** from the menu in its details. The creation screen opens with the permissions and description of the original role. The name is set to **Copy of (role name)**. You can't duplicate built-in roles. Workspace Owner has permissions that a custom role can't include, and Workspace Viewer has an upper limit. ### Editing and deleting a role {#edit-delete} Only a Workspace Owner can edit and delete roles. Other members see the role details as read-only. 1. Open the [global nav](../../guide/screen-layout) > **Workspace settings** > **Roles**, and select a custom role. 2. In the role details, select **Edit**. 3. Change the name, description, or permissions, and then select **Save**. To delete a role, select **Delete** from the menu in the role details. Deletion can't be undone. Editing and deleting work as follows: * Changes to permissions apply to every user and service account assigned the role as soon as you save. * You can't delete a role that's assigned. Assignments include pending invitations that specify the role. Change the role of those users and service accounts and delete the [pending invitations](../administration/invite#pending-invitations) first, and then delete the role. ### Assigning a role {#assign} You choose a custom role on the same screens as a built-in role. Custom roles appear in the role options after the built-in roles. | Assigned to {.nowrap} | Where to choose | | --- | --- | | Users | Changing a role on [Users](../administration/user#workspace-roles), and [email invitations](../administration/invite#email-invite) | | Service accounts | Creating or editing a [service account](./service-account#permissions) | Assigning and changing roles requires the [Members](#permissions) permission. For details, see [Assigning custom roles](../administration/user#custom-role-assignment). Users who join through [allowed domains](../administration/invite#allowed-domains) or an [invite link](../administration/invite#invite-link) can't be assigned a custom role. Change their role after they join. ## Permissions {#permissions} **Permissions** in the role details shows the following items under each heading. For items you can choose, select **None** or one of the levels. A higher level includes the lower levels. For example, if you select **Manage**, the member can also perform the **Create** operations. Items you can't choose show a fixed value: * **Workspace owners only**: Can't be granted to a custom role. ### Workspace {#permissions-workspace} | Item {.nowrap} | Level {.nowrap} | Description | | --- | --- | --- | | **Workspace settings** | **Edit** | Change workspace settings, security, and AI settings. [Workspace policies](./policy) aren't included. For what's included, see [Workspace permissions](../../permissions/workspace). | | **Audit logs** | **View** | View [audit logs](./audit-log). | | **Contract management** | **Workspace owners only** | Delete the workspace, and view the plan and subscription. | ### Members and groups {#permissions-member} | Item {.nowrap} | Level {.nowrap} | Description | | --- | --- | --- | | **Members** | **Manage** | Invite and remove users other than Workspace Owners, and change their roles. Also create, edit, and delete service accounts. | | **Guest invitations** | **Invite** | Invite people outside the workspace as guests from [reports](../administration/invite#guest-invite-from-report). | | **Groups** | **Manage** | Create [groups](../administration/group) and manage all groups. | | **Owner role and role definitions** | **Workspace owners only** | Grant and revoke the Workspace Owner role, and create, edit, and delete roles. | A user with the **Members** permission can assign custom roles that have more permissions than their own. They can't grant or revoke the Workspace Owner role, or remove a Workspace Owner. **Guest invitations** is required in addition to the report permissions ([Report permissions](../../permissions/resources/report#guest-sharing)). The **Members** permission alone doesn't let a user invite guests from reports. In the Workspace Editor details, **Guest invitations** appears as a switch ([Changing guest invitations for Editor](#editor-guest-invite)). ### Connections {#permissions-connection} | Item {.nowrap} | Level {.nowrap} | Description | | --- | --- | --- | | **Workspace connections** | **View** | View connections whose [access level](../../permissions/resources/connection#access-level) is Workspace, and their schemas. | | **Workspace connections** | **Run** | Run SQL on connections whose access level is Workspace. | | **Create and manage connections** | **Create** | Add connections. | | **Create and manage connections** | **Manage** | Update, delete, and change permissions on every connection whose access level is Workspace or Protected, including ones created by others. | **Workspace connections** is the default access to connections whose access level is Workspace. When you grant a resource role on a connection, the member can also use that connection even if it isn't allowed here. To let a member use only some connections, select **None** for **Workspace connections** and grant a resource role on each connection they need ([Connection permissions](../../permissions/resources/connection#access-level)). When you select **Manage** for **Create and manage connections**, the member can reach every connection whose access level is Workspace or Protected. For a Protected connection, they can grant themselves a resource role and access its data. Connections with the Private access level aren't included. ### Notebooks {#permissions-notebook} | Item {.nowrap} | Level {.nowrap} | Description | | --- | --- | --- | | **Workspace notebooks** | **View** | View notebooks whose [access scope](../../permissions/resources/notebook#access-scope) is Workspace. | | **Workspace notebooks** | **Edit** | Create and edit notebooks whose access scope is Workspace. | | **Workspace notebooks** | **Publish** | Publish notebooks whose access scope is Workspace as reports or links. | | **Private notebooks** | **Edit** | Create and edit notebooks whose access scope is Private. | | **Private notebooks** | **Share and publish** | Share Private notebooks with others and publish them. | | **Create and manage teamspaces** | **Create** | Create [teamspaces](../administration/teamspace). | | **Create and manage teamspaces** | **Manage** | Manage and change permissions on every teamspace, including ones created by others. | Notebooks [shared](../../features/notebook/sharing/additional-permissions/overview) with the member can be viewed and edited within the range granted by the sharing settings, regardless of the permissions chosen in the custom role. When you select **Manage** for **Create and manage teamspaces**, the member can add themselves as a Teamspace Owner even to teamspaces they haven't been granted access to. Once added, they can also access the notebooks in that teamspace. ### Workflows {#permissions-workflow} | Item {.nowrap} | Level {.nowrap} | Description | | --- | --- | --- | | **Workflows** | **Create** | Create [workflows](../../features/workflow/overview). | | **Workflows** | **Manage** | Edit, run, and delete every workflow, including ones created by others. | ### Others {#permissions-other} | Item {.nowrap} | Level {.nowrap} | Description | | --- | --- | --- | | **Tag definitions** | **Edit** | Create, edit, and delete [tag definitions](../data-management/tag#tag-definition). | | **External integrations** | **Manage** | Connect [Slack integrations](../external-integrations/slack), create [agent connectors](../external-integrations/agent-connectors), and manage all external integrations. | | **API keys** | **Workspace owners only** | Manage [API keys](./api-key). | When you select **Manage** for **External integrations**, the member acts as an [admin](../external-integrations/agent-connectors#sharing) of every Slack integration and agent connector. Even if they aren't included in an integration's admins and users, they can edit and delete it and change its admins and users. Managing includes using. To let members use an integration without managing it, grant access in each integration's [admins and users](../external-integrations/agent-connectors#sharing). ## Limits based on your contract {#contract} * Viewing roles is available regardless of your contract. Changing guest invitations for Editor and custom roles might not be available, depending on your contract. * For the "Number of editors" limit ([Limits](../../reference/limits#plan-limits)), users with a custom role count in the same bucket as Workspace Owners and Editors, regardless of the permissions granted. This applies even to a custom role that only has view permissions. When the limit is reached, custom roles can't be selected. * If custom roles become unavailable because your contract changes, custom roles that are already assigned stay in effect. You can no longer create, edit, or delete roles, or newly assign a custom role. --- --- url: 'https://docs.codatum.com/workspace/access-and-security/service-account.md' description: >- Create accounts that aren't tied to any user, and grant them workspace roles and permissions on resources --- # Service account A service account is an account that is independent of any user. Like a user, it can have a workspace role, belong to groups, and be granted permissions on resources. You can also run [routines](../../features/ai-agent/routines#run-as-service-account) with a service account's permissions. By issuing a [personal access token](./pat#issue-service-account-token), you can operate Codatum from the [Codatum CLI](../../features/cli/overview) with a service account's permissions. Switching to a service account to act as it is in [preview](#switch). ## Service account permissions {#permissions} What a service account can do depends on its workspace role, the groups it belongs to, and the permissions granted to it on each resource. * The [workspace role](../administration/user#workspace-roles) can be Editor or Viewer. In workspaces where [custom roles](./roles) are available, you can also choose a custom role. A service account can't be an Owner or a Guest. * You add the service account to groups with **Add to groups** in the list's menu, and remove it with the × next to the group name in the **Groups** column of the list. You can also add and remove it in **Group settings** > **Group members** in [Groups](../administration/group). * A service account can also be a [Group Owner](../administration/group#group-owner). As a Group Owner, it can edit the group, manage its members, and inherits the permissions granted to the group. * In the sharing and permission settings of each resource, any user who can change those settings can select a service account and grant it permissions in the same way as a user. ## Admins and users {#users} **Admins and users** shows who can manage the service account (Workspace Owners, fixed) and manages which users and groups can use it. Changing the users requires the member management permission (Workspace Owners and users whose role has the [**Members**](./roles#permissions-member) permission). | Target {.nowrap} | Description | | --- | --- | | **Workspace owners** | Always included as **Admin** (fixed) | | Group / individual members | Add from **Add group or member**. The role is **User** | * **Admin**: can edit and delete the service account, and manage its admins and users. Only Workspace Owners are admins. Users with the member management permission can also edit and delete the service account and manage its users. * **User**: can set the service account as a [routine's run permission](../../features/ai-agent/routines#run-as-service-account) and operate [the service account's sessions](#agent-sessions). Users can also [switch](#switch) to the service account. ## Creating and managing service accounts {#manage} Creating and managing service accounts requires the member management permission. 1. Open the [global nav](../../guide/screen-layout) > **Workspace settings** > **Service Accounts**. 2. Select **Create service account** and specify **Name** / **Workspace role**. 3. Add the users or [groups](../administration/group) that will use the service account to **Admins and users**. To add the service account to groups, use **Add to groups** in the list's menu after you create it. To edit or delete a service account after you create it, use the menu on each row of the list ([Management menu actions](#actions)). ## Management menu actions {#actions} The menu on each row of the list has the following actions. | Action {.nowrap} | Description | | --- | --- | | **Edit** | Changes the name, workspace role, and [admins and users](#users). | | **Add to groups** | Adds the service account to [groups](../administration/group). | | **Personal access tokens** | Opens the list of [personal access tokens](./pat) filtered to that service account. Shown only to [users who can view the list](./pat). Not shown if the [workspace policy](./policy#policy-settings) disables Codatum CLI use. | | **Delete** | You can't undo a deletion. The service account's [personal access tokens](./pat#issue-service-account-token) are also deleted. The service account's [Private](../../permissions/resources/notebook#scope-private) folder (including the notebooks and folders within it) is also deleted, including items created by users who switched to it. | When you delete a service account, runs of [routines](../../features/ai-agent/routines#run-as-service-account) whose run permission is that service account fail. ## AI agent sessions {#agent-sessions} All users of a service account, including Workspace Owners, can view and operate the [AI agent](../../features/ai-agent/overview) sessions that run with that service account's permissions, even if the sessions aren't shared. These include sessions run by [routines](../../features/ai-agent/routines#run-as-service-account) whose run permission is the service account, and sessions started while switched to the service account. * You can open a session and continue it from your own account without switching. Instructions you give from your own account also run with the service account's permissions. * **This session runs with the permissions of the service account "(service account name)".** appears at the top of the session. Whoever continues the session, the AI agent runs with the service account's permissions. * When you continue a session from your own account, browser tools, such as running or saving notebooks, aren't available. To use them, switch to the service account and then send your instruction. * Any user of the service account can approve or reject actions that need confirmation. * These sessions don't appear in the session list of your own account. Open them from a routine's **Run history** or from a shared link. * While switched, you can filter the session list with **Started by me**. It's on by default, so only the sessions you started are shown. ## Switching to a service account (Preview) {#switch} ::: info This feature is in **preview**. To request access, contact Codatum support. ::: When you switch to a service account, you act as that service account. Your actions use the [service account's permissions](#permissions), not your own, and notebooks and other resources you create belong to the service account. 1. Open the avatar icon at the bottom of the [global nav](../../guide/screen-layout) > **Switch to service account**. 2. Select the service account to switch to. After you switch, the workspace top page opens, and the avatar icon and name change to those of the service account. You can also [connect an MCP client](../external-integrations/mcp#connect-as-service-account) as a service account that you can switch to. ### Returning to your account {#return} 1. Select the avatar icon at the bottom of the [global nav](../../guide/screen-layout) > **Return to my account**. ### Who can switch {#who-can-switch} Users added as [users](#users) and Workspace Owners (admins) can switch to the service account. If there's no service account you can switch to, **Switch to service account** isn't shown in the avatar icon menu. * If you add a group, users who are added to that group later can also switch. * A Workspace Owner can switch without being added as a user. * [Workspace guests](../administration/user#member-and-guest) can't switch, even if they're added as users. ### Scope of a switch {#switch-scope} A switch applies to the browser tab where you switched. It carries over to new tabs opened from that tab (for example, from quick search) and to duplicated tabs. Other tabs stay on your account. ### Records of actions while switched {#records} Resources such as notebooks that you create or update while switched are treated as created or updated by the service account. The [audit log](./audit-log) also records these actions as actions of the service account. Comments and reactions are shown as posted by the user who switched, not by the service account. ### Information shared among users who can switch {#shared} Information tied to a service account is shared by all users who can switch to it. * The **Private** [folder](../../features/notebook/folder) is available to service accounts whose workspace role is Editor or a custom role with the [**Private notebooks**](./roles#permissions-notebook) permission, and all users who can switch can access it. While switched, it shows **Users who can switch to this service account have access**. * Stars, recently viewed items, and the **Created by me** tab of notebooks are per service account. * AI agent [pins](../../features/ai-agent/overview#pinning), [memory](../../features/ai-agent/overview#memory), and [settings](../../features/ai-agent/overview#user-settings) are per service account. However, **User Preferences** (**Language** and **Enter to newline**) in the settings are those of the user who is operating. ### Features unavailable while switched {#unavailable} The following features are tied to the individual user, so they're hidden or unavailable while switched. | Feature {.nowrap} | Description | | --- | --- | | [Account settings](../../account/overview#account-settings) | Account settings, theme switching, and language switching in the avatar menu are hidden. | | [Workspace settings](../overview) | When you open them, you're asked to return to your account. | | Other workspaces | You can only open the workspace where you switched. You also can't accept workspace invitations. | | [Notifications](../../account/settings/notification) | Notifications are hidden. | | [Workflows](../../features/workflow/overview) | Workflow pages are hidden. The AI agent doesn't operate workflows either. | | [Guest invitations from reports](../administration/invite#guest-invite-from-report) | **Inviting guests** on a report is hidden. You can't invite guests, view invited guests, or remove their permissions. | | [Connector authentication](../../account/settings/connector-authentication) | You can't connect personal-authentication connectors. | | AI agent feedback | **Send feedback** is hidden. | ### Applying removal from users and deletion {#revocation} After you do any of the following, a user who is currently switched might still be able to act as the service account for up to 1 hour ([Limits](../../reference/limits#fixed-limits)). * Remove the user from the service account's users. * Delete the service account. The same applies to [the service account's sessions](#agent-sessions) that a user continues from their own account. However, an open notebook editing screen might let you keep editing beyond 1 hour while it stays open. ### If the service account is shown as unavailable {#unavailable-error} **Service Account is unavailable** is shown in any of the following cases. * You were removed from the service account's users. * Your workspace role was changed to Guest. * You were a Workspace Owner who wasn't added as a user, and your workspace role was changed from Owner. * The service account was deleted. * The service account lost access to the workspace. 1. Select **Return to my account**. 2. To switch again, ask a Workspace Owner to check the service account's status and [admins and users](#users). --- --- url: 'https://docs.codatum.com/workspace/access-and-security/api-key.md' description: API keys tied to a workspace --- # API key An API key is tied to a workspace and is used to authenticate [signed embeds](../../features/notebook/sharing/signed-embed/overview). Manage API keys from [global nav](../../guide/screen-layout) > **Workspace settings** > **API keys**. Only a Workspace Owner can create a key or retrieve a secret ([Workspace permissions](../../permissions/workspace)). ## What you can manage * **New API Key** creates a key, and you can manage its name, API key, and API secret. * The list shows **Name** / **API Key** / **API Secret** / **Last used (Created)**. * To rotate keys, you can issue multiple secret versions for a single API key (**Add secret**). * You can **Copy secret**, delete a secret, and **Rename** or delete a key. * To open the [audit logs](./audit-log) for operations performed with a key, select **Audit logs** from the row menu. API secrets are only handled server-side. If you lose one, add a new secret version or recreate the API key. Creating and deleting API keys, retrieving, creating, and deleting secrets, and operations performed with a key are all recorded in the [audit logs](./audit-log). ## Issuing a token For issuing tokens for signed embeds, see [Integration steps](../../features/notebook/sharing/signed-embed/integration#issue-token). --- --- url: 'https://docs.codatum.com/workspace/access-and-security/pat.md' description: List and management of personal access tokens within a workspace --- # Personal Access Tokens (Beta) A PAT (personal access token) is a credential for operating Codatum from the [Codatum CLI](../../features/cli/overview). For how each user issues and edits their own tokens, see the account's [Personal Access Tokens](../../account/settings/pat) page. From [global nav](../../guide/screen-layout) > **Workspace settings** > **Personal Access Tokens**, you can list and manage PATs issued within the workspace. You also [issue](#issue-service-account-token) PATs for [service accounts](./service-account) on this page. ::: info This feature is in **beta**. The specification might change without notice. ::: ## Prerequisites * The menu is shown and usable only if the [workspace policy](./policy#policy-settings) doesn't disable Codatum CLI use. * [Guests](../administration/user#member-and-guest) can't use PATs. * Workspace Owners and users whose custom role has **Edit** selected for **Workspace settings** in [Roles](./roles#permissions-workspace) can view the list and **Suspend** / **Resume** / **Revoke** tokens ([Workspace permissions](../../permissions/workspace)). * Only Workspace Owners can issue and edit PATs for service accounts. ## Issue a service account token {#issue-service-account-token} You can issue a PAT for a [service account](./service-account) for runs that aren't tied to a user, such as CI. Operations performed with a service account's PAT use the [service account's permissions](./service-account#permissions), not the permissions of the user who issued it. 1. Click **Issue service account token**. 2. Enter the following fields, and click **Issue**. | Field {.nowrap} | Description | | --- | --- | | Service account | The service account to issue the token for | | Name | An identifying name for the token | | Expiration | Can be set in 1-day increments, up to 365 days ([Limits](../../reference/limits#fixed-limits)) (Tokens without an expiration can't be issued) | | Restrict token permissions | By default, the token inherits all of the service account's permissions. To grant only a subset, turn this on and narrow the scope of connections / notebooks / tags. For an overview, see [Permissions overview](../../permissions/overview#credentials) | The plaintext token is **shown only once, right after issuance, and can't be retrieved again**. Copy the plaintext token, store it in a safe place, and don't share it with third parties. The following specifications apply to service account PATs. * [IP access control](./security#ip-access-control) doesn't apply. It applies to users' PATs. * The token stays usable even if the user who issued it leaves the workspace. * When you [delete a service account](./service-account#actions), its PATs are also deleted and no longer appear in the list. * You can't issue one from the browser approval of `cdm auth login` in the [Codatum CLI](../../features/cli/overview). ## List | Column {.nowrap} | Description | | --- | --- | | Account | The account whose permissions the token uses. For a user's PAT, the user who issued it; for a service account's PAT, the service account | | Name (token) | The token name and a masked display with a prefix | | Issuer | The user who issued the service account's PAT. `-` for a user's PAT | | Permission restriction | **Configured** if a permission boundary is set; otherwise `-` | | Last used | The last-used time (**Unused** if never used) | | Expires | The token's expiration date | | Status | **Active** / **Suspended** / **Revoked** / **Expired** | By default, revoked and expired tokens are hidden. Turn on **Show revoked and expired** to include them in the list. You can search by token name or account, and filter by account type (**All accounts** / **Users** / **Service accounts**). ## Operations {#operations} | Operation {.nowrap} | Description | | --- | --- | | View permissions | Check the grants of a token that has a permission restriction configured | | Edit | Changes the name and permission restriction of a service account's PAT. Only Workspace Owners can do this. A user's PAT is edited by the user who issued it, in [account settings](../../account/settings/pat#manage-tokens) | | Suspend | Temporarily blocks authentication for an active token, until resumed | | Resume | Re-enables authentication for a suspended token | | Revoke | Immediately invalidates the token. This can't be undone | Operations on PATs, such as creating and revoking them, and operations performed with a PAT are recorded in the [audit logs](./audit-log). ## Relationship with account settings | Location | What you can do | | --- | --- | | [Personal Access Tokens in account settings](../../account/settings/pat#issue-token) | Create, update, suspend, and revoke tokens you issue yourself | | Personal Access Tokens in workspace settings (this page) | List tokens issued within the workspace, and **Suspend** / **Resume** / **Revoke** / **View permissions**. Issue and edit service account tokens | A permission boundary is a mechanism that caps the token at the permissions of the token's account (a user or a service account), then further narrows it to a scope of connections / notebooks / tags. For an overview, see [Permissions overview](../../permissions/overview#credentials). --- --- url: 'https://docs.codatum.com/workspace/access-and-security/security.md' description: Controlling IP access control and multi-factor authentication --- # Security (Optional feature) Workspace-wide access control. You can configure it from [global nav](../../guide/screen-layout) > **Workspace settings** > **Security**. Only a Workspace Owner can change it ([Workspace permissions](../../permissions/workspace)). You can configure [IP access control](#ip-access-control) and [multi-factor authentication control](#mfa-control). For an individual account's own login methods (password, Google login, MFA registration), see [Login and security](../../account/settings/login#account-mfa). ::: tip This is an **optional feature**. Depending on your contract, it might not be available. ::: ## IP access control {#ip-access-control} Limits workspace access to allowed IP addresses or CIDR ranges only. ### Setup {#ip-access-control-setup} 1. Open [global nav](../../guide/screen-layout) > **Workspace settings** > **Security**. 2. Turn on **Enable IP Access control**. 3. To apply this to guests as well, turn on **Include guests**. 4. Enter the allowed IPs in **Allowed IP address**. ### Supported formats {#ip-address-formats} **Allowed IP address** accepts the following formats: * A single IP address (for example, `203.0.113.15`) * CIDR notation (for example, `192.168.1.0/24`) * Both IPv4 and IPv6 * Multiple IP addresses or ranges When you enter values, your current IP address appears as a suggestion. ### Scope {#ip-access-control-scope} * Access to resources in the workspace while signed in is in scope. [Reports](../../features/notebook/sharing/report/overview) are also in scope. * Turning on **Include guests** also applies this to [guests](../administration/user#member-and-guest). * [Public links](../../features/notebook/sharing/public-link/overview) and [signed embeds](../../features/notebook/sharing/signed-embed/overview) aren't affected. * For CLI, MCP, Slack, and routines, see [Checks by access method](#access-control-by-entry-point). ### Notes {#ip-access-control-notes} * Changed settings apply immediately to users who newly sign in. For users who are already signed in, it can take some time to take effect. * You must be accessing from at least one of the allowed IPs when you save. * Networks that support both IPv4 and IPv6 may use IPv6 to connect. Include the IPv6 address or CIDR used for the connection in the allowlist as well. ### If you lose access {#ip-access-control-lockout} If incorrect IP restrictions lock you out, contact Codatum support. ## Multi-factor authentication control {#mfa-control} Requires multi-factor authentication for password logins. ### Setup {#mfa-control-setup} 1. Open [global nav](../../guide/screen-layout) > **Workspace settings** > **Security**. 2. Turn on **Require Multi-factor authentication**. 3. To apply this to guests as well, turn on **Include guests**. ### Specifications {#mfa-control-spec} * Password login is in scope. Google login and [SSO sign-in](../../account/settings/login#sso-login) aren't affected. * Turning on **Include guests** also applies this to [guests](../administration/user#member-and-guest). * For MFA registration on the account side, see [Login and security](../../account/settings/login#account-mfa). * For CLI, MCP, Slack, and routines, see [Checks by access method](#access-control-by-entry-point). ## Checks by access method {#access-control-by-entry-point} The timing of IP access control and multi-factor authentication checks depends on how you access Codatum. | Access method {.nowrap} | IP access control | Multi-factor authentication | | --- | --- | --- | | Browser | Checked when you open the workspace or refresh authentication during use. | Checked when you open the workspace or refresh authentication during use. | | [CLI and PATs](../../features/cli/overview) | Checked on every request. Not checked for [service account PATs](./pat#issue-service-account-token). | Checked when you approve CLI login in the browser or issue a PAT. | | [MCP clients](../external-integrations/mcp#connect) | Checked when you approve the connection in the browser. | Checked when you approve the connection in the browser. | | [AI agent requests from Slack](../../features/ai-agent/overview#slack-access-control) | Checked when you approve access to the target workspace in the browser. | Checked when you approve access to the target workspace in the browser. | | Automatic [routine](../../features/ai-agent/routines) runs | Not checked at execution time. | Not checked at execution time. | Enabling IP access control or multi-factor authentication does not require approved MCP connections or Slack links to be approved again. For existing Slack links, see [Access control when linking Slack](../../features/ai-agent/overview#slack-access-control). PATs issued before multi-factor authentication became required do not require approval again. IP access control applies to users' existing PATs on every request. Existing routines continue to run as the **Run permission** account after settings change. To stop access or automatic runs, use the controls for each feature. | Target {.nowrap} | How to stop it | | --- | --- | | MCP clients | [Disconnect the connection](../external-integrations/mcp#disconnect) or disable its [MCP access profile](../external-integrations/mcp#access-profiles). | | AI agent requests from Slack | Turn off [permission to start the agent from Slack](../../features/ai-agent/overview#enable-slack) for the workspace. | | CLI and PATs | [Suspend or revoke the PAT](./pat#operations). | | Routines | [Disable the routine](../../features/ai-agent/routines#manage). | --- --- url: 'https://docs.codatum.com/workspace/data-management/connection.md' description: >- Connection settings to a data warehouse. See the Connection feature for details --- # Connection See [Connection](../../features/connection/overview) for details. --- --- url: 'https://docs.codatum.com/workspace/data-management/tag.md' description: Tag definitions and types within a workspace --- # Tag A tag is a label you attach to a resource to classify and search for it. The [**definition**](#tag-definition) of a tag is managed in workspace settings, and it's [**assigned**](#tag-assignment) from each resource's screen. ## Tag types {#tag-types} The tags screen in workspace settings has the following tabs. | Tab {.nowrap} | Assigned to | | --- | --- | | **Table tag** | Catalog tables | | **Query tag** | Saved queries | | **Column tag** | Table or query columns | | **Report tag** | Reports | ## Tag definition {#tag-definition} 1. Open [global nav](../../guide/screen-layout) > **Workspace settings** > **Tags**. 2. Select a type tab, then select **New tag**. 3. Enter a **name**, **color**, and **description**, check the **preview**, and save. Creating, editing, and deleting tag definitions can be done by a Workspace Owner or Workspace Editor. For details, see [Workspace permissions](../../permissions/workspace). ## Tag assignment {#tag-assignment} Assignment is done from the target resource's screen. You can only assign tags whose type matches the resource. | Assigned to {.nowrap} | See | | --- | --- | | Tables / columns | [Annotation](../../features/catalog/annotation) | | Saved queries | [Query](../../features/saved-query/overview) | | Reports | [Report](../../features/notebook/sharing/report/overview) | ## Search Assigned tags can be used to filter each list and in [Quick search](../../features/quick-search/overview). --- --- url: 'https://docs.codatum.com/workspace/codatum-ai/ai-profile.md' description: 'Settings for the model, permissions, and context the AI agent uses' --- # AI profile An AI profile is a setting that bundles the connection method, permissions, and fixed context for the LLM the [AI agent](../../features/ai-agent/overview) uses. It's also used by LLM actions in [workflows](../../features/workflow/overview). Create and manage AI profiles from [global nav](../../guide/screen-layout) > **Workspace settings** > **AI profiles**. While chatting with the AI agent, you can switch the profile in use from **AI profile** in the input field. ## Types {#types} From **New AI Profile**, choose one of the following. | Type {.nowrap} | Description | | --- | --- | | **Managed** | Uses an AI model managed by Codatum. No API key is required | | **Custom** | Uses an API key for OpenAI / Anthropic / Gemini / Vertex AI / OpenRouter / Fireworks / Amazon Bedrock, and more | **Custom** might not be available, depending on your contract. ## Creating and managing {#create-manage} 1. Open [global nav](../../guide/screen-layout) > **Workspace settings** > **AI profiles**. 2. From **New AI Profile**, choose **Managed** or **Custom**. 3. Enter each item, then select **Create**. To change an existing profile, open it from the list, select **Edit**, and then **Save**. A Workspace Owner can select **Audit logs** on the details page to open the [audit logs](../access-and-security/audit-log) for operations on the profile. You can find the **Profile ID** under **General** on the details page. Select **Copy to clipboard** next to the ID to copy it. ## Settings {#settings} ### Name The display name of the profile. ### Status {#status} Switches the profile between **Active** and **Inactive**. You can't use an inactive profile. ### Model selection / provider / model {#model} You usually choose **Balanced** or **Intelligent**. | Option {.nowrap} | Description | | --- | --- | | **Balanced** | Automatically selects a model that balances accuracy and cost. | | **Intelligent** | Automatically selects a model that prioritizes accuracy. | Codatum updates the model in use as new models become available. * **Managed**: choose **Balanced** or **Intelligent** under **Model selection**. You can't specify a provider or an individual model name. * **Custom**: configure the **provider**, API key, and other settings, and then choose **Balanced** or **Intelligent** under **Model**. The model currently in use is shown under your selection and on each option in the **Model** list. To use an individual model, expand **Use a specific model** in the **Model** list and choose one. For a Custom profile, the available options depend on the provider. Amazon Bedrock requires you to enable access for each model, so **Balanced** and **Intelligent** aren't available and you specify a model. A specific model isn't updated automatically when new models are released. When you choose **Balanced** or **Intelligent**, Codatum sets **Reasoning effort** and **Adaptive thinking** to match the model in use. For Amazon Bedrock, configure a Bedrock API key and region. Requests to the model are processed in the region you configure. Some models are instead processed across multiple regions within the geography that contains your region (the US, Canada, the EU, Japan, or Australia). If the model can't be processed within the geography of your region, the AI agent run fails with an error. ### Context {#context} Specify content to always reference when the AI agent runs (optional). | Item {.nowrap} | Description | | --- | --- | | **Notebooks and folders** | Loads a linked notebook, or the notebooks within a linked folder. You can also specify folders or notebooks within a teamspace | | **Plain text** | Additional instructions or descriptions passed as text | If you link a folder, the notebooks within it are loaded. If you link a folder within a teamspace, using that AI profile requires view permission on the target folder. ::: warning When a [workflow](../../features/workflow/overview) runs, the AI profile's context isn't loaded. ::: ### Tool permissions {#tool-permissions} Restricts what the AI agent can use, on top of the executing user's permissions. | Item {.nowrap} | Choices / content | | --- | --- | | **Notebook access** | **All accessible notebooks** / **Current notebook only** | | **Connection access** | **All accessible connections** / **Allow only selected** / **Deny selected** | | **Connector access** | **Off** / **Allow only selected connectors** / **All connectors** | | **Web search** | **Off** / **Allow specific domains** / **On** | | **Web fetch** | **Off** / **Allow specific domains** / **On** | For domain specification, you can use formats such as `example.com` or `*.example.com`. A user can't use a connector allowed in **Connector access** unless they're listed in the agent connector's [Admins and users](../external-integrations/agent-connectors#sharing). AI profiles only narrow connector usage and don't grant permission to use a connector. AI profiles apply to use from the AI agent, not to use from inline tables ([looking up values from a connector](../../features/notebook/inline-table#connector-reference) and [writing to Google Sheets](../../features/notebook/inline-table#write-google-sheets)). ### Admins and users {#sharing} Manage which members can manage the profile and which members and groups can use it. The member who created the profile is added as **Admin**. | Target {.nowrap} | Description | | --- | --- | | **Workspace owners** | Always included as **Admin** (fixed) | | **Workspace members** | Grants access to all users and service accounts except guests | | Group / individual members | Add from **Add group or member**. Choose the role: **Admin** or **User** | * **Admin**: can use the profile and also edit, delete, and manage its admins and users. * **User**: can chat using this AI profile. ### Save conversations to logs When turned on, conversation messages using this AI profile can be reviewed in [Agent usage](./agent-usage#session-details) session details. ### Cost tracking {#cost-tracking} For a **Custom** AI profile, turn on **Cost tracking** to record an estimated cost. The AI profile detail page displays the recorded amount as **This month (estimated)**. When you use a specific model, enter the USD price per 1 million tokens for **Input**, **Cached input**, and **Output**. When default pricing is available for the model, the fields are prefilled. Select **Reset to default** to restore the current default pricing. When you choose **Balanced** or **Intelligent**, you can't set pricing. The estimate uses the default pricing for the model used at runtime. Estimated costs have the following characteristics: * Only usage while cost tracking is on is recorded. * Changing a price doesn't recalculate previously recorded estimates. * Estimates don't include cache-write premiums, provider discounts, batch pricing, or currency conversion. * Some retries and failed requests might not be recorded. * Estimates might differ from the amount billed by the provider. ### Usage limits {#usage-limits} You can set a cost limit per AI profile (optional). There are two kinds of limits, and you can set both. | Item {.nowrap} | Description | | --- | --- | | **Profile limit** | A limit on total usage for this profile. | | **Per-user limit** | A limit on usage started directly by each user. Usage through a [workflow](../../features/workflow/overview) or [API key](../access-and-security/api-key) isn't included. | Specify the amount in USD, and choose a period of **Monthly**, **Weekly**, or **Daily**. Periods must be unique within a scope. You can set up to 3 limits per scope. See [Limits](../../reference/limits#fixed-limits). Periods reset on the UTC calendar, and weeks start on Monday. When any limit is reached, new runs with that profile are rejected. The error includes the reset time in UTC. If you set multiple periods, exceeding any one of them stops new runs. The check runs before a turn starts. An in-progress turn may finish even if it would exceed the limit. * **Custom**: You can configure limits when **Cost tracking** is on. Limits use estimated cost. Turning tracking off means limits are no longer applied, but saved limit settings are kept. * **Managed**: Configure limits under **Usage limits**. Limits use the billed cost of this profile. This is independent of the workspace monthly usage limit; whichever is reached first stops new runs. ### Start screen You can configure the welcome text shown when a chat starts, and suggested prompts (optional). ## Constraints {#constraints} * The maximum number of AI profiles in a workspace (Managed and Custom combined) depends on your contract (see [Limits](../../reference/limits#plan-limits); you can check this from [global nav](../../guide/screen-layout) > **Workspace settings** > **Usage**). --- --- url: 'https://docs.codatum.com/workspace/codatum-ai/agent-usage.md' description: Check AI agent session and token usage --- # Agent usage (Beta) You can check session and token usage for the [AI agent](../../features/ai-agent/overview). Open it from [global nav](../../guide/screen-layout) > **Workspace settings** > **Agent usage**. Only workspace owners can view it ([Workspace permissions](../../permissions/workspace)). ::: info This feature is in **beta**. The specification might change without notice. ::: Usage data is retained for 30 days ([Limits](../../reference/limits#fixed-limits)). Usage under your contract can be checked from workspace settings > **Usage**. ## Period and filters {#period-filters} You can choose the **period** from the following (default is **Last 30 days**). | Period {.nowrap} | Description | | --- | --- | | **Last 24 hours** | The most recent 24 hours | | **Last 7 days** | The most recent 7 days | | **Last 30 days** | The most recent 30 days | | **Custom range** | Specify a start and end date | From **Add filter**, you can narrow results by the following conditions. | Filter {.nowrap} | Description | | --- | --- | | **Account** | Filter by user or API key | | **User type** | **Member** / **Guest** | | **Report** | Filter sessions that used a report as context | | **AI profile** | Filter by the [AI profile](./ai-profile) used | | **Source** | Filter by where the session was launched from | | **Final status** | **Completed** / **Aborted** / **Error** | The available sources are as follows. | Source {.nowrap} | Description | | --- | --- | | **Full page** | Sessions launched from [global nav](../../guide/screen-layout) > **AI Agent** | | **Side panel** | Sessions launched from **AI Agent** at the bottom right of the screen | | **API** | Sessions launched through the API | | **Slack** | Sessions launched from Slack | ## Overview {#overview} The **Overview** tab shows the following. | Display | Description | | --- | --- | | **Sessions** / **Active users** / **Turns** / **Total tokens** | Totals for the selected period | | **Daily trend** | Usage broken down by AI profile. You can switch between **Sessions** / **Tokens** | | **By AI profile** | Token distribution | | **Account ranking** | Ranked by token usage | ## Sessions {#sessions} The **Sessions** tab lists sessions that match the selected period and filters. Scroll down the list to load more. Select a row to open **Session details**. ### List | Column {.nowrap} | Description | | --- | --- | | **Date** | When the session started | | **Title** | The session title. If unset, **Untitled session** is shown | | **User** | The user, API key, or workflow that started the session | | **AI profile** | The [AI profile](./ai-profile) used | | **Source** | The same categories as in [Source](#period-filters) | | **Turns** | The number of turns in the session | | **Tokens** | The total tokens consumed by the session | | **Final status** | **Completed** / **Aborted** / **Error** | | **Average score** | The average task achievement and execution quality across scored turns, each shown to one decimal place. `-` is shown when the session has no scored turns. | ### Session details {#session-details} **Session details** includes **Session information** and **Turns**. #### Session information | Item {.nowrap} | Description | | --- | --- | | **Date** | When the session started | | **Title** | The session title. If unset, **Untitled session** is shown | | **User** | The user, API key, or workflow that started the session | | **AI profile** | The AI profile used. Existing profiles link to their settings page | | **Source** | Where the session was launched from | | **Page title** | Shown when the source is **Side panel**. The title of the page that was open when the session started | | **Turns** | The number of turns in the session | | **Tokens** | The total tokens consumed by the session | | **Final status** | **Completed** / **Aborted** / **Error** | | **Last updated** | When the session was last updated | | **Session ID** | The session identifier | | **Audit logs** | Shown to Workspace Owners. **Session activity** opens the [audit logs](../access-and-security/audit-log) for operations on the session, and **Actions by the agent** opens those for operations the agent performed in the session. | #### Turns For each turn, you can check the following. | Column {.nowrap} | Description | | --- | --- | | **Turn** | The turn number | | **Started** | When the turn started | | **Ended** | When the turn ended | | **Messages** | The number of messages in the turn | | **Tokens** | The tokens consumed by the turn | | **Score** | For scored turns, task achievement and execution quality are each shown on a scale of 1 to 5. **Error** / **Aborted** / **Incomplete** / **Skipped** is shown when scoring did not complete. `-` is shown when no score is available. | Turns with stored message logs can be expanded. Expanding a turn shows **User** / **AI Agent** message text and tool calls (name, duration, and **Succeeded** / **Aborted** / **Failed**). Message logs are stored when **Save conversations to logs** is on for the [AI profile](./ai-profile) used. For sessions where it was off, a notice below the turns list explains that message logs weren't stored. --- --- url: 'https://docs.codatum.com/workspace/external-integrations/agent-connectors.md' description: >- Connections to external services used by AI agents, MCP clients, and inline tables --- # Agent connectors (Beta) Agent connectors make tools and APIs from external services available to the [AI agent](../../features/ai-agent/overview) and MCP clients. In workspaces where [inline tables](../../features/notebook/inline-table) are available, you can also use them as sources and write destinations for inline tables. You can create and manage them from [global nav](../../guide/screen-layout) > **Workspace settings** > **Agent connectors**. A member can use a connector only when they are listed in [Admins and users](#sharing). To use it from the AI agent, **Connector access** in the [AI profile](../codatum-ai/ai-profile#tool-permissions) must also allow it. AI profiles don't apply when the connector is used from inline tables ([looking up values from a connector](../../features/notebook/inline-table#connector-reference) and [writing to Google Sheets](../../features/notebook/inline-table#write-google-sheets)). ::: info This feature is in **beta**. The specification might change without notice. ::: ## Using connectors from MCP clients {#mcp-gateway} Codatum can act as a gateway that lets MCP clients use external services registered as agent connectors. You don't need to configure the external service credentials in the MCP client. Available operations depend on the connected user's permissions, the connector's [Admins and users](#sharing), the `connector:execute` scope approved for the Codatum MCP connection, and **Connector access** in the selected MCP access profile. **Connector access** from an AI Profile doesn't apply to direct MCP calls. See [MCP client settings](./mcp) for connection and scope details. ## Creating and managing {#create-manage} You need the [**External integrations**: Manage](../access-and-security/roles#permissions-other) permission to create connectors. Workspace Owners and users whose custom role has this permission have it. The connector's [admins](#sharing) can edit or delete an existing connector. 1. Open [global nav](../../guide/screen-layout) > **Workspace settings** > **Agent connectors**. 2. Select **Personal auth connectors** or **Shared auth connectors**. * Under **Personal auth connectors**, each user uses their own external service account and permissions. * Under **Shared auth connectors**, the workspace shares the same credentials, such as a service account or API key. * In both catalogs, [Admins and users](#sharing) control who can use a connector. For use from the AI agent, **Connector access** in AI profiles narrows it further. 3. Choose a built-in connector from the selected catalog. * Enter a service name in `Search by service name...` to find connectors. * You can filter by the following conditions: * Category (**Collaboration** / **Sales & Marketing** / **Engineering** / **Data & Analytics** / **Operations**) * Market (**Global** / **Japan**) * Connector type (**MCP** / **API**) * Status (**Live-tested** / **Not live-tested** / **Upon request**) * Inline tables (**Import** / **Export**). This filter appears only in workspaces where [inline tables](../../features/notebook/inline-table) are available. For details, see [Inline table support](#inline-table). * Filters start unselected and show every connector in the selected catalog. * If you don't enter a search term or select a category, the catalog shows **Popular connectors** and then connectors grouped by category. * When you start a search, the catalog shows only matching connectors grouped by category. * The same service can appear in both catalogs. * The bottom of each card shows the type (**MCP** / **API**). * Connectors that Codatum has tested show **Live-tested** with a check icon. 4. Review its description, authentication method, and official website in the catalog detail. * Administrators and developers can expand **Connection details** to view technical information for the selected catalog. * Its values are paired with explicit labels such as **Authentication method**, **OAuth client registration**, **OAuth App**, and **Credentials**. * **Access in Codatum** links to the AI profile settings. * In workspaces where inline tables are available, **Inline tables** shows whether the connector supports importing and exporting. For details, see [Inline table support](#inline-table). * If the connector is available for self-service setup, select **Install connector**. * A connector marked **Verification pending** can't be added until live testing is complete. * To request access, select **Contact us** on its detail page. * If it's marked **Upon request**, also select **Contact us** on the detail page. * Confirm the connector and request type, enter optional details, then select **Submit request**. * For a destination not in the catalog, select **Create custom connector** to configure an MCP URL or API manually. 5. If **Required setup before connecting** appears on the connection settings page, complete those instructions. Enter the connector settings, then select **Create**. * For a personal OAuth MCP connector, you can then select **Connect and set up** or **Set up later**. * **Connect and set up** authenticates your account and completes connector readiness. * **Set up later** opens the connector details without authenticating. 6. Use **Installed** to view, edit, or delete created connectors. * Catalog cards and details show **Installed** when the same connector already exists in that authentication catalog. * **Installed connectors** on the detail page lists the existing connectors. * Select a connector in the list to review its settings. * A Workspace Owner can select **Audit logs** on the connector details to open the [audit logs](../access-and-security/audit-log) for operations on the connector, including tool calls. * To add another instance of the same connector, select **Install another** below the list. ## Admins and users {#sharing} Use **Admins and users** on the connector create and edit pages to manage who can manage the connector and which members and groups can use it. By default, all **Workspace members** are included as **User**, and the member who created the connector is added as **Admin**. A listed member still can't use the connector from the AI agent unless **Connector access** in the AI profile allows it. | Target {.nowrap} | Description | | --- | --- | | **Workspace owners** | Always included as **Admin** (fixed) | | Custom roles that manage external integrations | Custom roles with the [**External integrations**: Manage](../access-and-security/roles#permissions-other) permission. Roles assigned to at least one member are shown by role name. Always included as **Admin** (fixed) | | **Workspace members** | Grants access to all users and service accounts except guests | | Group / individual members | Add from **Add group or member**. Choose the role: **Admin** or **User** | * **Admin**: can use the connector and also edit, delete, manage its admins and users, register or remove shared credentials, and refresh tools. * **User**: can use the connector. To use it from the AI agent, the AI profile must also allow it. * **Users** can use the connector to [look up values from a connector](../../features/notebook/inline-table#connector-reference) and [write to Google Sheets](../../features/notebook/inline-table#write-google-sheets) in inline tables without AI profile permission. * With a shared auth connector, **Users** can read, as an inline table source, any data the shared credentials can access. For what each connector can read, see [Looking up values from a connector](../../features/notebook/inline-table#connector-reference) in inline tables. With **Google Sheets** (API), when **Allow writing from inline tables** is turned on, they can [write an inline table](../../features/notebook/inline-table#write-google-sheets) to any spreadsheet shared with the service account as an **Editor**. AI profiles can't limit this, so limit who's a **User** in [Admins and users](#sharing). * Once a **User** adds a source file (the sheet, file, app, or data source a source points to) to an inline table, editors of that notebook can also change which of its columns and rows the table references. The values of the columns and rows they set come into the table when someone who can read the source file [refreshes](../../features/notebook/inline-table#connector-reference) it. * Service accounts can't be added to personal auth connectors. * When you remove a member from users, their personal authentication is deleted. If you add them again, each member needs to authenticate again. * Members not listed in Admins and users see **No access** in the connector details header. For personal auth connectors, **Your connection** shows **You do not have permission to use this connector. Ask a connector admin to add you as a user.** and they can't start personal authentication. * Connector admins can also review the list under **Admins and users** on the connector details. ## Connectors managed in Slack integration {#managed-slack} Connecting a Slack workspace in **Workspace settings** > **Slack integration** automatically adds a shared Slack connector. You don't need to enter a token or authenticate each user separately. To use it from the AI agent, allow the connector individually or select **All connectors** under **Connector access** in an AI Profile. The member must also be listed in the connector's [Admins and users](#sharing). Slack integration settings show the number of AI Profiles that can use the connection. Select the count to view the connector details and the list of AI Profiles. If permissions are missing, Slack integration settings show a notice and **Update permissions**. Re-authenticate to grant the additional permissions. Operations covered by existing permissions remain available before the update. **Allow Codatum Agent to start from Slack** controls whether you can start Codatum Agent from Slack. AI Profiles with connector access can use the Slack connector even when this setting is off. When you send a message to the AI agent from Slack, the agent adds an 👀 reaction to acknowledge it. While working, the agent briefly states what it is about to do, and a single progress card in the thread collects the tools it ran. The card heading shows the current activity, such as "Running SQL". When the agent finishes, the card heading shows the number of tools run, and the answer appears. If approval is required, the progress display ends and a separate message asks for your confirmation. If you continue a conversation started from Slack in Codatum, the agent doesn't post the progress, answer, or approval requests for messages you send in Codatum to the Slack thread. When you reply in the Slack thread, the agent posts the results for that message to the thread. With a built-in Slack connector (managed in Slack integration, or registered with a bot token), the AI agent can use tools that complete a Slack operation in a single run: posting a message, sharing a file, and searching channels. Specify the channel as `#name` or a channel ID. The bot joins public channels automatically. To send to a private channel, invite the bot to the channel first. Like other connector tools, these tools ask for approval according to the [approval mode](../../features/ai-agent/overview#operation-modes). If you select **Always allow** when asked, the agent runs the same operation without asking after that. The connector is labeled **Managed in Slack integration**. You can't change its name, credentials, or enabled state, or delete it from connector settings. Select **Edit** to change the overview, skill docs, and [Admins and users](#sharing). Select **Open Slack integration** to manage the connection. If updating the connector fails after connecting or re-authenticating, you return to Slack integration settings with an error. Re-authenticate to try again. A failed connector update during disconnection also displays an error. The Slack connection change is already saved. The connector update is not retried automatically. Disconnecting Slack leaves the connector disabled. Reconnecting after disconnection adds a new connector, which you must allow again in AI Profiles that use an individual allow list. Re-authenticating an existing connection or changing the permission to start Codatum Agent from Slack preserves connector permissions and the overview and skill doc settings. The AI agent can export a Canvas as PDF or HTML and send it to a Slack channel. Files are limited to 50 MB. See [Limits and constraints](../../reference/limits#fixed-limits). Exported files are available in the same conversation for the session's retention period. The AI agent can run refreshable and interactive reports, export published pages as PNG or PDF, and send the files. Running and exporting require publish permission on the source notebook and the connections included in the output. The saved results in the report remain unchanged. Interactive reports also accept parameter values for the run. Timestamps in exported files are displayed in the timezone specified for the report run (UTC if not specified). Sending uses the connector access permissions, the [approval mode](../../features/ai-agent/overview#operation-modes), and [**Allowed without asking**](../../features/ai-agent/overview#user-settings). ## Downloading files with API connectors {#file-download} The AI agent can download files from external services, such as Google Drive files, with **API** connectors. Like [attached files](../../features/ai-agent/overview#attach-files), downloaded files can be read by the AI agent and sent to other connectors. * Each downloaded file can be up to 10 MB. * The AI agent can read the contents of CSV, TSV, TXT, Markdown, JSON, PDF, and Excel (.xlsx) files. For PDF and Excel files, what the agent reads and the limits are the same as for [attaching files](../../features/ai-agent/overview#attach-files). * Files whose contents the agent can't read, such as images and password-protected PDFs, are still saved. You can send them to other connectors. * Downloaded files are stored in Codatum for the session's retention period. * Like other connector operations, downloading uses the connector access permissions and the [approval mode](../../features/ai-agent/overview#operation-modes). When a tool of an **MCP** connector returns a file, the file is saved to the session in the same way, and the AI agent can read its contents or send it to other connectors. The readable formats and the retention period are the same as above. ## Prompt injection protection {#content-screening} Codatum applies protection against malicious instructions aimed at the AI agent (prompt injection) to content retrieved with a connector, such as tool and API responses and downloaded files. Content that may contain malicious instructions isn't passed to the AI agent. In that case, the AI agent can't read that content. Register only trusted destinations as custom connectors. The tool definitions and descriptions that a destination provides affect how the AI agent behaves. ## Types {#types} | Type {.nowrap} | Description | | --- | --- | | **MCP** | Connects to an MCP server and uses its published tools | | **API** | Calls an HTTP API directly | When creating a custom connector, you can choose **MCP** or **API** under **Connector type**. For built-in connectors, the type is already fixed. ## Settings {#settings} Some items aren't shown, depending on the type and authentication method. | Item {.nowrap} | Description | | --- | --- | | **Connector type** | Select **MCP** or **API** when you create a custom connector. | | **Name** | The connector's display name | | **Enabled** | Turning this off disables the connector. | | **Authentication scope** | For a custom API that uses API key / token authentication, select **Workspace** or **Personal**. Manually configured APIs that use OAuth use personal authentication. | | **Server URL** | The connection URL for a custom MCP connector. You can't change it after creation. It isn't shown for built-in connectors. | | **Authentication method** | For MCP, select a method supported by the connector: **Personal (OAuth)**, **Personal (API key / token)**, or **Workspace (API key / token)**. | | **OAuth client (required)** / **OAuth client (optional)** | The client ID and client secret used for OAuth authentication. Whether they're required depends on the connector. | | **OAuth scopes (required)** / **OAuth scopes (optional)** | The scopes requested for OAuth authentication. For a built-in API, the connector definition fixes these scopes. | | **Request headers** | The HTTP header templates used for MCP API key / token authentication. They come from the built-in connector and can't be changed | | **Endpoint prefix** | The base URL for a custom API. You can't change it after creation. It isn't shown for built-in connectors. | | **Additional allowed URL prefixes (optional)** | In **Additional settings** for a custom API, enter [up to 10](../../reference/limits#fixed-limits) HTTPS URL prefixes, one per line. You can edit them after creation. Requests to these destinations do not include connector credentials. | | **Secret keys** | The key names and values used for API or MCP API key / token authentication. For a built-in connector, follow the hint shown for each key. Values are expanded into the request header templates | | **Allow writing from inline tables** | Appears when you edit a **Google Sheets** (API) connector with shared authentication. Off by default. When it's on, **Users** can [write inline tables](../../features/notebook/inline-table#write-google-sheets) to any spreadsheet shared with the service account as an **Editor**. To limit which spreadsheets can be written to, limit what you share with the service account | | **Overview** | Available under **Additional settings**. This short description is always passed to the agent while the connector is enabled. For a built-in connector, you can turn **Default overview** on or off, and the overview you add is passed after the default overview. The overview you add can be [up to 1,000 characters](../../reference/limits#fixed-limits). | | **Skill docs** | Available under **Additional settings**. These detailed instructions are loaded only when the agent needs them. For a built-in connector, you can turn each default skill doc on or off. Select **Add skill doc** to add skill docs with a title and body, [up to 10 docs](../../reference/limits#fixed-limits). Titles can be up to 100 characters, and each body up to 20,000 characters. For a [connector managed in Slack integration](#managed-slack), Codatum handles authentication, so the default skill doc for bot token authentication isn't listed or passed to the agent. | | **MCP server instructions** | Shown in the **Skill docs** list for an MCP connector when the MCP server provides instructions. You can't edit the text. Only the [first 4,000 characters](../../reference/limits#fixed-limits) are passed to the agent. Turn it off to stop passing the instructions to the agent. | | **Admins and users** | Members who can manage the connector, and members and groups who can use it. See [Admins and users](#sharing). | Some built-in API connectors show additional settings that identify the connection target, such as **Organization slug** for Sentry. Follow the hint shown for each item. You can change these values after creation. The agent can't use the connector until they are set. For OAuth authentication, the OAuth client and OAuth scopes appear with the other primary settings. * For MCP, if the OAuth client is blank and the MCP server supports it, Dynamic Client Registration is used. * For MCP, if OAuth scopes are blank, the scopes advertised by the server are requested. * If a built-in MCP connector predefines OAuth scopes, the scopes field can't be left empty. * Manually configured API OAuth requires the client ID, client secret, and OAuth scopes shown by the built-in connector. For built-in connectors that can't use Dynamic Client Registration, a workspace administrator creates an OAuth app with the provider and enters its client ID when a Codatum shared app isn't available. This applies to the following providers: * Google * Microsoft * GitHub * HubSpot * Salesforce * Box * Asana * Slack * PagerDuty * Gong * Front * Gainsight CS * Dropbox The following providers also require a client secret: * Google * GitHub * HubSpot * Box * Asana * Slack * PagerDuty * Gong * Front * Gainsight CS For MCP, when a Codatum shared app is available, leave the OAuth client fields blank, or enter your own app credentials to override it. Manually configured API OAuth requires the credentials of the app shown by the built-in connector. Google Workspace MCP uses a Developer Preview feature with your own OAuth app. Before using it, confirm its current availability and requirements with Google. Google's user data policy (Limited Use) doesn't allow Google Workspace data to be used to train or improve generalized AI or machine learning models. Codatum-managed AI models meet this requirement. For AI profiles that use your own API key, use an AI service plan and settings that don't use input data for training. For live-tested connectors that support your own app, the creation form shows the following: * The app creation page * App type * Required values * Official setup guide For MCP, set the app's redirect URI (callback URL) to `https://app.codatum.com/oauth/mcp/callback`. For API, use `https://app.codatum.com/oauth/direct-api/callback`. How credentials are handled depends on the catalog you select. * Under **Personal auth connectors**, each user connects with their own OAuth account or API key / token. * Changing the OAuth client or OAuth scopes disconnects existing personal authentication and requires each user to reconnect. * Under **Shared auth connectors**, the workspace shares credentials registered by a connector admin. * Personal-scope authentication is managed under **Connector authentication** in [account settings](../../account/overview#account-settings). * When a member is removed from [Admins and users](#sharing), their personal authentication is deleted. ## Inline table support {#inline-table} In workspaces where [inline tables](../../features/notebook/inline-table) are available, **Inline tables** on the catalog details and the connector details shows whether the connector supports importing to and exporting from inline tables. Importing means [looking up values from a connector](../../features/notebook/inline-table#connector-reference), and exporting means [writing to Google Sheets](../../features/notebook/inline-table#write-google-sheets). Connectors that don't relate to inline tables don't show it. | Value {.nowrap} | Description | | --- | --- | | **Import** | You can use the connector as a source. The connectors you can use as sources are listed in [Looking up values from a connector](../../features/notebook/inline-table#connector-reference). This value appears for those that don't show **Import and export**. | | **Import and export** | You can use the connector as a source and as a destination to write to. Applies to the MCP version of **Google Sheets** and to **Google Sheets** (API) with shared authentication. | | **Not supported** | Appears for the MCP version of **Notion**. Inline tables use the API connector of **Notion**. | The MCP version of **Google Sheets** writes with the permissions of each user's connected Google account, so no permission from the admin is needed. It can write only to spreadsheets that the Google account can edit. With **Google Sheets** (API) with shared authentication, you can't export until **Allow writing from inline tables** (see [Settings](#settings)) is turned on for the connector. The catalog details note that you allow it in Edit after installing. When it's off, the connector details show **Import** and note that a connector admin can allow it in Edit. In the catalog filter, **Import** shows every connector you can use as a source, and **Export** shows the connectors you can write to. ## Readiness and connection status {#setup-status} In the connector list, **Readiness** shows the state of the connector as a whole. **Your connection** shows the current user's state. Neither state must be completed before the other. For a connector under **Personal auth connectors**, readiness is complete when a connector admin connects their credentials and loads the tools. For a connector under **Shared auth connectors**, readiness is complete when a connector admin registers the shared credentials and loads the tools. ### Readiness For API connectors, workspace readiness is **Available** when the connector is enabled and, for organization scope, shared credentials are registered. | Display {.nowrap} | Description | | --- | --- | | **Disabled** | The connector is disabled. | | **Not ready** | The connector isn't ready for use. | | **Available** | The connector is ready for use. | | **Action required** | Connection or readiness failed. The detail page shows an error category and the time of the check. | ### Your connection | Display {.nowrap} | Description | | --- | --- | | **Not connected** | Select **Authenticate** under **Your connection** for OAuth, or register an API key / token under **Connector authentication** in account settings. | | **Connected** | The current user has completed personal authentication. | | **Not required** | The connector uses shared workspace credentials instead of personal authentication. | ### Member connections {#member-connections} Users with the [**Workspace settings**](../access-and-security/roles#permissions-workspace) permission, including Workspace Owners, can see who has connected personal credentials. The list **Member count** column shows how many people have connected personal credentials. Shared auth connectors show `—`. **Installed connectors** on a catalog detail page shows the same count. **Member connections** on the connector detail page shows the following: | Item {.nowrap} | Description | | --- | --- | | **Member** | The user who connected personal credentials | | **Connected** | When the personal credentials were connected | | **Last used** | When this connector was last used with that user's credentials. Unused connections show **Not used**. | Shared auth connectors don't show who used them. Connector admins can see **Last used** for the shared workspace credentials on the detail page. Unused credentials show **Not used**. Connectors [managed in Slack integration](#managed-slack) don't show last used. ## When action is required {#setup-error} 1. Review the error under **Readiness** on the connector detail page. 2. Correct the OAuth app or MCP server settings. 3. If personal OAuth authentication isn't complete, select **Authenticate** in the **Your connection** section. For a personal API key / token, open **Connector authentication** in account settings and register it. 4. If you're authenticated and are a connector admin, select **Retry setup**. Otherwise, ask a connector admin to complete readiness. ## When Datadog authentication fails {#datadog-auth} The Datadog connector requires the **Datadog site** selected at creation to match the site of the target Datadog organization. 1. If the authorization screen shows "Mismatching redirect URI", a Datadog admin of the target organization must enable **MCP Access** under **Organization Settings** > **Preferences** and add `https://app.codatum.com/oauth/mcp/callback` to **MCP OAuth Redirect URLs** 2. If authentication fails at the end, when returning to Codatum, the connector's Datadog site doesn't match the organization's site. Check the **Site** shown on the Datadog sign-in and organization switcher screens. Custom subdomain URLs such as `example.datadoghq.com` don't indicate the site 3. You can't change the Datadog site after creation. If it doesn't match, delete the connector and re-create it with the correct site ## When the KARTE MCP connector doesn't work {#karte-mcp} The KARTE MCP connector uses the token of an app of type **MCP** created in KARTE's **APIv2設定** (API v2 settings). To create the app, see KARTE's [Remote MCP connection guide](https://support.karte.io/post/r4rONVdbEItueoEUJmg9Z) (Japanese). 1. If setup shows **Action required**, check the HTTP status in the error. 401 means the token is wrong or revoked. 400 means the token belongs to an app whose type isn't **MCP**. You can't tell the type from the token, so check the type in the app list of KARTE's API v2 settings 2. If the AI agent says a scope is missing, add the scope for that operation (the one ending in -rev2) to the KARTE app. The added scope takes effect immediately, with no change needed in Codatum. The tool list shows every tool regardless of the app's scopes 3. If **MCP** isn't offered as a type when creating an app in KARTE, ask KARTE support to make MCP available for the project ## Built-in connectors {#built-in} The following built-in connectors appear in the catalog. This list may be added to or changed without notice. Connectors marked **Upon request** aren't currently available for self-service setup. The detail page shows the verification status as **Live-tested** or **Not live-tested**. * Codatum has tested connectors marked **Live-tested** with a live service account. * Connectors marked **Not live-tested** are based on official specifications but can't be added until Codatum completes live testing. You can request access from the connector detail page. ### Collaboration {#collaboration} | Name | Type | Connection | Description | | --- | --- | --- | --- | | **Linear** | API | Organization client credentials · Live-tested | Retrieves issues, projects, teams, and more. | | **Airtable** | API | Organization service account · Not live-tested | Retrieves bases, tables, records, fields, and more that the service account can access. | | **Notion** | MCP | Personal OAuth · Live-tested | Connects to workspace search, page operations, and content editing available to the authenticated user. | | **Notion** | API | Organization internal connection token · Live-tested | Retrieves pages, data sources, and users shared with an internal connection. Can also be used as a [source of an inline table](../../features/notebook/inline-table#connector-reference). | | **Atlassian** | MCP | Personal OAuth · Live-tested | Connects to Jira issues and the Confluence knowledge base. | | **Google Drive** | MCP | Personal OAuth · Own app · Google Developer Preview · Live-tested | Connects to Google Drive files and Workspace documents. .csv and .xlsx files and Google Sheets spreadsheets can also be used as a [source of an inline table](../../features/notebook/inline-table#connector-reference) (read-only). | | **Gmail** | MCP | Personal OAuth · Own app · Google Developer Preview · Live-tested | Connects to Gmail messages, threads, and drafts. | | **Google Calendar** | MCP | Personal OAuth · Own app · Google Developer Preview · Live-tested | Connects to Google Calendar calendars and events with read-only access. | | **Google Docs** | MCP | Personal OAuth · Own app · Google Developer Preview · Live-tested | Connects to reading and updating Google Docs. | | **Google Sheets** | MCP | Personal OAuth · Own app · Google Developer Preview · Live-tested | Connects to reading and updating Google Sheets. Can also be used as a [source of an inline table](../../features/notebook/inline-table#connector-reference) and as a [destination to write an inline table to](../../features/notebook/inline-table#write-google-sheets). | | **Google Slides** | MCP | Personal OAuth · Own app · Google Developer Preview · Live-tested | Connects to reading and updating Google Slides. | | **Google Chat** | MCP | Personal OAuth · Own app · Google Developer Preview · Live-tested | Connects to Google Chat spaces and messages. | | **Google Docs** | API | Organization service account · Live-tested | Retrieves Google Docs shared with the service account. | | **Google Docs** | API | Personal OAuth · Own app · Live-tested | Retrieves Google Docs available to the authenticated user with read-only access. | | **Google Drive** | API | Organization service account · Live-tested | Retrieves files and folders shared with the service account. .csv and .xlsx files and Google Sheets spreadsheets can also be used as a [source of an inline table](../../features/notebook/inline-table#connector-reference). | | **Google Drive** | API | Personal OAuth · Own app · Live-tested | Retrieves files and folders available to the authenticated user with read-only access. .csv and .xlsx files and Google Sheets spreadsheets can also be used as a [source of an inline table](../../features/notebook/inline-table#connector-reference). | | **Google Sheets** | API | Organization service account · Live-tested | Retrieves Google Sheets shared with the service account. Can also be used as a [source of an inline table](../../features/notebook/inline-table#connector-reference) and as a [destination for writing an inline table](../../features/notebook/inline-table#write-google-sheets). | | **Google Sheets** | API | Personal OAuth · Own app · Live-tested | Retrieves Google Sheets available to the authenticated user with read-only access. Can also be used as a [source of an inline table](../../features/notebook/inline-table#connector-reference). | | **Google Slides** | API | Organization service account · Live-tested | Retrieves Google Slides presentations shared with the service account. | | **Google Slides** | API | Personal OAuth · Own app · Live-tested | Retrieves Google Slides available to the authenticated user with read-only access. | | **Google Calendar** | API | Personal OAuth · Own app · Live-tested | Retrieves calendars and events available to the authenticated user with read-only access. | | **Gmail** | API | Personal OAuth · Own app · Live-tested | Retrieves the authenticated user's messages, threads, labels, and drafts with read-only access. | | **Google Chat** | API | Personal OAuth · Own app · Live-tested | Retrieves spaces and messages available to the authenticated user with read-only access. | | **Microsoft Outlook Calendar** | MCP | Personal OAuth · Own app · Live-tested | Connects to Outlook calendar. | | **Microsoft Outlook Mail** | MCP | Personal OAuth · Own app · Live-tested | Connects to Outlook mail. | | **Microsoft OneDrive** | MCP | Personal OAuth · Own app · Live-tested | Connects to OneDrive files. | | **Microsoft SharePoint** | MCP | Personal OAuth · Own app · Live-tested | Connects to SharePoint sites, lists, and files. | | **Microsoft Teams** | MCP | Personal OAuth · Own app · Live-tested | Connects to Teams chats and channels. | | **Microsoft User Directory** | MCP | Personal OAuth · Own app · Live-tested | Connects to Microsoft 365 user profiles and org structure. | | **Microsoft Word** | MCP | Personal OAuth · Own app · Live-tested | Connects to Word documents. | | **Slack** | API | Organization bot token · Live-tested | Operates on channels, messages, users, and more. | | **Workato** | MCP | Personal OAuth · Live-tested | Connects to recipe-derived tools and business automation context. | | **Composio Connect** | MCP | Organization consumer API key / Personal OAuth · Live-tested | Connects to many apps through Composio Connect. | | **Linear** | MCP | Personal OAuth · Live-tested | Connects to Linear issues and projects. | | **Airtable** | MCP | Personal OAuth · Live-tested | Connects to Airtable bases and records. | | **Asana** | MCP | Personal OAuth · Own app · Live-tested | Connects to Asana tasks and projects. | | **Asana** | API | Organization service account · Not live-tested | Retrieves workspaces, projects, and tasks. | | **Box** | MCP | Personal OAuth · Own app · Live-tested | Connects to Box files. | | **Canva** | MCP | Personal OAuth · Upon request | Connects to Canva designs. | | **Egnyte** | MCP | Personal OAuth · Live-tested | Connects to Egnyte files. | | **Fireflies** | MCP | Personal OAuth · Live-tested | Connects to Fireflies transcripts. | | **Miro** | MCP | Personal OAuth · Live-tested | Connects to Miro boards. | | **monday.com** | MCP | Personal OAuth · Live-tested | Connects to monday.com boards. | | **Granola** | MCP | Personal OAuth · Live-tested | Connects to Granola meeting notes. | | **Slack** | MCP | Personal OAuth · Own app · Live-tested | Connects to messages, channels, files, users, canvases, and lists. | | **ClickUp** | MCP | Personal OAuth · Live-tested | Connects to tasks, lists, folders, documents, and chat. | | **Dropbox** | MCP | Personal OAuth · Own app · Live-tested | Connects to files, folders, search, sharing, and file requests. | | **Shortcut** | MCP | Personal OAuth · Live-tested | Connects to stories, epics, and iterations. | | **Sunsama** | MCP | Personal OAuth · Live-tested | Connects to tasks, daily plans, calendar events, and channels. Requires a Sunsama Pro plan. | | **kintone** | API | Organization API token · Live-tested | Connects to records and operational data in configured apps. Can also be used as a [source of an inline table](../../features/notebook/inline-table#connector-reference). | | **Chatwork** | API | Personal API token · Live-tested | Connects to rooms, messages, members, and tasks. | | **Backlog** | API | Personal API token · Upon request | Connects to projects, issues, wikis, and users. | | **ANDPAD** | API | Organization OAuth client · Upon request | Connects to construction and project data. | | **microCMS** | API | Organization API key · Upon request | Connects to content and schemas. | | **TimeRex** | API | Personal OAuth client · Upon request | Connects to scheduling data. | ### Sales & Marketing {#sales-marketing} | Name | Type | Connection | Description | | --- | --- | --- | --- | | **HubSpot** | API | Organization Account Service Key · Live-tested | Retrieves CRM contacts, companies, deals, tickets, and more. | | **KARTE** | API | Organization access token · Live-tested | Reviews and edits KARTE campaigns, actions, and segments through KARTE API v2. | | **KARTE** | MCP | Organization MCP app token · Live-tested | Reviews and edits campaigns and actions, and lists segments, with the tools KARTE provides in its official Remote MCP (beta). Each service (campaigns and actions, or segments) has its own endpoint, so create one connector per service. Requires a KARTE API v2 app of type MCP. To edit segments or use other KARTE API v2 operations, use the API connector. | | **Shopify** | API | Organization client credentials · Live-tested | Connects to products, orders, customers, inventory, and more through Shopify Admin API. | | **Intercom** | MCP | Personal OAuth · Live-tested | Connects to conversations, contacts, companies, and Help Center content. | | **Salesforce** | MCP | Personal OAuth · Own app · Live-tested | Connects to Salesforce records and queries. | | **Salesforce** | API | Organization client credentials · Live-tested | Connects to Salesforce REST API through an external client app and a dedicated integration user. | | **HubSpot** | MCP | Personal OAuth · Own app · Live-tested | Connects to HubSpot CRM. | | **Attio** | MCP | Personal OAuth · Live-tested | Connects to Attio CRM. | | **Attio** | API | Organization workspace access token · Live-tested | Retrieves objects, records, lists, and members. | | **Close** | MCP | Personal OAuth · Live-tested | Connects to Close CRM. | | **Semrush** | MCP | Personal API key · Live-tested | Connects to SEO, traffic, backlink, competitor, and project data. | | **Ahrefs** | MCP | Personal OAuth / API key · Live-tested | Connects to SEO, keyword, backlink, and competitor research data. | | **Apollo** | MCP | Personal OAuth · Live-tested | Connects to sales intelligence, prospects, and enrichment. | | **Apollo** | API | Organization API key · Live-tested | Retrieves people, accounts, deals, and saved lists. | | **Gong** | MCP | Personal OAuth · Own app · Not live-tested | Connects to account, deal, contact, and revenue intelligence. | | **Klaviyo** | MCP | Personal OAuth · Live-tested | Connects to profiles, campaigns, flows, segments, and delivery metrics. | | **Klaviyo** | API | Organization private API key · Not live-tested | Retrieves profiles, lists, segments, campaigns, and metrics. | | **Braze** | MCP | Personal OAuth · Upon request | Connects to campaigns, Canvases, segments, analytics, and catalogs. | | **Customer.io** | MCP | Personal OAuth · Live-tested | Connects to profiles, campaigns, journeys, and delivery metrics. | | **Front** | MCP | Personal OAuth · Own app · Not live-tested | Connects to conversations, inboxes, contacts, messages, and drafts. | | **Gainsight CS** | MCP | Personal OAuth · Own app · Not live-tested | Connects to companies, CTAs, Success Plans, Timeline, and scorecards. | | **Webflow** | MCP | Personal OAuth · Live-tested | Connects to sites, pages, and CMS content. | | **Wix** | MCP | Personal OAuth · Not live-tested | Connects to sites, CRM, stores, and bookings. | | **Sanity** | MCP | Personal OAuth · Live-tested | Connects to content, datasets, and projects. | | **Sansan** | API | Organization API key · Upon request | Connects to people, business card, tag, and organization data after Open API access is coordinated. | | **BASE** | API | Organization OAuth client · Upon request | Connects to shops, products, and orders after Direct API connectors support OAuth. | | **MiiTel** | MCP | Personal provider-managed authentication · Upon request | Connects to call and meeting analytics after provider coordination. | | **スマレジ** | API | Organization OAuth client · Upon request | Connects to sales, product, customer, and inventory data. | | **Re:lation** | API | Organization API key · Upon request | Connects to inquiries, customers, and messages. | | **STORES** | API | Organization OAuth client · Upon request | Connects to commerce data. | | **SalesNow** | API | Organization API key · Upon request | Connects to company data. | | **Mazrica Sales** | API | Organization API key · Upon request | Connects to accounts, deals, and activities. | | **Upflow** | MCP | Personal OAuth · Live-tested | Connects to opportunities, sales conversations, and customer insights. | | **amptalk analysis** | API | Organization API key · Upon request | Connects to call transcripts, summaries, and analytics. | ### Engineering {#engineering} | Name | Type | Connection | Description | | --- | --- | --- | --- | | **Datadog** | MCP | Personal OAuth / Organization personal access token · Live-tested | Connects to Datadog logs, metrics, traces, incidents, and more. | | **GitHub** | API | Organization personal access token · Live-tested | Retrieves repositories, issues, pull requests, and more. | | **PagerDuty** | API | Organization API key · Live-tested | Retrieves incidents, services, on-call schedules, and more. | | **Sentry** | MCP | Personal OAuth · Live-tested | Connects to issues, projects, events, and more. | | **Sentry** | API | Organization internal integration token · Live-tested | Retrieves projects, issues, and events with an internal integration token and organization slug. | | **GitHub** | MCP | Personal OAuth · Own app · Live-tested | Connects to GitHub repositories, issues, and pull requests. | | **Vercel** | MCP | Personal OAuth · Upon request | Connects to Vercel projects and deployments. | | **Buildkite** | MCP | Personal OAuth · Live-tested | Connects to Buildkite pipelines and builds. | | **Netlify** | MCP | Personal OAuth · Live-tested | Connects to Netlify sites and deployments. | | **Pulumi** | MCP | Personal OAuth · Live-tested | Connects to Pulumi stacks. | | **Pulumi** | API | Organization access token · Not live-tested | Retrieves stacks, update history, and resources. | | **Cursor** | API | Personal API key · Live-tested | Starts a Cloud Agent with the connected user's permissions to implement changes and open pull requests. | | **Cursor** | API | Organization service account or user API key · Live-tested | Starts a Cloud Agent with the API key owner's permissions to implement changes and open pull requests. | | **GitLab** | MCP | Personal OAuth · Live-tested | Connects to projects, issues, merge requests, pipelines, and repositories. | | **Cloudflare** | MCP | Personal OAuth / Organization account API token · Live-tested | Connects to the Cloudflare API. | | **Grafana Cloud** | MCP | Personal OAuth · Live-tested | Connects to metrics, logs, dashboards, alerts, and incidents. | | **PagerDuty** | MCP | Personal OAuth · Own app · Not live-tested | Connects to incidents, services, schedules, and on-call rotations. | | **HENNGE One** | API | Organization client credentials · Upon request | Connects to identity and access data. | ### Data & Analytics {#data-analytics} | Name | Type | Connection | Description | | --- | --- | --- | --- | | **dbt Cloud** | MCP | Personal OAuth · Live-tested / Organization service token · Live-tested | Connects to dbt Cloud's Semantic Layer, Discovery, and development context. | | **Supabase** | MCP | Personal OAuth · Live-tested | Connects to Supabase projects and schema. | | **Neon** | MCP | Personal OAuth · Live-tested | Connects to Neon projects and branches. | | **ThoughtSpot** | MCP | Personal OAuth · Live-tested | Connects to ThoughtSpot analytics. | | **Morningstar** | MCP | Personal OAuth · Not live-tested | Connects to Morningstar financial data. | | **PostHog** | MCP | Personal OAuth · Live-tested | Connects to product analytics, feature flags, experiments, and session recordings. | | **Amplitude** | MCP | Personal OAuth · Live-tested | Connects to analytics, taxonomy, experiments, cohorts, charts, and dashboards. | | **Mixpanel** | MCP | Personal OAuth · Live-tested | Connects to events, funnels, flows, retention, and product analytics. | | **Google Analytics** | API | Personal OAuth · Own app · Live-tested / Organization service account · Live-tested | Connects to Google Analytics 4 reports, realtime data, and reporting metadata. | | **Wicle** | MCP | Personal OAuth · Live-tested | Connects to project settings and product analytics. | | **Hugging Face** | MCP | Personal OAuth · Live-tested | Connects to models, datasets, Spaces, and papers on the Hugging Face Hub. | | **TROCCO** | API | Personal API key · Upon request | Connects to users, transfer jobs, data marts, and workflows. | ### Operations {#operations} | Name | Type | Connection | Description | | --- | --- | --- | --- | | **freee** | MCP | Personal OAuth · Live-tested | Connects to accounting, HR, invoicing, time tracking, and sales operations. | | **マネーフォワード クラウド会計** | MCP | Personal OAuth · Live-tested | Connects to accounting data and operations. | | **Stripe** | MCP | Personal OAuth / Organization restricted API key · Live-tested | Connects to customers, invoices, payments, and document operations. | | **PayPal** | MCP | Personal OAuth · Live-tested | Connects to PayPal payments. | | **Ramp** | MCP | Personal OAuth · Upon request | Connects to Ramp expenses and cards. | | **Paddle** | MCP | Personal OAuth · Live-tested | Connects to billing, subscriptions, and transactions. | | **SmartHR** | API | Organization access token · Live-tested | Connects to employee and HR data. | | **kickflow** | API | Personal API token · Live-tested | Connects to tickets, users, organization charts, and master data. | | **ジョブカン** | API | Organization API key · Upon request | Connects to attendance and back-office data. | | **バクラク** | API | Organization API key · Upon request | Connects to requests, approvals, and expense data after Codatum validates the API integration. | | **kaonavi** | API | Organization client credentials · Live-tested | Connects to members, sheets, departments, users, and other talent management data. | | **LegalOn** | API | Organization API key · Upon request | Connects to contract data. | | **KING OF TIME** | API | Organization API key · Upon request | Connects to attendance, leave, and employee data. | | **Contract One** | MCP | Personal provider-managed authentication · Upon request | Connects to contract data. | --- --- url: 'https://docs.codatum.com/workspace/external-integrations/mcp.md' description: Connecting MCP clients to Codatum and managing OAuth scopes and connections --- # MCP clients (Beta) Codatum provides an MCP (Model Context Protocol) server. By connecting MCP clients such as Claude and Cursor, you can run the [AI agent](../../features/ai-agent/overview), work with data and notebooks, and use external services configured under [Agent connectors](./agent-connectors). ::: info This feature is in **beta**. The specification might change without notice. ::: AI agent runs use the permissions of the connected user. If you [connect as a service account](#connect-as-service-account), they use the service account's permissions. From [global nav](../../guide/screen-layout) > **Workspace settings** > **MCP clients**, you can manage connections. A Workspace Owner can switch between **Client connections** and **Access profiles**. Use **Access profiles** to decide who can connect and the maximum permissions they can use. ## MCP access profiles {#access-profiles} An MCP access profile defines which users, service accounts, and groups can use MCP, the OAuth scopes they can approve, and the Agent connectors they can call directly. A Workspace Owner creates, edits, and deletes profiles under **MCP clients** > **Access profiles**. To delete a profile, clear **Enable this profile**, disconnect every MCP connection that uses the profile, and then select **Delete** from the profile action menu. You can't undo deletion. From the profile action menu, select **Audit logs: profile changes** to open the [audit logs](../access-and-security/audit-log) for operations on the profile, or **Audit logs: actions via this profile** for operations performed through MCP connections that use the profile. You can assign up to 100 users and groups in total to one MCP access profile. For details, see [Limits](../../reference/limits#fixed-limits). MCP management and usage permissions are separate. A Workspace Owner can't connect unless an enabled MCP access profile is assigned to them. Disabling a profile or changing its users, scopes, or connector access affects existing connections. Adding a scope to a profile doesn't expand the scopes previously approved for an existing connection. ## Connecting {#connect} Before connecting, a Workspace Owner must create at least one enabled MCP access profile and make it available to the connecting user. If no access profile is enabled, the page shows **An enabled access profile is required to connect an MCP client.** A Workspace Owner does one of the following on **Access profiles**: * If there are no profiles, select **Create access profile**. * If every existing profile is disabled, select a row, turn on **Enable this profile**, and then select **Save**, or select **New access profile**. 1. Open [global nav](../../guide/screen-layout) > **Workspace settings** > **MCP clients**, and then select **Connect client**. 2. For Cursor, select **Add to Cursor**. For Claude Code, copy and run the displayed command. For other clients, copy and configure the displayed **MCP URL**. The displayed configuration is specific to the current workspace. 3. The MCP client opens the Codatum authorization page in your browser. Sign in and confirm the destination **Workspace**. 4. Confirm the assigned **MCP access profile**. If multiple profiles are available, select one. 5. Select scopes under **Permissions**, and then select **Authorize**. After approval, the connection appears in the connection list. Connections are valid for up to 30 days ([Limits](../../reference/limits#fixed-limits)). Workspace IP access control and multi-factor authentication are checked when you approve the connection. For settings changed after approval, see [Checks by access method](../access-and-security/security#access-control-by-entry-point). Codatum creates a connection for each approved authorization and records the selected MCP access profile. To connect another workspace, repeat steps 1–5 in the destination workspace. If no profile is available, ask a Workspace Owner to assign one. Authorization uses OAuth (authorization code flow with PKCE). No client pre-registration is required; Dynamic Client Registration and Client ID Metadata Documents are supported. ### Connecting as a service account (Preview) {#connect-as-service-account} ::: info This feature is in **preview**. To request access, contact Codatum support. ::: If you [can switch to a service account](../access-and-security/service-account#who-can-switch), select the service account under **Connect as** on the authorization page to connect as that service account. If no service account is available to you, **Connect as** isn't shown. * You can select only MCP access profiles that include the service account. * Operations through the connection use the [service account's permissions](../access-and-security/service-account#permissions), not the permissions of the user who approved it. [Audit logs](../access-and-security/audit-log) also record them as operations by the service account. * If the approving user is removed from the service account's [users](../access-and-security/service-account#users), the connection stops working. * The connection appears in the approving user's **My connections**, and that user can disconnect it. ## Scopes {#scopes} Scopes define the operations the connected MCP client can perform. The authorization page shows only scopes allowed by the selected MCP access profile. The effective scopes are the intersection of the scopes approved for the connection and the scopes currently allowed by the profile. The MCP client dynamically discovers tool names, descriptions, and input and output definitions based on the approved scopes and the signed-in user's Codatum permissions. ### AI agent {#agent-scope} The AI agent scope runs agent sessions with an [AI Profile](../codatum-ai/ai-profile). AI Profile restrictions and Codatum Agent tool approval settings apply. | Scope {.nowrap} | Description | | --- | --- | | `agent:execute` | Create and run AI agent sessions in the connected workspace and read their results. | Depending on the [approval mode](../../features/ai-agent/overview#operation-modes), an agent action can be pending approval. When it is, you can approve or reject it from the MCP client. You can also open the session in Codatum. ### Analysis and notebooks {#analysis-notebook-scopes} Analysis and notebook scopes run catalog, notebook, SQL, and saved query operations directly from the MCP client. Direct calls don't select an AI Profile, so AI Profile-specific restrictions for connections, the current notebook, and tool approvals don't apply. OAuth scopes and Codatum permissions continue to apply. When you select or request an analysis or notebook scope, Codatum automatically adds `support:read` so the client can read the file formats required for analysis. | Scope {.nowrap} | Description | | --- | --- | | `catalog:read` | Search and read connections, schemas, tables, tags, and table annotations in the connected workspace. | | `catalog:write` | Create and update tags and table annotations in the data catalog. | | `catalog:delete` | Delete tags from the data catalog. | | `notebook:read` | Search and read folders, notebooks, and notebook contents in the connected workspace. | | `notebook:write` | Create, edit, move, copy, and rename folders and notebooks. Operations that use a previously read content hash also require `notebook:read`. | | `notebook:delete` | Delete folders and their contents or delete notebooks. | | `sql:execute` | Validate and execute SQL against connected data sources and read query results. Operations that resolve notebook bindings also require `notebook:read`. | | `saved-query:read` | Search and read saved queries. | | `saved-query:write` | Create and update saved queries. | | `support:read` | Read Codatum file format references. Added automatically when you select or request another analysis or notebook scope. | Direct tool calls, including delete operations, don't use Codatum Agent approval settings. SQL that needs to scan more than the **Execution budget (BigQuery)** in [Settings](../../features/ai-agent/overview#user-settings) isn't executed, and an error is returned. `search_catalog_tables` and `search_saved_queries` return all columns by default when called from an MCP client. Set `include_columns: false` to receive matching columns or a preview of the column list. `column_count` is the total column count, and `columns_truncated` indicates that additional matching columns were omitted. Set `include_columns: true` when you need all columns. In search results, `matched` contains highlight excerpts and `returned` is the number of items in the current page. When `has_next` is `true`, pass `next_offset` as the next call's `offset`. `run_sql` returns up to 50 rows by default. Set `limit` to retrieve up to the [retrieval limit](../../reference/limits#fixed-limits) of 1,000 rows. `get_query_result` reads an existing query result. Set `offset` to skip rows from the start and `limit` to choose how many rows to retrieve. For rows beyond the [retrieval limit](../../reference/limits#fixed-limits), use `run_sql` with SQL `OFFSET` or a filter. ### Agent connectors {#agent-connector-scopes} Agent connector scopes use Codatum as a gateway to discover and run operations in external services registered under [Agent connectors](./agent-connectors). The target service must have valid credentials. Connector access from the MCP access profile applies. AI Profile restrictions for agent connectors and Codatum Agent tool approval settings don't apply. | Scope {.nowrap} | Description | | --- | --- | | `connector:execute` | Search and read available operations, input and output definitions, and usage instructions for connected services with valid credentials, and run their operations and API requests. | External service operations with `connector:execute` run under the approved OAuth scope without entering Codatum Agent's approval flow. `external_service_search` returns the external services that match the search terms, grouped by connector. Each connector includes up to 10 tools that match the search terms, and `tool_count` is the total number of its tools. `truncated: true` indicates that part of the result was omitted. When a connector has `truncated: true`, set `connector_id` to retrieve all of its tools. Set `limit` to change the number of connectors returned. See [Limits](../../reference/limits#fixed-limits). Direct tool calls wait up to 50 seconds for completion. Continuing an operation beyond 50 seconds isn't supported. Check the target state before retrying a timed-out write operation. See [Limits](../../reference/limits#fixed-limits). ## Connection list {#connections} On **MCP clients**, you can view **My connections**. Switching to **All connections** can be performed by a Workspace Owner ([Workspace permissions](../../permissions/workspace)). For a Workspace Owner, the connection list is on **Client connections**. | Column {.nowrap} | Description | | --- | --- | | Client | The name of the connected MCP client | | Connected by | The user or service account that made the connection (shown in **All connections**, and in **My connections** when it includes a connection made as a service account) | | Access profile | The MCP access profile applied to the connection. Shows **Deleted profile** when the profile no longer exists. | | Scopes | The operations the connection is allowed to perform ([Scopes](#scopes)) | | Connected | When the authorization was approved | | Last used | When the connection was last used | Workspace Owners can filter **All connections** by MCP access profile. ## Disconnecting {#disconnect} Select **Disconnect** from the row menu to revoke the authorization. The client can no longer access the workspace and must be authorized again to reconnect. You can disconnect your own connections, including those you made as a service account. A Workspace Owner can disconnect any connection in the workspace. --- --- url: 'https://docs.codatum.com/workspace/external-integrations/slack.md' description: >- Connecting Slack workspaces to Codatum to send notifications and ask the AI agent from Slack --- # Slack integration When you add the Codatum Slack app to a Slack workspace, you can send workflow results to Slack and ask the AI agent to work from Slack. You can connect multiple Slack workspaces to one Codatum workspace. ## Key features | Feature {.nowrap} | Description | | --- | --- | | Workflow notifications | A [Slack step](../../features/workflow/steps#slack) sends messages and files to the channel you specify. | | Using the AI agent from Slack | Ask the AI agent by sending the app a DM or mentioning it in a channel. For details, see [Slack integration for the AI agent](../../features/ai-agent/overview#slack). | | Posting from the AI agent | The AI agent and [routines](../../features/ai-agent/routines) post messages and files to Slack. For details, see [Connectors managed in Slack integration](./agent-connectors#managed-slack). | Answers from the AI agent might contain mistakes. Check them before you rely on them for important decisions. The agent view, where you open the Codatum app from Slack's top bar or side panel, is available only on paid Slack plans. If you have questions about Slack integration, contact Codatum support at . ## Connecting a Slack workspace {#connect} To use the Slack app, you need a Codatum account and workspace. If you don't have an account, [sign up](../../account/signup) at [app.codatum.com/signup](https://app.codatum.com/signup). If you don't have a workspace, get invited to an existing one or [create a workspace in a new organization](../../organization/overview#create-organization). To connect a new Slack workspace, you need the Workspace Owner role or a custom role with the [**External integrations**: Manage](../access-and-security/roles#permissions-other) permission. You also need a Slack account that can add apps to the Slack workspace you connect. For the permissions required to re-authenticate or disconnect an existing connection, see [Permissions](#permissions). 1. Open [Global navigation](../../guide/screen-layout) > **Workspace settings** > [**External integrations**](../overview#external-integrations) > **Slack integration**. 2. Select **Connect Slack**. If a Slack workspace is already connected, select **Add Slack workspace**. 3. In Slack, check the Slack workspace to add the app to, and allow access. When the connection is complete, you return to the Slack integration screen, and the Slack workspace's name and **Connected** are shown. To use the AI agent from Slack, continue with [Enabling agent requests from Slack](../../features/ai-agent/overview#enable-slack). You can also open the same settings screen from **Slack integration settings** when adding a workflow step. ## Re-authenticating {#re-authenticate} Use **Re-authenticate** when notifications fail or you need to refresh Slack permissions. This keeps the existing connection, so workflow and routine destinations keep working. If you **Disconnect** and connect the same Slack workspace again, you don't need to reselect those destinations. 1. Open [Global navigation](../../guide/screen-layout) > **Workspace settings** > [**External integrations**](../overview#external-integrations) > **Slack integration**. 2. On the connection, select **Re-authenticate** and allow access in Slack. If a connection shows **Update permissions**, some operations are missing the permissions they need. Select **Update permissions** to re-authenticate. ## Disconnecting {#disconnect} 1. Open [Global navigation](../../guide/screen-layout) > **Workspace settings** > [**External integrations**](../overview#external-integrations) > **Slack integration**. 2. On the connection, select **Disconnect**, and then select **Disconnect** in the confirmation dialog. After you disconnect, existing Slack threads for that Codatum workspace stop working. The Slack app stays installed in the Slack workspace. To remove the app, uninstall it in Slack. If you uninstall the app in Slack, the Slack workspace's connection no longer appears on the Slack integration screen. Workflow notifications, using the AI agent from Slack, and the [connector managed in Slack integration](./agent-connectors#managed-slack) stop working. Each user's account link is also removed. To use it again, connect the Slack workspace again by following [Connecting a Slack workspace](#connect). Workflow destinations, the setting that allows the agent to start from Slack, and the connector's permissions in AI profiles carry over. Each user needs to link their account again. ## Specification ### Posting to channels {#channels} | Item {.nowrap} | Description | | --- | --- | | Public channels | The app joins the channel automatically the first time it posts there. Slack records the app joining in its audit log. | | Private channels | Invite the app first by running `/invite @Codatum` in Slack. Private channels the app hasn't been invited to don't appear in the destination list. | ### Messages the app reads {#messages} The app reads only the messages it uses for requests to the AI agent. | Source {.nowrap} | Description | | --- | --- | | DMs | Messages in DMs with the app. | | Channels | Messages that mention the app, and the conversation in that thread. The app doesn't read private channels it hasn't joined. | To answer a request, the app sends what it reads to the AI model configured in the [AI profile](../codatum-ai/ai-profile). For how long data from the Slack app is kept and how to request access or deletion, see the [Privacy Policy](https://codatum.com/privacy). ### Permissions {#permissions} | Operation {.nowrap} | Required role | | --- | --- | | Viewing the Slack integration screen | Workspace Viewer or higher. You see only the connections where you're a user or an admin. | | Connecting a new Slack workspace | Workspace Owner, or a custom role with the **External integrations**: Manage permission | | Re-authenticating, disconnecting, and switching whether the agent can start from Slack | An admin of the connection. Workspace owners and users whose custom role has the **External integrations**: Manage permission are always admins. | | Saving a [Slack step in a workflow](../../features/workflow/steps#slack) and choosing its channel | A user or an admin of the connection | The admins and users of each connection are set in the [Admins and users](./agent-connectors#sharing) of its [connector managed by the Slack integration](./agent-connectors#managed-slack). An admin of the connection can change them from **Admins and users** on the Slack integration screen. When you connect a new Slack workspace, the member who connects it becomes an **Admin**, and all **Workspace members** become **Users**. Permissions for a workflow Slack step are checked when you save the step. If the member who saved it is later removed from the users, the saved step still sends messages. --- --- url: 'https://docs.codatum.com/permissions/overview.md' description: 'How permissions work, evaluation rules, and control methods' --- # Permissions overview Codatum has role-based permission management. Every user always has exactly one workspace role. Resources such as connections and teamspaces can also have resource roles, and notebooks and reports can have sharing settings. Whether an operation is allowed is determined by a combination of these. You manage the organization name, country, organization owners, billing address, payment method, and invoices in [Organization settings](../organization/overview#organization-settings). You change the plan in workspace settings > **Plans**. Whether those operations are allowed is determined by whether you are an organization owner, not by your workspace role. ## Terminology {#terminology} Terms used to describe permissions. For more detailed definitions, such as the relationship between accounts and users, also see [Account](../account/overview#account-and-user) and the [Glossary](../reference/glossary). | Term {.nowrap} | Meaning | | --- | --- | | [User](../account/overview#account-and-user) | An account that belongs to a workspace | | [Group](../workspace/administration/group) | A collection of users that can be granted permissions together. A single group can be assigned multiple resource roles | | Resource | An object such as a notebook, connection, or teamspace | | Operation | An action such as inviting a user or editing a notebook | | [Workspace role](../workspace/administration/user#workspace-roles) | A role assigned to a user within a workspace | | Resource role | A role tied to an individual resource, assigned to a group or an individual user | | Permission | The ability to perform a specific operation, determined by a combination of roles | ## Evaluation rules {#evaluation-rules} ```mermaid flowchart LR Op[Can the operation run?] --> WR{Does the workspace role allow it?} WR -->|Yes| Allow[Allow] WR -->|No| RR{Does the resource role allow it?} RR -->|No| Deny[Deny] RR -->|Yes| Cap{Within the Viewer or Guest limit?} Cap -->|Yes| Allow Cap -->|No| Deny ``` 1. **Roles have a hierarchy**. A lower role's access is also carried by higher roles ([Role hierarchy](#role-hierarchy)). 2. **The workspace role sets the default range, and resource roles widen it for individual resources**. Operations the workspace role allows can be performed without a resource role. Operations it doesn't allow can still be performed when a resource role on that resource allows them. 3. **Workspace Viewer and Workspace Guest act as an upper limit**. Even with a resource role, operations these roles can't perform, such as editing, aren't allowed. Workspace Owner, Workspace Editor, and [custom roles](../workspace/access-and-security/roles) have no upper limit. 4. **Multiple roles on the same resource are evaluated with OR**. If any one of them allows the operation, whether granted directly or through a group, it's allowed. 5. **Operations tied only to the workspace are determined by the workspace role alone**. For example, inviting users. Conditions such as "Workspace Editor or higher, and ..." on each resource's permissions page describe how built-in roles are evaluated. For custom roles, the [permissions](../workspace/access-and-security/roles#permissions) you choose determine the result. For operations determined by the workspace role alone, see [Workspace permissions](./workspace). ## Role hierarchy {#role-hierarchy} "X or higher" in the tables means that role and any higher role can perform the operation. | Type {.nowrap} | From highest to lowest | | --- | --- | | Workspace role | Workspace Owner, Workspace Editor, Workspace Viewer, Workspace Guest. [Custom roles](../workspace/access-and-security/roles) aren't part of this hierarchy. Because you choose permissions for each area, a custom role can't be ranked against the built-in roles in a single hierarchy. What it can do is determined by the [permissions](../workspace/access-and-security/roles#permissions) you choose. | | Connection resource role | Connection Owner, Connection User, Connection Viewer | | Teamspace resource role | Teamspace Owner / Teamspace Editor / Teamspace Viewer (Owner and Editor/Viewer aren't mutually exclusive. For details, see [Teamspace permissions](./resources/teamspace)) | ## Main topics {#topics} * [Workspace permissions](./workspace) * [Group](./resources/group) / [Connection](./resources/connection) / [Teamspace](./resources/teamspace) * [Notebook](./resources/notebook) / [Report](./resources/report) * [Workflow](./resources/workflow) * [Saved query](./resources/query) / [Catalog](./resources/catalog) * [AI agent permissions](../features/ai-agent/overview#permissions) ## Control methods How permissions are determined varies by resource. | Method {.nowrap} | Target | What determines it | | --- | --- | --- | | Resource role | [Group](./resources/group) | Group Owner (resource role) | | Resource role | [Connection](./resources/connection) | Access level and the granted resource role | | Resource role | [Teamspace](./resources/teamspace) | The granted resource role | | Resource sharing settings | [Notebook](./resources/notebook) / [Report](./resources/report) | The access scope of the root folder, and [additional notebook permissions](../features/notebook/sharing/additional-permissions/overview) or report sharing settings | | Owner assignment | [Workflow](./resources/workflow) | The owners (users or groups) assigned to each workflow. Creation and managing all workflows are governed by the workspace role | | Derived | [Saved query](./resources/query) / [Catalog](./resources/catalog) | The permissions of the linked connection. There's no dedicated resource role | | Follows the executing user's permissions | [AI agent](../features/ai-agent/overview#permissions) | No dedicated resource role. Additional restrictions come from the AI profile's tool permissions. Agent connectors also require being listed in [Admins and users](../workspace/external-integrations/agent-connectors#sharing) | ## Access scope {#access-scope} For some resources, such as notebooks, the **type of root folder** they belong to becomes the access scope, which determines how permissions are evaluated. For the conditions for each operation, see [Notebook access scope](./resources/notebook#access-scope). | Scope {.nowrap} | Key points | | --- | --- | | Workspace | Workspace members can access it according to their workspace role | | Teamspace | Access is determined by the teamspace resource role | | Private | Under the "Private" root folder. Only the owner, if they're a Workspace Editor or higher, can operate on it | | Shared | Users and groups granted permissions through [additional notebook permissions](../features/notebook/sharing/additional-permissions/overview) can access it. It appears in the **Shared folder** on the recipient's side | ## Relationship with credentials {#credentials} | Credential {.nowrap} | How permissions apply | | --- | --- | | Browser login (account) | Evaluated by the workspace role / resource role of the user in their workspace | | PAT | Capped by the permissions of the token's account, and further narrowed by the permission boundary (connections / notebooks / tags) specified at issuance. A user's PAT is capped by the permissions of the user who issued it, and a [service account's PAT](../workspace/access-and-security/pat#issue-service-account-token) by the service account's permissions. See [Personal Access Tokens](../account/settings/pat#issue-token) for issuance, and [Personal Access Tokens](../workspace/access-and-security/pat#operations) for managing them within a workspace | | Switching to a service account | Evaluated by the service account's workspace role / groups / resource roles, not those of the user who switched. See [Service account permissions](../workspace/access-and-security/service-account#permissions) for details | | API key | Tied to the workspace. Only usable for granted [signed embeds](../features/notebook/sharing/signed-embed/overview). See [API keys](../workspace/access-and-security/api-key) for details | --- --- url: 'https://docs.codatum.com/permissions/workspace.md' description: Permissions for operations determined by the workspace role alone --- # Workspace permissions For operations tied only to the workspace, whether they're allowed is determined by the user's [workspace role](../workspace/administration/user#workspace-roles). ## Operations "Required permission" is the item and level shown under **Permissions** for a [role](../workspace/access-and-security/roles#permissions). Workspace Owners have every permission. Users with a [custom role](../workspace/access-and-security/roles) can perform an operation when their role includes that permission. Operations marked "All members" can be performed regardless of the role's permissions. Operations marked "Workspace owners only" can't be performed with a custom role. In the "Built-in role" column, "X or higher" means that role and any higher role can perform the operation. For the definition of the hierarchy, see [Role hierarchy](./overview#role-hierarchy). | Operation | Category {.nowrap} | Required permission {.nowrap} | Built-in role {.nowrap} | | --- | --- | --- | --- | | Inviting and removing users / changing a user's role (except Workspace Owners) | Users | **Members**: Manage | Workspace Owner | | Creating, editing, and deleting service accounts | Users | **Members**: Manage | Workspace Owner | | Granting and revoking the Workspace Owner role | Users | Workspace owners only | Workspace Owner | | [Inviting guests from reports](../workspace/administration/invite#guest-invite-from-report) | Users | **Guest invitations**: Invite | Workspace Editor or higher | | Viewing [sign-in methods](../workspace/administration/user#sign-in-methods) | Users | **Workspace settings**: Edit | Workspace Owner | | Switching to any [service account](../workspace/access-and-security/service-account) | Users | Workspace owners only | Workspace Owner | | Viewing audit logs | Audit logs | **Audit logs**: View | Workspace Owner | | Viewing [Agent usage](../workspace/codatum-ai/agent-usage) | Codatum AI | **Workspace settings**: Edit | Workspace Owner | | Managing all [AI profiles](../workspace/codatum-ai/ai-profile) | Codatum AI | Workspace owners only | Workspace Owner | | Connecting [Slack integrations](../workspace/external-integrations/slack) / creating [agent connectors](../workspace/external-integrations/agent-connectors) / managing all external integrations | External integrations | **External integrations**: Manage | Workspace Owner | | Viewing [agent connector](../workspace/external-integrations/agent-connectors#member-connections) member connections | External integrations | **Workspace settings**: Edit | Workspace Owner | | Viewing information about the workspace | Workspace | All members | Workspace Viewer or higher | | Changing workspace settings (including security, AI settings, and PAT management; excluding policies, plan changes, and API keys) | Workspace | **Workspace settings**: Edit | Workspace Owner | | Deleting the workspace / managing [API keys](../workspace/access-and-security/api-key) / changing [workspace policies](../workspace/access-and-security/policy) | Workspace | Workspace owners only | Workspace Owner | | Creating, editing, and deleting [roles](../workspace/access-and-security/roles) / changing [guest invitations for Editor](../workspace/access-and-security/roles#editor-guest-invite) | Workspace | Workspace owners only | Workspace Owner | | Viewing information for all groups | Group | All members | Workspace Viewer or higher | | Creating a group / managing all groups | Group | **Groups**: Manage | Workspace Owner | | Creating a connection | Connection | **Create and manage connections**: Create | Workspace Editor or higher | | Managing every connection whose access level is Workspace or Protected | Connection | **Create and manage connections**: Manage | Workspace Owner | | Creating a teamspace | Teamspace | **Create and manage teamspaces**: Create | Workspace Editor or higher | | Managing all teamspaces | Teamspace | **Create and manage teamspaces**: Manage | Workspace Owner | | Creating and editing [tag definitions](../workspace/data-management/tag#tag-definition) | Tag | **Tag definitions**: Edit | Workspace Editor or higher | | Creating a workflow | Workflow | **Workflows**: Create | Workspace Editor or higher | | Managing workflows | Workflow | **Workflows**: Manage | Workspace Owner | Inviting guests from the report screen requires the **Guest invitations** permission in addition to the report permissions. You can remove the guest invitation permission from Workspace Editor ([Changing guest invitations for Editor](../workspace/access-and-security/roles#editor-guest-invite)). For details, see [Report permissions](./resources/report#guest-sharing) and [Invitations and joining](../workspace/administration/invite#guest-invite-from-report). Whether you can manage billing or change the plan isn't determined by the workspace role. It's determined by whether you are an organization owner. For details, see [Members](../organization/settings/members#owners) and [Workspace subscriptions](../workspace/overview#subscriptions). Editing or deleting a group, and changing its members, can be done by users with the **Groups** manage permission as well as the Group Owner. For details, see [Group](./resources/group). For operations tied to resources such as connections, notebooks, and reports, see [Permissions overview](./overview) and the page for each resource. --- --- url: 'https://docs.codatum.com/permissions/resources/group.md' description: Group resource roles and operations --- # Group permissions Whether an operation on a group is allowed is determined by the [workspace role](../../workspace/administration/user#workspace-roles), plus the resource role granted on the group. For how groups are used, see [Group](../../workspace/administration/group). ## Resource role | Role {.nowrap} | Summary | | --- | --- | | Group Owner | Can manage the target group even without being a Workspace Owner | Up to 3 Group Owners can be added ([Fixed limits and constraints](../../reference/limits#fixed-limits)). ## Operations and required roles | Operation | Required role | | --- | --- | | Viewing the list of groups within the workspace | Workspace Viewer or higher | | Creating a group | Workspace Owner, or a custom role with **Manage** selected for **Groups** in [Roles](../../workspace/access-and-security/roles#permissions-member) | | Deleting a group / editing its settings / adding and removing members / adding and removing owners | Workspace Owner, a custom role with **Manage** selected for **Groups**, or Group Owner | --- --- url: 'https://docs.codatum.com/permissions/resources/connection.md' description: Connection permissions based on access level and resource role --- # Connection permissions Whether an operation on a connection is allowed is determined by the [workspace role](../../workspace/administration/user#workspace-roles), plus the access level and resource role. * **[Access level](#access-level)** determines who can use the connection. * **Resource role** determines which operations are allowed within that scope. For example, for a connection with an **access level of Protected**, only users and groups granted a permission can use the connection. Within that group, a **Connection User** is allowed to run SQL and view the results, while a **Connection Viewer** is only allowed to view the results. For a feature overview, see [Connection](../../features/connection/overview). ## Access level {#access-level} | Access level {.nowrap} | Description | | --- | --- | | Workspace | Members in the workspace can access it according to their workspace role. When you grant a resource role, members whose workspace role doesn't allow access can also access it | | Protected | Only users and groups granted a resource role can access it. Users with the connection manage permission can edit the connection's permissions | | Private | Only users and groups granted a resource role can access it. Even users with the connection manage permission can't edit the connection's permissions | "Users with the connection manage permission" means Workspace Owners and users whose custom role has **Manage** selected for **Create and manage connections** in [Roles](../../workspace/access-and-security/roles#permissions-connection). ::: tip The Protected and Private access levels are an **optional feature**. Depending on your contract, they might not be available. ::: ## Resource role | Role {.nowrap} | Summary | | --- | --- | | Connection Owner | Can edit and delete the connection, and change its permission settings | | Connection User | Can run SQL, view the results and tables, and publish related reports | | Connection Viewer | Can view the results and tables | Up to 3 Connection Owners can be added ([Fixed limits and constraints](../../reference/limits#fixed-limits)). The **demo connection** is an exception: Codatum manages it, so you can't edit or delete the general settings, access level and permissions, or sync targets. You also can't add or remove individual Connection Owners. [Codatum Data Connection](#codatum-data-connection) is also an exception. ## Operations and required roles "X or higher" in the tables means that role and any higher role can perform the operation. Changing a connection's permission settings includes changing the access level and granting or changing resource roles. ### Access level: Workspace Whether an operation is allowed is mainly determined by the workspace role. Users and groups granted a resource role can use this connection within that role, even if their workspace role doesn't allow it. However, a built-in Workspace Viewer granted Connection User or higher still can't run SQL, because the Workspace Viewer limit still applies. | Operation | Required role | | --- | --- | | Creating a connection | Workspace Editor or higher | | Listing connection names | Workspace Viewer or higher | | Editing and deleting a connection | Users with the connection manage permission, or Connection Owner | | Changing a connection's permission settings | Users with the connection manage permission, or Connection Owner | | Running SQL on a connection / downloading execution results | Workspace Editor or higher, or Connection User or higher (except Workspace Viewers) | | Getting a connection's SQL execution results and table information | Workspace Viewer or higher, or Connection Viewer or higher | ### Access level: Protected Only users and groups granted a resource role can use this connection. Users with the connection manage permission can change the connection's permission settings. | Operation | Required role | | --- | --- | | Creating a connection | Workspace Editor or higher | | Listing connection names | Workspace Viewer or higher | | Editing and deleting a connection | Users with the connection manage permission, or (Workspace Viewer or higher and Connection Owner) | | Changing a connection's permission settings | Users with the connection manage permission, or (Workspace Viewer or higher and Connection Owner) | | Running SQL on a connection / downloading execution results | Workspace Editor or higher, and Connection User or higher | | Getting a connection's SQL execution results and table information | Workspace Viewer or higher, and Connection Viewer or higher | ### Access level: Private Only users and groups granted a resource role can use this connection. Even users with the connection manage permission can't change the connection's permission settings. A private connection needs at least one Connection Owner. You can't change a connection with no Connection Owner to private, and you can't remove the last Connection Owner. | Operation | Required role | | --- | --- | | Creating a connection | Workspace Editor or higher | | Listing connection names | Workspace Viewer or higher, and Connection Viewer or higher | | Editing and deleting a connection | Workspace Viewer or higher, and Connection Owner | | Changing a connection's permission settings | Workspace Viewer or higher, and Connection Owner | | Running SQL on a connection / downloading execution results | Workspace Editor or higher, and Connection User or higher | | Getting a connection's SQL execution results and table information | Workspace Viewer or higher, and Connection Viewer or higher | Operations on saved queries and the catalog also follow the permissions of the connection they're linked to. For details, see [Query](./query) and [Catalog](./catalog). ## Codatum Data Connection {#codatum-data-connection} [Codatum Data Connection](../../features/connection/overview#codatum-data-connection) has a fixed **Protected** access level. Workspace Owners can run SQL and view execution results and table information. Codatum manages this connection, so you can't edit the general settings, access level and permissions, or sync targets. You can't delete the connection or add or remove individual Connection Owners. The owner field shows **Workspace owners** rather than individual users. --- --- url: 'https://docs.codatum.com/permissions/resources/teamspace.md' description: Teamspace resource roles and operations --- # Teamspace permissions Whether an operation on a teamspace is allowed is determined by the [workspace role](../../workspace/administration/user#workspace-roles), plus the teamspace's resource role. Operations on notebooks within a teamspace are also determined through this resource role (for details, see [Notebook](./notebook)). For a feature overview, see [Teamspace](../../workspace/administration/teamspace). ## Resource role Teamspace Owner and Teamspace Editor / Viewer aren't mutually exclusive. If a user has more than one, the broader permission applies. | Role {.nowrap} | Summary | | --- | --- | | Teamspace Owner | Can manage the target teamspace even without being a Workspace Owner | | Teamspace Editor | Can edit notebooks and folders within the teamspace | | Teamspace Viewer | Can view notebooks and folders within the teamspace | Up to 3 Teamspace Owners can be added ([Fixed limits and constraints](../../reference/limits#fixed-limits)). ## Operations and required roles | Operation | Required role | | --- | --- | | Getting the names of all teamspaces | Workspace Viewer or higher | | Creating a teamspace | Workspace Editor or higher | | Renaming a teamspace / adding or removing owners / deleting / changing permissions | Workspace Owner, a custom role with **Manage** selected for **Create and manage teamspaces** in [Roles](../../workspace/access-and-security/roles#permissions-notebook), or (Workspace Viewer or higher and Teamspace Owner) | For the roles required to view, edit, share, and publish notebooks within a teamspace, see the operations table (scope: Teamspace) in [Notebook](./notebook#scope-teamspace). --- --- url: 'https://docs.codatum.com/permissions/resources/notebook.md' description: Notebook permissions based on access scope and sharing settings --- # Notebook permissions Whether an operation on a notebook is allowed is determined by the [workspace role](../../workspace/administration/user#workspace-roles), plus the **root folder** the notebook belongs to (its access scope). For a feature overview, see [Notebook](../../features/notebook/overview). ## Access scope {#access-scope} The access scope is determined by the **root folder** the notebook is placed in. For how root folder names map to this, also see [Folder](../../features/notebook/folder). | Scope {.nowrap} | Description | | --- | --- | | [Workspace](#scope-workspace) | A notebook placed under the "Workspace" root folder. Members can access it according to their workspace role | | [Teamspace](#scope-teamspace) | A notebook placed under the "(teamspace name)" root folder. Access is determined by the teamspace's resource role | | [Private](#scope-private) | A notebook placed under the "Private" root folder. Only the owner, if they're a Workspace Editor or higher, can operate on it | | [Shared](#scope-shared) | A notebook placed under a "Shared folder". Who can access it is determined by [additional notebook permissions](../../features/notebook/sharing/additional-permissions/overview) | ::: tip The Private, Teamspace, and Shared access scopes are an **optional feature**. Depending on your contract, they might not be available. ::: ## Resource role (when shared) Roles used for notebooks in the shared scope. Who they're granted to is decided through [additional notebook permissions](../../features/notebook/sharing/additional-permissions/overview). | Role {.nowrap} | Summary | | --- | --- | | Notebook Editor | Can edit the notebook | | Notebook Viewer | Can view the notebook | For notebooks within a teamspace, the teamspace's resource role (Editor / Viewer / Owner) is used for notebook operations. ## Operations and required roles Running SQL and getting execution results on a notebook aren't determined by notebook permissions — they're **determined by the permissions of the target [connection](./connection)**. ### Access scope: Workspace {#scope-workspace} Notebooks under the "Workspace" root folder. Whether an operation is allowed is determined by the workspace role. | Operation | Required role | | --- | --- | | Viewing content / commenting | Workspace Viewer or higher | | Editing a notebook | Workspace Editor or higher | | Moving or deleting a notebook / editing or deleting a folder | Workspace Editor or higher | ### Access scope: Teamspace {#scope-teamspace} Notebooks under the "(teamspace name)" root folder. Determined by the permissions granted in [Teamspace](./teamspace). | Operation | Required role | | --- | --- | | Viewing content / commenting | Workspace Viewer or higher, and Teamspace Viewer or higher | | Editing a notebook | Workspace Editor or higher, and Teamspace Editor or higher | | Moving or deleting a notebook / editing or deleting a folder | Workspace Editor or higher, and Teamspace Editor or higher | | Sharing with users or groups | Workspace Viewer or higher, and Teamspace Editor or higher | ### Access scope: Private {#scope-private} Notebooks under the "Private" root folder. Only the owner, if they're a Workspace Editor or higher, can operate on them. | Operation | Required role | | --- | --- | | Viewing content / commenting | Workspace Editor or higher | | Editing a notebook | Workspace Editor or higher | | Moving or deleting a notebook / editing or deleting a folder | Workspace Editor or higher | | Sharing with users or groups | Workspace Editor or higher | ### Access scope: Shared {#scope-shared} Notebooks under a "Shared folder". Users and groups granted permissions through [additional notebook permissions](../../features/notebook/sharing/additional-permissions/overview) can access them. Notebooks accessed only through sharing can't be deleted or moved, even with edit permission. | Operation {.nowrap} | Required role | | --- | --- | | Viewing content / commenting | Workspace Viewer or higher, and Notebook Viewer or higher | | Editing a notebook | Workspace Editor or higher, and Notebook Editor | For the conditions required to publish a report, see [Report](./report). --- --- url: 'https://docs.codatum.com/permissions/resources/report.md' description: 'Report viewing permission, guest sharing, and conditions for publishing' --- # Report permissions Whether an operation on a report is allowed is determined by the [workspace role](../../workspace/administration/user#workspace-roles), plus the report's sharing settings. Because reports are read-only, the only resource role is Viewer. For a feature overview, see [Report](../../features/notebook/sharing/report/overview). ## Resource role | Role {.nowrap} | Summary | | --- | --- | | Report Viewer | Can view the report | ## Operations and required roles A Report Viewer can view the report. [Comments](../../features/notebook/comment#report-comments) can be used unless comments are disabled. Whether SQL can be re-run, parameters edited, downloads made, and the Explorer used is determined by the **publish settings** (report type and options) chosen when the report was published. For the content of publish settings, see [Report publish settings](../../features/notebook/sharing/report/overview#publish-settings). Changing publish settings requires republishing. | Operation | Condition in publish settings | | --- | --- | | Re-running SQL / refreshing execution results | Refreshable report or interactive report | | Editing parameters | Interactive report | | Downloading source data | Downloads enabled | | Using the Explorer | Explorer enabled | ::: tip Unlike running SQL on a notebook, re-running SQL and getting or downloading execution results within a report don't require [connection](./connection) permissions. If allowed by the [publish settings](../../features/notebook/sharing/report/overview#publish-settings), a Report Viewer can run them. ::: ## Sharing targets A report can be shared with a user or a group. Sharing grants Report Viewer. ### Guest {#guest-sharing} A report can be shared with a workspace [guest](../../workspace/administration/user#member-and-guest). * A guest who has already joined the workspace can be shared with directly. * If they haven't joined yet, you can invite them as a guest by specifying an email address. Once they accept the invitation, they're added to the workspace as a guest and can view the target report. For the steps, see [Invitations and joining](../../workspace/administration/invite#guest-invite-from-report). A guest can perform the same operations as a Report Viewer (within the scope of the publish settings). They can't access notebooks or connections. Tags also aren't shown to them. Inviting a guest and canceling an invitation require the **Guest invitations** permission in [Roles](../../workspace/access-and-security/roles#permissions-member), in addition to the conditions for changing report permissions. Among the built-in roles, Workspace Owner and Workspace Editor have it. You can remove the guest invitation permission from Workspace Editor ([Changing guest invitations for Editor](../../workspace/access-and-security/roles#editor-guest-invite)). ### Members and groups {#member-group-sharing} Besides guests, a report can also be shared with [members](../../workspace/administration/user#member-and-guest) or groups. Because guests can't belong to a group, sharing with a group only reaches members. ## Publishing and management operations The permissions required to publish and manage a report are based on the edit permission of the source notebook it was published from. For the roles required to edit a notebook, see [Notebook](./notebook). However, notebooks in the shared scope can't be published as a report even with edit permission. | Operation | Required condition | | --- | --- | | Publishing a report / changing report permissions | Edit permission on the source notebook, and Connection User or higher for every connection used by the published pages | | Deleting a report / editing report settings | Edit permission on the source notebook | --- --- url: 'https://docs.codatum.com/permissions/resources/query.md' description: 'Saved query permissions, derived from connection permissions' --- # Query permissions Saved queries don't have a dedicated resource role. Whether an operation is allowed follows the permissions of the linked [connection](./connection). | Operation | Required permission | | --- | --- | | Viewing a query (list, details, SQL text, execution results) | Being able to get the connection's SQL execution results and table information, for the linked connection | | Running a query's SQL / creating, updating, deleting, or moving it | Being able to run SQL on the linked connection | | Export as table function | Being able to run SQL on the linked connection | | Creating, moving, or deleting a query folder | Being able to run SQL on the linked connection | For a feature overview, see [Query](../../features/saved-query/overview). --- --- url: 'https://docs.codatum.com/permissions/resources/catalog.md' description: 'Catalog permissions, derived from connection permissions' --- # Catalog permissions The catalog doesn't have a dedicated resource role. Whether you can view a table or edit its annotations (description and tags) follows the permissions of the [connection](./connection) that table is synced from. When the same table is synced from multiple connections (see [Table identity](../../features/catalog/metadata-sync#table-identity)), you can operate on it if you have the required permission on **at least one** of its source connections. | Operation {.nowrap} | Required permission | | --- | --- | | Viewing table information | Being able to get the connection's SQL execution results and table information, for at least one source connection | | Editing descriptions and tags | Being able to run SQL on at least one source connection | | Creating and editing tag definitions | [Workspace permissions](../workspace) (Workspace Editor or higher). For operations on definitions, see [Tag](../../workspace/data-management/tag#tag-definition) | Metadata for saved queries in the catalog follows the permissions in [Query](./query). For a feature overview, see [Catalog](../../features/catalog/overview). --- --- url: 'https://docs.codatum.com/permissions/resources/workflow.md' description: Workflow permissions based on owner assignment and workspace role --- # Workflow permissions Whether an operation on a workflow is allowed is determined by the [workspace role](../../workspace/administration/user#workspace-roles) and the workflow's **owner** assignment. * **Creating** a workflow, and **managing** a workflow you don't own, are determined by the workspace role, as described in [Workspace permissions](../workspace). * Viewing, editing, running, and deleting an individual workflow is determined by that workflow's owner. Users with the workflow manage permission (Workspace Owners and users whose custom role has **Manage** selected for **Workflows** in [Roles](../../workspace/access-and-security/roles#permissions-workflow)) can operate every workflow. For a feature overview, see [Workflow](../../features/workflow/overview). ## Owners {#owners} An owner is a user or a group. Immediately after creation, only the creator is an owner. You can change this from **Owners** > **Edit** > **Add owner** on the detail screen. A workflow can have 1 to 30 owners ([Fixed limits and constraints](../../reference/limits#fixed-limits)). Users and groups assigned as owners can view, edit, run, and delete that workflow. ## Operations and required permissions | Operation | Required permission | | --- | --- | | Viewing the list and details | Owner of the workflow, or has the workflow manage permission | | Creating and duplicating | Workspace Editor or higher | | Editing, enabling, disabling, deleting, running manually, and changing owners | Owner of the workflow, or has the workflow manage permission | Whether SQL run via Run Query is allowed is also determined by the permissions of the target [connection](./connection). Connection permissions are checked when the workflow is saved, against the user saving it. They aren't checked at run time, so saved steps keep running SQL even if the user who saved them later loses access to the connection. Owners who can't run SQL on the connection (such as Workspace Viewers) can still run the workflow manually and view its results. --- --- url: 'https://docs.codatum.com/account/overview.md' description: 'What an account is, its relationship to users, and account settings' --- # Account An account is the unit you use to log in to Codatum. It's created through [sign-up](./signup), and a single account can belong to multiple workspaces. ## Accounts and users {#account-and-user} A single account can belong to multiple workspaces. In each workspace it belongs to, it's treated as a user of that workspace and is always assigned exactly one [workspace role](../workspace/administration/user#workspace-roles). ```mermaid flowchart TB A[Account Login unit, shared across workspaces] A --> U1[User A Member of Workspace X] A --> U2[User B Guest of Workspace Y] ``` | Term {.nowrap} | Meaning | | --- | --- | | Account | The unit you use to log in to Codatum. A single account is shared across workspaces | | User | An account that belongs to a given workspace. Includes members and guests | For details on members, guests, and workspace roles, see [User](../workspace/administration/user). For joining a workspace, see [Invitations and joining](../workspace/administration/invite). ## Account settings {#account-settings} You can open account settings from the avatar icon at the bottom of the [global nav](../guide/screen-layout) > **Account settings**. The [left sidebar](../guide/screen-layout) lists account-wide settings, then **Workspaces**. ### Account {#account-group} These settings are scoped to your account and shared across every workspace you belong to. | Menu {.nowrap} | Content | | --- | --- | | [General](./settings/basic) | Profile, theme, language, and more | | [Sign-in & security](./settings/login) | Email address, sign-in methods, multi-factor authentication | | [SQL editor preferences](./settings/editor) | Indentation, autocomplete, tooltips, and more | | [Keyboard shortcuts](./settings/keyboard-shortcut) | View and change shortcuts | ### Workspaces {#this-workspace} These settings apply to you in the current workspace. Use **Workspaces** in the [left sidebar](../guide/screen-layout) to switch the target workspace. | Menu {.nowrap} | Content | | --- | --- | | [Notification preferences](./settings/notification) | In-app and email notifications | | [Personal Access Tokens](./settings/pat) | Create, update, suspend, and revoke the tokens you issue | | [Connector authentication](./settings/connector-authentication) | Personal credentials used with agent connectors | --- --- url: 'https://docs.codatum.com/account/signup.md' description: Creating a new account and what happens after you sign up --- # Sign-up You create your Codatum account through sign-up. There are two ways to register. | Method {.nowrap} | Overview | | --- | --- | | Register with Google | Authenticate with a Google account, then register your profile | | Email | Enter your email address and click **Continue**, then enter an email confirmation code, set a password, and register your profile | If you enter an email address on a domain where an organization has turned on [SAML SSO](../organization/settings/saml), **Sign up with SSO** and **Sign up with email** appear. **Sign up with SSO** authenticates you with the organization's IdP, then you register your profile. **Sign up with email** continues with the email steps in the table above. For details, see [Signing in with SSO](./settings/login#sso-login). Profile registration requires your full name. You can also add a nickname. For name limits, see [Limits](../reference/limits#fixed-limits). To add or change sign-in methods after your account is created, see [Sign-in & security](./settings/login). ## After signing up {#after-signup} After your account is created, you're taken to the [workspace selection screen](../guide/navigation#workspace-icon). From there, you do one of the following. * **Join** or **Decline** an [invitation](../workspace/administration/invite#email-invite) you've received * **Join** or **Decline** an [organization owner invitation](../organization/settings/members#invitee-flow) you've received * **Join** a workspace you can join through an [allowed domain](../workspace/administration/invite#allowed-domains) * If you signed up from a [workspace creation link you received from Codatum](../organization/overview#create-organization), create a workspace in a new organization If there's no workspace you can join, ask a teammate to invite you to a workspace. To start using Codatum in a new organization, contact Codatum support. If you opened an [invite link](../workspace/administration/invite#invite-link), you're taken back to that link after signing up and can join the workspace directly, without going through the selection screen. For details on invitations and joining a workspace, see [Invitations and joining](../workspace/administration/invite). For how to open the selection screen later, see [Workspace icon](../guide/navigation#workspace-icon). --- --- url: 'https://docs.codatum.com/account/settings/basic.md' description: 'Account profile, theme, and language settings' --- # General In **General** under [account settings](../overview#account-settings), you can manage your profile and [theme and language](#interface) settings. These settings are scoped to your account and shared across every workspace you belong to. ## Profile | Item {.nowrap} | Description | | --- | --- | | Account ID | The ID that uniquely identifies your account | | Full name | Your full display name | | Nickname | An optional short display name | | Profile image | The image used as your avatar | For full name and nickname limits, see [Limits](../../reference/limits#fixed-limits). ## Interface {#interface} | Item {.nowrap} | Description | | --- | --- | | Theme | **Light theme** / **Dark theme** / **Sync with system** | | Language | **日本語** / **English** | ### Language * If it isn't set yet, it's **日本語** when your browser's language is Japanese, and **English** otherwise * Number and date formats in charts and elsewhere use the Japanese format with **日本語**, and the format for your browser's language settings (region) with **English** ### Common notes * You can also change these from the avatar menu in the [global nav](../../guide/screen-layout) (see [Navigation](../../guide/navigation#nav-bottom)) * These settings are saved to your account, so they carry over when you log in from another browser ## Danger zone You can **delete your account**. Deleting it removes your account information from Codatum and you'll no longer be able to log in to the service. To delete your account, you must first [leave](../../workspace/administration/user#leave-workspace) **every workspace** you belong to. You must also leave every [organization](../../organization/settings/members#owners) you belong to. The last organization owner can't leave. Invite another owner first. --- --- url: 'https://docs.codatum.com/account/settings/login.md' description: Account authentication methods and multi-factor authentication --- # Sign-in & security In **Sign-in & security** under [account settings](../overview#account-settings), you can manage your email address, sign-in methods, and multi-factor authentication. These settings are scoped to your account and shared across every workspace you belong to. ## Email You can check your current email address and **change email**. ## Sign-in methods You can use multiple sign-in methods together. You can't remove the last one. | Method {.nowrap} | Description | | --- | --- | | Password | Authentication with an email address and password. You can **change password** or **remove password** (if you have another sign-in method). If it isn't set up yet, you can add it | | Sign in with SSO | Sign-in through your organization's IdP (see [Signing in with SSO](#sso-login)). Shown when your organization has turned on [SAML SSO](../../organization/settings/saml) for the domain of your email address. You can't set it up or remove it on this screen | | Sign in with Google | Single sign-on with a Google account. You can connect or disconnect it | Only password and Google count toward the last sign-in method. **Sign in with SSO** doesn't count. If SSO is available for your email address and you haven't set a password, the password row shows **Not set**, and you can't add a password on this screen. ## Multi-factor authentication {#account-mfa} | Method {.nowrap} | Description | | --- | --- | | Phone number (SMS) | Authenticates with an SMS sent to a registered phone number. You can **add phone number** / **remove** | | Authenticator app | Authenticates with an authenticator app such as Google Authenticator or Microsoft Authenticator. You can **add authenticator app** / **remove** | If the workspace enforces MFA for Password sign-in, or applies IP access control, see [MFA control](../../workspace/access-and-security/security#mfa-control) and [IP access control](../../workspace/access-and-security/security#ip-access-control). ## Signing in with SSO {#sso-login} If your organization has turned on [SAML SSO](../../organization/settings/saml) for the domain of your email address, you can sign in through your organization's IdP. 1. On the sign-in page, enter your email address, then select **Continue**. 2. Select **Sign in with SSO**. 3. In the window that opens, sign in to your IdP. To sign in with a password instead, select **Sign in with password**. To sign in with SSO, allow pop-ups for Codatum in your browser. On the sign-up page, entering an email address on the same domain shows **Sign up with SSO** and **Sign up with email** (see [Sign-up](../signup)). ### SSO sign-in specifications {#sso-login-spec} * If you don't have a Codatum account, you register your profile after your first SSO sign-in, and your account is created. * If an account with the same email address exists, you sign in to that account. Any password or Google connection you've set up keeps working. * If an existing account's email address hasn't been verified, its password and Google connection are removed, and you sign in with SSO. * Signing in with SSO doesn't ask for the [multi-factor authentication](#account-mfa) registered in Codatum. It also isn't subject to the workspace's [MFA control](../../workspace/access-and-security/security#mfa-control). Multi-factor authentication follows your IdP's settings. * An SSO sign-in expires seven days after your last SSO sign-in. When it expires, you're signed out, and the sign-in page shows "Your SSO session has ended. Sign in again." Sign in with SSO again. * If your organization disables the IdP, or stops or switches SSO for the domain, browsers signed in with SSO are also signed out. * When you're asked to confirm your identity, such as to change your email address or password, you can use **Continue with SSO**. Sign in to your IdP as the same user who is signed in to Codatum. ### When you can't sign in with SSO {#sso-login-failed} 1. If "The sign-in window was blocked" appears, allow pop-ups for Codatum in your browser, then try again. 2. If "Your IdP didn't send an email address" appears, ask your organization's administrator to set the NameID in the IdP to the email address. 3. If a message such as "SSO isn't available for this email address" appears, contact your organization's administrator. If you've set up a password or Google connection, you can also sign in with **Sign in with password** or **Sign in with Google**. --- --- url: 'https://docs.codatum.com/account/settings/editor.md' description: 'Display, autocomplete, and tooltip settings for the SQL editor' --- # SQL editor preferences In **SQL editor preferences** under [account settings](../overview#account-settings), you can customize how the SQL code editor behaves. For customizing keyboard shortcuts, see [Keyboard shortcuts](./keyboard-shortcut). These settings are scoped to your account and shared across every workspace you belong to. Changes are saved immediately, and you can restore the defaults with **Reset all**. ## Basic | Item | Description | | --- | --- | | Convert Tab to half-width space | When on, converts tab input into half-width spaces. The number of characters is **2 characters** or **4 characters** | | Tab display size | The tab display width when **Convert Tab to half-width space** is off (**2 characters** or **4 characters**) | | Prefer lowercase for reserved words and functions | Uses lowercase as much as possible when applying formatters and autocomplete | | Add alias to Table / SQL Block reference by default | Automatically adds an alias when you insert a reference | | Disable AI code suggestion | Lets you disable AI code suggestions for yourself, even if AI Suggestion is enabled for the workspace | | Disable Enter key for applying autocomplete | The Enter key inserts a line break instead of applying autocomplete | ## Input completion | Item {.nowrap} | Description | | --- | --- | | Enable input completion | The overall on/off switch for autocomplete while writing SQL | | Enable function completion | Autocomplete for functions like `COUNT`, `SUM`, and `MAX` | | Enable reserved words and data types completion | Autocomplete for things like `SELECT` and `LEFT JOIN` | | Enable code snippets completion | Autocomplete for code snippets. On by default | | Enable columns completion | Suggests columns from tables referenced in the SQL block, and from other SQL blocks | Disabling input completion also disables the completion items under it. ## Tooltip | Item | Description | | --- | --- | | Enable tooltip for function reference | Shows the function reference when the cursor is right after a function's `(` or `)` | --- --- url: 'https://docs.codatum.com/account/settings/keyboard-shortcut.md' description: Viewing and changing keyboard shortcuts --- # Keyboard shortcuts In **Keyboard shortcuts** under [account settings](../overview#account-settings), you can customize shortcut keybinds. These settings are scoped to your account and shared across every workspace you belong to. ## Overview * You can search by shortcut name, label, or keybind * You can change the keybind for each shortcut * **Reset to defaults** restores every shortcut to its default value The key notation shown depends on your OS and keyboard layout. Check the on-screen list for the actual assignment. The **Mod** modifier key is ⌘ on macOS and Ctrl on Windows / Linux. ## Common defaults Here are some representative defaults. You can change any item in this list from this screen. | Shortcut {.nowrap} | Default (macOS) | Default (Windows / Linux) | | --- | --- | --- | | **Search** | ⌘+K | Ctrl+K | | **AI Assistant** | ⌘+L | Ctrl+L (opens or closes the [AI Assistant](../../features/ai-assistant/overview#open) or [AI agent](../../features/ai-agent/overview#open) panel) | | **Toggle left sidebar** | ⌘+M | Ctrl+M | | **Execute SQL** | ⌘+Enter | Ctrl+Enter | | **Apply formatter to SQL** | ⌘+Shift+F | Ctrl+Shift+F | | **Comment-out** | ⌘+/ | Ctrl+/ | **Run all** for a notebook is ⌘+Shift+Enter (Ctrl+Shift+Enter on Windows / Linux). This shortcut isn't included in the customization list. --- --- url: 'https://docs.codatum.com/account/settings/notification.md' description: In-app and email notification settings --- # Notification preferences In **Notification preferences** under [account settings](../overview#account-settings), you can manage [notification channels](#notification-channels) and settings for each event. **Notification preferences can be set per workspace.** Use **Workspaces** in the [left sidebar](../../guide/screen-layout) to switch the target workspace. ## Notification channels {#notification-channels} For each event, you can turn the following channels on or off independently. | Channel {.nowrap} | Description | | --- | --- | | On Codatum | In-app notifications | | Email | Email notifications | * When in-app notifications are enabled, they appear in the **Notifications** menu at the top of the [global nav](../../guide/screen-layout) * Email notifications can only be enabled when the corresponding in-app notification is on ## Notification events you can configure ### Notebooks | Event {.nowrap} | Description | | --- | --- | | Mention in notebook | A mention in the body of a notebook (see [Comment](../../features/notebook/comment#mention)) | | Mention in comment | A mention in a notebook comment (see [Comment](../../features/notebook/comment#mention)) | | Reply in comment | A reply to a notebook comment (see [Comment](../../features/notebook/comment)) | ### Reports | Event {.nowrap} | Description | | --- | --- | | Mention in comment | A mention in a report comment (see [Comment](../../features/notebook/comment#report-comments)) | | Reply in comment | A reply to a report comment (see [Comment](../../features/notebook/comment#report-comments)) | | Published | When a report containing a connection you own is published | If the report feature isn't enabled for the workspace, this section isn't shown. ### Public links | Event {.nowrap} | Description | | --- | --- | | Published | When a public link containing a connection you own is published | ### Signed embeds | Event {.nowrap} | Description | | --- | --- | | Published | When a signed embed containing a connection you own is published | If the signed embed feature isn't enabled for the workspace, this section isn't shown. ### Connections | Event {.nowrap} | Description | | --- | --- | | Connection sync job failed | When the sync job for a connection you own fails | | Connection sync job warning | When a warning occurs in the sync job for a connection you own | --- --- url: 'https://docs.codatum.com/account/settings/pat.md' description: Creating and managing the personal access tokens you issue --- # Personal Access Tokens (Beta) In **Personal Access Tokens** under [account settings](../overview#account-settings), you can [issue](#issue-token) and [manage](#manage-tokens) PATs (personal access tokens) for operating Codatum from the [Codatum CLI](../../features/cli/overview). PATs are issued per workspace. A [Workspace Owner](../../workspace/administration/user#workspace-roles) can view and revoke PATs issued within the workspace from workspace settings. For details, see the workspace [Personal Access Tokens](../../workspace/access-and-security/pat#operations) page. Use **Workspaces** in the [left sidebar](../../guide/screen-layout) to switch the target workspace. ::: info This feature is in **beta**. The specification might change without notice. ::: ## Prerequisites * If the [workspace policy](../../workspace/access-and-security/policy#policy-settings) prohibits using the Codatum CLI, this menu isn't shown * [Workspace guests](../../workspace/administration/user#member-and-guest) can't use PATs ## Issuing a token {#issue-token} 1. Select **Issue new token** 2. Enter the following, then select **Issue** | Item {.nowrap} | Description | | --- | --- | | Name | An identifying name for the token | | Expiration | You can set this in 1-day increments, up to 365 days (see [Limits](../../reference/limits#fixed-limits)) (you can't issue a token with no expiration) | | Restrict token permissions | By default, a token inherits all of the issuer's permissions. To grant only a subset of those permissions, turn this on and narrow the scope to specific connections, notebooks, or tags. For an overview, see [Permissions overview](../../permissions/overview#credentials) | The plaintext token **is shown only once, right after you issue it, and can't be retrieved again**. Copy it and store it somewhere safe, and don't share it with anyone else. For CLI usage instructions, see the [Codatum CLI documentation](https://cli-docs.codatum.com). ## Managing tokens {#manage-tokens} * You can change the name or permission restrictions of a token that hasn't expired * You can **suspend** a token that hasn't expired * You can **resume** a suspended token to make it usable again * You can immediately disable a token that hasn't expired by **revoking** it * Once revoked, a token can't be reactivated * A token whose expiration has passed becomes **expired** and is automatically revoked * An expired token can't be reactivated * A Workspace Owner can **suspend** or **revoke** any token in the workspace * For details, see [Personal Access Tokens](../../workspace/access-and-security/pat#operations) --- --- url: 'https://docs.codatum.com/account/settings/connector-authentication.md' description: Manage personal credentials used with agent connectors --- # Connector authentication (Beta) Use **Connector authentication** in [account settings](../overview#account-settings) to manage personal authentication for [agent connectors](../../workspace/external-integrations/agent-connectors) in the current workspace. ::: info This feature is in **beta**. The specification might change without notice. ::: ## Managing authentication {#manage-authentication} * Start OAuth authentication by selecting **Authenticate**. * Register the required credentials for connectors that use API keys or tokens. * Disconnect existing authentication. * The page shows personal-scope connectors registered in the current workspace whose [Admins and users](../../workspace/external-integrations/agent-connectors#sharing) include you. * If a connector is no longer shared with you, your personal authentication is deleted. If it is shared with you again, authenticate again. * Use **Workspaces** in the [left sidebar](../../guide/screen-layout) to switch the target workspace. --- --- url: 'https://docs.codatum.com/organization/overview.md' description: >- How organizations relate to workspaces, organization owners, and organization settings --- # Organization An organization is the unit that groups workspaces. The organization name, country, organization owners, and billing information are managed at the organization. Resources such as connections and notebooks belong to each workspace. ## Organizations and workspaces {#organization-and-workspace} One organization can contain multiple workspaces. Resources in a workspace can't be referenced from other workspaces. ```mermaid flowchart TB O[Organization The unit that groups workspaces] O --> W1[Workspace A] O --> W2[Workspace B] ``` | Term {.nowrap} | Meaning | | --- | --- | | Organization | The unit that groups workspaces. Holds the organization name, country, organization owners, and billing information | | Workspace | The unit for managing resources and users together | | Organization owner | The role that can edit organization settings and invite or remove other organization owners. Separate from workspace roles | To join an existing organization, you need an [invitation from an organization owner](./settings/members#invite). For workspace details, see [Workspace](../workspace/overview). For inviting and removing organization owners, see [Members](./settings/members). ## Creating a new organization {#create-organization} A new organization is created when you create a workspace in a new organization. You become that organization's first organization owner. To create a workspace in a new organization, you need a workspace creation link issued by Codatum. To get a link, contact Codatum support. Without a link, you can't create a workspace in a new organization. If there's no workspace you can join on the [workspace selection screen](../guide/navigation#workspace-icon), or if you select **New organization** on the **Create workspace** screen, a message asking you to contact us appears with **Contact us**. 1. Open the link you received from Codatum, then [sign up](../account/signup). 2. On the **Create workspace** screen, set the icon, workspace name, and other details, then create the workspace. If you already own an organization, select **New organization** under **Organization**. Adding a workspace to an organization you own doesn't require a link. Depending on your contract, you might not be able to add a workspace to an existing organization. For details, see [Workspaces](./settings/workspaces). ## Organization settings {#organization-settings} You can open organization settings from the workspace icon at the top of the [global nav](../guide/screen-layout) > **Organization settings**. This opens the settings for the organization that the workspace you're working in belongs to. If you aren't an organization owner, this entry point isn't shown. The organization name appears above **Organization settings** in the [left sidebar](../guide/screen-layout). If you own more than one organization, select the organization name to switch to another organization's settings. If you opened Organization settings from a workspace, **Back to workspace** at the top of the left sidebar returns you to that workspace's top page. Otherwise, **Back to workspaces** returns you to the [workspace selection screen](../guide/navigation#workspace-icon). For workspace-level settings such as the workspace name, icon, and allowed domains, see [General](../workspace/administration/basic) in workspace settings. | Menu {.nowrap} | Content | | --- | --- | | [General](./settings/general) | Organization ID, organization name, and country | | [Members](./settings/members) | Organization owner list, invitations, and removals | | [Workspaces](./settings/workspaces) | Workspaces that belong to the organization, including creating and joining | | [Domains](./settings/domains) | Claiming, DNS verification, and revocation of domains the organization owns | | [SAML SSO](./settings/saml) | IdP registration, test sign-in, and enabling SSO for each domain | | **Billing** | Payment methods, invoices, and billing details. These are shared across all workspaces in the organization. | --- --- url: 'https://docs.codatum.com/organization/settings/general.md' description: 'Viewing and editing the organization ID, organization name, and country' --- # General In **General** under [organization settings](../overview#organization-settings), you can view the organization ID, and edit the organization name and country. Only an organization owner can make these changes. ## Settings {#settings} | Item {.nowrap} | Description | | --- | --- | | Organization ID | The ID that uniquely identifies the organization | | Organization name | The organization's legal name used for contracts and invoices. It can't be empty | | Country | The country used for contracts and billing | --- --- url: 'https://docs.codatum.com/organization/settings/members.md' description: 'Listing, inviting, and removing organization owners' --- # Members In **Members** under [organization settings](../overview#organization-settings), you can review, invite, and remove organization owners. Only an organization owner can make these changes. ## Organization owners {#owners} An organization owner can edit organization settings and invite or remove other organization owners. An organization owner can also manage **Billing** in organization settings and change the plan in workspace settings. This role is separate from workspace roles. The last organization owner can't be removed. If you remove yourself, you can no longer open organization settings. ## Invitations {#invite} Under **Invite organization owner**, enter an email address and select **Send invitation**. The role isn't granted when you send the invitation. The recipient becomes an organization owner after they accept. The following constraints apply. * Invitations expire 7 days after creation ([Fixed limits and constraints](../../reference/limits#fixed-limits)). * You can send up to 200 invitation emails per organization in any 1-minute period, 400 in any 1-hour period, and 600 in any 24-hour period. New invitations and resends count together ([Fixed limits and constraints](../../reference/limits#fixed-limits)). * You can't invite an email address that already belongs to the organization as an owner. * You can't send duplicate invitations to the same email address. ### Pending invitations {#pending-invitations} You can review invitations that haven't been accepted under **Pending invitations**. | Display / action {.nowrap} | Description | | --- | --- | | **Pending Invite** | Not yet accepted, and still within the expiration period | | **Invite expired** | An invitation past its expiration | | **Resend** | Resends the invitation email and extends the expiration to 7 days from the resend time | | **Delete** | Cancels the invitation | ## Flow for the invitee {#invitee-flow} To join as an organization owner after being invited, the invitee needs a Codatum account. If they don't have one, they first need to create an account via [Sign up](../../account/signup). After creating an account, or if they already have one, they select **Join** or **Decline** in one of the following places. * The link in the invitation email * The [workspace selection screen](../../guide/navigation#workspace-icon) The following constraints apply. * The invited email address must match the account's email address. * Selecting **Join** makes them an organization owner. * Selecting **Decline** deletes the invitation. --- --- url: 'https://docs.codatum.com/organization/settings/workspaces.md' description: 'Listing, creating, and joining workspaces that belong to the organization' --- # Workspaces In **Workspaces** under [organization settings](../overview#organization-settings), you can review the workspaces that belong to this organization. Only an organization owner can make these changes. You can't view the content of workspaces you haven't joined. Depending on your contract, you might not be able to create a workspace from organization settings. In that case, contact Codatum support. ## Display and actions {#actions} | Display / action {.nowrap} | Description | | --- | --- | | **Create workspace** | Opens the **Create workspace** screen with this organization selected. You set the icon, workspace name, and allowed domain, then continue to initial setup such as inviting members. Workspace names must contain 1 to 50 characters and can't contain URLs or email addresses ([Fixed limits and constraints](../../reference/limits#fixed-limits)). Depending on your contract, this action might not be shown. | | Workspace | The workspace name. | | **Active** / **Locked** | The workspace status. | | Plan | The workspace plan. If the workspace is in a trial, the remaining days are also shown. If you have joined the workspace, you can open [Plans](../../workspace/overview#subscriptions) in workspace settings. | | Members | The number of members in the workspace. | | Created | The date the workspace was created. | | **Joined** / **Not a member** | Whether you have joined the workspace. | | **Go to workspace** | Opens the top page of a workspace you have joined. | | **Join** | Adds you to a workspace you haven't joined, as a Workspace Owner. | --- --- url: 'https://docs.codatum.com/organization/settings/domains.md' description: >- How organization owners claim a domain and prove ownership with a DNS TXT record --- # Domains (Optional feature) In **Domains** under [organization settings](../overview#organization-settings), you can claim a domain you own and verify it with a DNS TXT record. Only an organization owner can make these changes. Only one organization can have a verified domain. ::: tip This is an **optional feature**. Depending on your contract, it might not be available. ::: ## Domain verification {#domain-verification} You can prove that the organization owns a domain by adding a DNS TXT record. Verification applies only to the domain you enter. It doesn't include subdomains. This setting is separate from [allowed domains](../../workspace/administration/invite#allowed-domains) in a workspace. Verifying a domain doesn't change how people join a workspace. For a verified domain, you can turn on [SAML SSO](./saml) so that people with an email address on the domain sign in through your organization's IdP. Verifying a domain alone doesn't change how people sign in. ## Adding and verifying {#add-and-verify} The following prerequisites apply. * Only an organization owner can make these changes. * You need to be able to add a TXT record to DNS. * The **Domains** menu is shown when this feature is available. 1. Open the workspace icon at the top of the [global nav](../../guide/screen-layout) > **Organization settings** > **Domains**. 2. Enter the domain you own in **Domain**, then select **Add domain**. 3. Use **Copy to clipboard** to copy **Host** and **TXT value** from the list, then add them as a DNS TXT record. 4. After DNS has propagated, select **Verify**. If verification succeeds, the status becomes **Verified**. If the TXT record isn't found, wait for DNS to propagate, then select **Verify** again. Keep the TXT record on the displayed **Host** after verification. Codatum rechecks the TXT record of verified domains automatically (see [Rechecking verified domains](#recheck)). You can also select **Verify** when the status is **Verified**. This checks the TXT record again and shows the result in a message. The status stays **Verified** even if Codatum can't confirm the record. ## Revoking and deleting {#revoke-and-remove} The action in the list depends on the status. 1. Open the workspace icon at the top of the [global nav](../../guide/screen-layout) > **Organization settings** > **Domains**. 2. For the domain, select one of the following: * **Delete** if the status is **Pending** * **Revoke** if the status is **Verified** 3. In the confirmation dialog, select **Delete claim** or **Revoke verification**. **Delete** deletes a pending claim. **Revoke** lets another organization verify the domain. After you revoke it, you can add the same domain again from this organization. Revoking a domain that uses [SAML SSO](./saml) stops SSO for that domain and clears its test sign-in results. ## Rechecking verified domains {#recheck} Codatum rechecks the TXT record of each verified domain once a day. * If the TXT record can't be confirmed twice in a row, a warning appears. * A check where DNS couldn't be looked up temporarily also counts as not confirmed. * The warning appears under **Status** in the domain list and at the top of the page. * The status stays **Verified** while the warning is shown. * When the warning appears, all organization owners are notified by email. * While the warning is shown, you can't enable [SAML SSO](./saml#constraints) for that domain. Sign-in with SSO that is already enabled keeps working. * If you select **Verify** and the TXT record is confirmed, the warning disappears. * If **Verify** can't confirm the TXT record, nothing is recorded. This doesn't change the progress toward a warning or the deadline described below. ### When SSO settings are removed {#saml-removal} For a domain that uses [SAML SSO](./saml), if the TXT record still can't be confirmed 30 days after the warning appears, the SSO settings for that domain (the assigned IdP and the test sign-in result) are removed. * The date and time of removal appears under **TXT record not confirmed** in the domain list. * All organization owners are notified by email 14 days before the removal and when it happens. * After the removal, people who signed in with SSO using an email address on that domain need to sign in again. * The IdP settings are kept. The status stays **Verified**. * The removed settings aren't restored automatically, even after the TXT record is confirmed. Add the TXT record back, select **Verify**, and then [test sign-in and enable SSO](./saml#test-and-enable) again. ## Display and actions {#display-and-actions} | Display / action {.nowrap} | Description | | --- | --- | | **Add a domain** | Claims a domain you own. The placeholder is `example.com`. | | **Organization domains** | The list of claimed and verified domains. | | **Domain** | The claimed or verified domain. | | **Host** | The hostname where you put the TXT record. The format is `_codatum-domain-verification.` followed by the domain. | | **TXT value** | The TXT record value. The format is `codatum-domain-verification=` followed by the issued token. | | **Copy to clipboard** | Copies **Host** or **TXT value**. | | **Status** | **Pending** or **Verified**. | | **TXT record not confirmed** | Shows that the automatic recheck couldn't confirm the TXT record twice in a row. The date and time when the warning started appears below it. For a domain that uses SSO, the date and time when [the SSO settings are removed](#saml-removal) also appears. | | **Verify** | Checks the TXT record. You can select it for both **Pending** and **Verified** domains. | | **Delete** | Deletes a **Pending** claim. | | **Revoke** | Clears **Verified** status. | ## Constraints {#constraints} * Verification succeeds when a TXT record on the displayed **Host** exactly matches the **TXT value**. Other TXT records can exist on the same host. * Verifying `example.com` doesn't include subdomains such as `www.example.com`. Add each subdomain separately. * Only one organization can have a verified domain. Your organization can't make a domain **Verified** if another organization has already verified it. * You can't add the same domain twice in the same organization. * Free email domains can't be added. * Names that are a public suffix themselves, such as `com`, `co.jp`, or `github.io`, can't be added. You can add names such as `example.com` and `foo.github.io`. * You can't add a URL or email address. Enter the domain name only. * Internationalized domain names are converted to Punycode (ASCII). * Keep the TXT record on the displayed **Host** after verification. If you remove it, the [automatic recheck](#recheck) shows a warning. * A pending claim remains until you select **Delete**. While another organization has verified the domain, selecting **Verify** returns an error. Delete the claim if you no longer need it. After the other organization revokes the domain, you can verify the same claim. * After the feature becomes unavailable under your contract, you can still open the list from the menu if domains already exist. **Verify** and **Delete** / **Revoke** remain available. You can't use **Add domain** to add a new domain. ## When the TXT record isn't found {#txt-not-found} 1. Confirm that **Host** and **TXT value** in the list exactly match what you registered in DNS. 2. Confirm that you put the TXT record on the displayed **Host**, not on the domain itself. 3. Wait for DNS to propagate, then select **Verify** again. 4. If a message says that DNS couldn't be looked up, wait a while, then select **Verify** again. If another organization has already verified the domain, contact Codatum support. ## When a warning appears {#txt-missing-warning} 1. Confirm that **Host** and **TXT value** in the list exactly match what you registered in DNS. 2. If you removed or changed the TXT record, register it again with the displayed **Host** and **TXT value**. 3. Confirm that the domain hasn't expired and that its DNS servers respond. 4. After DNS has propagated, select **Verify**. When the TXT record is confirmed, the warning disappears. If the warning doesn't disappear even though the TXT record is registered correctly, contact Codatum support. --- --- url: 'https://docs.codatum.com/organization/settings/saml.md' description: >- How organization owners let people with a verified-domain email address sign in through the organization's identity provider --- # SAML SSO (Optional feature) In **SAML SSO** under [organization settings](../overview#organization-settings), you register a SAML identity provider (IdP) so that people with an email address on a verified domain can sign in through it. Only an organization owner can make these changes. ::: tip This is an **optional feature**. Depending on your contract, it might not be available. ::: ## How SAML SSO works {#about} You turn on SSO for each domain verified in [Domains](./domains). After you turn it on, people who sign in with an email address on that domain see **Sign in with SSO**. They authenticate with your organization's IdP, such as Okta, Google Workspace, or Microsoft Entra ID, and are signed in to Codatum. * SSO applies to every account with an email address on the domain, whether or not the account belongs to a workspace in your organization. * Password and Google sign-in remain available after you turn on SSO. * For the sign-in flow on the user side, see [Signing in with SSO](../../account/settings/login#sso-login). You set up SSO in the following order. ```mermaid flowchart LR A[Verify a domain] --> B[Add an IdP] B --> C[Create an app in the IdP] C --> D[Enter IdP settings] D --> E[Test sign-in] E --> F[Enable SSO] ``` ## Adding an identity provider {#add-idp} The following prerequisites apply. * Only an organization owner can make these changes. * Verify the domain that will use SSO in [Domains](./domains). * You need to be able to create a SAML app in your IdP. * The **SAML SSO** menu is shown when this feature is available. 1. Open the workspace icon at the top of the [global nav](../../guide/screen-layout) > **Organization settings** > **SAML SSO**. 2. Select **Add identity provider**. 3. In **Name**, enter a name that identifies the IdP, then select **Add**. The new IdP appears in the list as **Not configured**. Under **Set these in your IdP**, the **SP entity ID** and **ACS URL** to register in your IdP are shown. ## Setting up your IdP {#idp-side-setup} Create a SAML app in your IdP and register the Codatum values. Every IdP needs the following three settings. | Setting in your IdP | Value | | --- | --- | | SP entity ID (audience) | The **SP entity ID** shown in Codatum. | | ACS URL (reply URL) | The **ACS URL** shown in Codatum. | | NameID | The user's email address. The format is `urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress`. | If the NameID isn't an email address, sign-in fails. You also need to assign users to the app in your IdP. After you create the app, note the following three values from your IdP. You use them in [Entering IdP settings](#enter-idp-settings). * The IdP entity ID (issuer) * The SSO URL * The X.509 signing certificate (PEM format) Screen names in your IdP might change. For details, see your IdP's documentation. ### Okta {#okta} 1. In the Okta admin console, open **Applications** > **Applications** > **Create App Integration**. 2. For **Sign-in method**, select **SAML 2.0**, then select **Next**. 3. Enter any name in **App name**, then select **Next**. 4. In **Configure SAML**, enter the following, then select **Next**: * **Single sign-on URL**: the Codatum **ACS URL** * **Use this for Recipient URL and Destination URL**: on (on by default) * **Audience URI (SP Entity ID)**: the Codatum **SP entity ID** * **Name ID format**: **EmailAddress** * **Application username**: **Email** 5. In **Feedback**, select that this is an internal app you created, then select **Finish**. 6. On the **Assignments** tab, assign the users or groups who will sign in. 7. On the **Sign On** tab, open **More details** under **Metadata details**, and note the **Sign on URL**, the **Issuer**, and the **Signing Certificate**. In Codatum, enter the Issuer in **IdP entity ID** and the Sign on URL in **SSO URL**. In **X.509 certificates**, paste the contents of the file (PEM format) saved with **Download** for the signing certificate. ### Google Workspace {#google-workspace} You need super administrator privileges in Google Workspace. 1. In the Google Admin console, open **Apps** > **Web and mobile apps**. 2. Select **Add app** > **Add custom SAML app**. 3. Enter any name for the app, then select **Continue**. 4. In **Google Identity Provider details**, note the **SSO URL**, the **Entity ID**, and the **Certificate**, then select **Continue**. 5. In **Service provider details**, enter the following, then select **Continue**: * **ACS URL**: the Codatum **ACS URL** * **Entity ID**: the Codatum **SP entity ID** * **Signed response**: leave it off * Name ID format: **EMAIL** * **Name ID**: **Basic Information > Primary email** (the default) 6. Select **Finish** without adding attribute mappings. 7. Open **User access** for the app, set **Service status** to **On** for the organizational units or groups who will sign in, then select **Save**. In Codatum, enter the Entity ID from step 4 in **IdP entity ID** and the SSO URL in **SSO URL**. In **X.509 certificates**, paste the contents of the certificate (from `-----BEGIN CERTIFICATE-----` through `-----END CERTIFICATE-----`). A newly created app is off for all users. ### Microsoft Entra ID {#entra-id} The labels below are the names shown when the Microsoft Entra admin center is displayed in English. 1. In the Microsoft Entra admin center, open Enterprise applications > New application > Create your own application. 2. Select Integrate any other application you don't find in the gallery (Non-gallery), then create the app. 3. In the app's Single sign-on, select SAML. 4. In Basic SAML Configuration, enter the following: * Identifier (Entity ID): the Codatum **SP entity ID** * Reply URL (Assertion Consumer Service URL): the Codatum **ACS URL** 5. In Attributes & Claims, set the format of Unique User Identifier (Name ID) to Email address, and choose a source attribute that holds the user's email address. * If the user principal name (`user.userprincipalname`) differs from the email address, choose `user.mail`. 6. In SAML Certificates, download Certificate (Base64). 7. In Set up (app name), note the Login URL and the Microsoft Entra Identifier. 8. In Users and groups, assign the users or groups who will sign in. In Codatum, enter the Microsoft Entra Identifier in **IdP entity ID** and the Login URL in **SSO URL**. In **X.509 certificates**, paste the contents of the downloaded certificate. ## Entering IdP settings {#enter-idp-settings} 1. Open the workspace icon at the top of the [global nav](../../guide/screen-layout) > **Organization settings** > **SAML SSO**. 2. For the IdP, select **Enter IdP settings**. For an IdP that already has settings, select **Edit**. 3. Enter **IdP entity ID**, **SSO URL**, and **X.509 certificates**, then select **Save**. After you save, the IdP status becomes **Draft**, and **Domains that use SSO** appears. ## Testing sign-in and enabling SSO {#test-and-enable} For each domain, you test sign-in first and then enable SSO. A test sign-in doesn't change how users sign in. 1. Open the workspace icon at the top of the [global nav](../../guide/screen-layout) > **Organization settings** > **SAML SSO**. 2. In **Domains that use SSO** for the IdP, select **Test sign-in**. 3. In the window that opens, sign in to your IdP as a user with an email address on the domain where you want to enable SSO. 4. Confirm that a success message appears and that the domain status changes to **Tested**. 5. For that domain, select **Enable SSO**, then select **Enable SSO** in the confirmation dialog. After you enable it, the domain status becomes **SSO enabled** and the IdP status becomes **Active**. To use SSO on more than one domain, test and enable each domain separately. You can follow the same steps for a domain that already uses SSO with another IdP. After you switch, people on that domain sign in with the new IdP. To migrate to a new IdP, add and test the new IdP, switch the domain to it, then disable the old IdP. ## Stopping SSO {#stop-sso} 1. Open the workspace icon at the top of the [global nav](../../guide/screen-layout) > **Organization settings** > **SAML SSO**. 2. For the domain, select **Stop SSO**, then select **Stop SSO** in the confirmation dialog. After you stop it, people can't sign in with SSO using an email address on that domain. The test result is kept, so you can select **Enable SSO** again without testing again. ## Disabling and deleting an identity provider {#disable-and-delete} 1. Open the workspace icon at the top of the [global nav](../../guide/screen-layout) > **Organization settings** > **SAML SSO**. 2. For the IdP, select one of the following: * **Disable**: In the confirmation dialog, select **Disable identity provider**. * **Delete**: In the confirmation dialog, select **Delete identity provider**. When you **Disable** an IdP, sign-in and test sign-in with it stop. SSO stops on every domain that used the IdP. The settings and test results are kept. Selecting **Enable** returns the IdP to **Draft**. To resume SSO, select **Enable SSO** again for each domain. **Delete** can't be undone. You can't delete an **Active** IdP, so disable it first. To use a deleted IdP again, add it as a new IdP and register the new **SP entity ID** in your IdP. ## Rotating certificates {#certificate-rotation} When you renew the IdP's signing certificate, register the old and new certificates side by side so that sign-in keeps working during the switch. 1. For the IdP, select **Edit**, add the new certificate with **Add certificate**, then select **Save**. 2. In your IdP, switch the signing certificate to the new one. 3. Select **Edit** again, select **Remove** for the old certificate, then select **Save**. Changing only the certificates doesn't clear test results. ## Display and actions {#display-and-actions} Each IdP shows the following items. | Display / action {.nowrap} | Description | | --- | --- | | **Add identity provider** | Adds an IdP with a name. The **SP entity ID** and **ACS URL** are issued after you add it. | | Status | **Not configured**, **Draft**, **Active**, or **Disabled** (see [Identity provider status](#idp-status)). | | **SP entity ID** | The SP entity ID to register in your IdP. It's unique to each IdP and can't be changed. | | **ACS URL** | The reply URL to register in your IdP. | | **IdP entity ID** | The entity ID (issuer) issued by your IdP. | | **SSO URL** | The SSO URL of your IdP. Only `https` URLs are accepted. | | **Certificates** | The number of registered X.509 certificates. | | **Test sign-in** | Signs in to your IdP and checks whether this IdP can be used for the domain of that email address. | | **Domains that use SSO** | The organization's verified domains and their status for this IdP (see [Domain status](#domain-sso-status)). | | **Enable SSO** | Makes this IdP the SSO destination for a **Tested** domain. | | **Stop SSO** | Stops SSO for a domain that shows **SSO enabled**. | | **Edit** | Changes the name and IdP settings. | | **Enable** | Returns a **Disabled** IdP to **Draft**. | | **Disable** | Stops sign-in with the IdP. The settings are kept. | | **Delete** | Deletes the IdP. Not shown for an **Active** IdP. | | **Resync** | Shown when saved settings haven't been applied. Selecting it applies them again. | ### Identity provider status {#idp-status} | Status {.nowrap} | Description | | --- | --- | | **Not configured** | Only the name is registered. You can't test sign-in or enable SSO. | | **Draft** | IdP settings are entered, and SSO isn't enabled on any domain. You can test sign-in. | | **Active** | SSO has been enabled on at least one domain. The IdP stays **Active** even if you later stop SSO on the domain. | | **Disabled** | Sign-in and test sign-in aren't available. The settings are kept. | ### Domain status {#domain-sso-status} | Status {.nowrap} | Description | | --- | --- | | **Not tested** | No test sign-in has been done with this IdP. | | **Tested** | A test sign-in with this IdP succeeded. You can select **Enable SSO**. | | **SSO enabled** | This IdP is the SSO destination for the domain. | | **TXT record not confirmed** | The domain was tested, but SSO can't be enabled because the [domain recheck](./domains#recheck) couldn't confirm the TXT record. | A domain that uses SSO with another IdP shows SSO is enabled with "(IdP name)". ## Constraints {#constraints} * A domain can use only one IdP for SSO. One IdP can be used for multiple domains in the organization. * An organization can register up to five IdPs. Deleted IdPs don't count. * **Name** can be up to 100 characters. * Each IdP can have one to three **X.509 certificates**. Enter one PEM-format certificate per field. Expired certificates can't be registered. * Changing **IdP entity ID** or **SSO URL** clears the IdP's test results, and its domains return to **Not tested**. SSO doesn't stop on domains where it's already enabled. * Revoking a [domain](./domains) clears SSO and test results for that domain. * While a domain shows the [TXT record not confirmed](./domains#recheck) warning, you can't enable SSO for it. Sign-in with SSO that is already enabled keeps working. If it still can't be confirmed after 30 days, the SSO settings for that domain are removed ([When SSO settings are removed](./domains#saml-removal)). * Sign-in starts from the Codatum sign-in page. Sign-in started from the IdP, such as from the IdP's dashboard, isn't supported. * After the feature becomes unavailable under your contract, you can still open the list from the menu if IdPs already exist. You can disable and delete existing IdPs. You can't add IdPs or change their settings. The limits are also listed in [Limits](../../reference/limits#fixed-limits). ## When test sign-in doesn't succeed {#test-failed} The test sign-in result appears inside the IdP card. Check the following based on the message. 1. If sign-in with the IdP failed, confirm that the SP entity ID and ACS URL in your IdP match what Codatum shows. 2. Then confirm that **IdP entity ID**, **SSO URL**, and the certificate entered in Codatum match the values in your IdP. 3. If the message says the NameID isn't an email address, set the NameID to the email address in your IdP. 4. If the message says the domain isn't a verified domain, sign in again with an email address on one of your organization's verified domains. 5. If the message says the TXT record couldn't be confirmed, restore the TXT record and verify the domain again in [Domains](./domains#txt-missing-warning). If the message says the sign-in window was blocked, allow pop-ups for Codatum in your browser, then select **Test sign-in** again. ## When "The latest settings have not been applied" appears {#sync-warning} This means saved settings couldn't be applied to the settings used for sign-in. The settings themselves are saved. 1. Select **Resync**. 2. If the message doesn't disappear, wait a while, then select **Resync** again. If the message still doesn't disappear, contact Codatum support. --- --- url: 'https://docs.codatum.com/reference/limits.md' description: A list of the numeric limits documented here --- # Limits ::: info The values on this page reflect the current specification and might change without notice. Some limits aren't listed here. To check the limits that actually apply, see the screen for each feature, or **Usage** in workspace settings. ::: ## Fixed limits {#fixed-limits} The following items have a fixed limit regardless of your contract. | Item | Limit | | --- | --- | | Connection owners | Up to 3 | | [Codatum Data Connection](../features/connection/overview#codatum-data-connection) | You can't edit the general settings, access level and permissions, or sync targets. You can't delete the connection. | | Teamspace owners | Up to 3 | | Group owners | Up to 3 | | Notebook size | A warning is shown when it exceeds 1MB Can't be edited once it exceeds 10MB | | Image upload size in notebooks and comments | Less than 10MB per file | | Video upload size in a notebook | Less than 100MB per file | | Inline table name | Up to 200 characters | | CSV or Excel file uploaded to an inline table | Up to 10MiB. For Excel files, up to 200MiB expanded. For Shift\_JIS or UTF-16 CSV files, the size after conversion to UTF-8 counts | | Inline table reference alias | Up to 128 characters | | Inline table | Up to 100 columns (folder columns aren't counted) and 10MiB | | Inline table rows | Up to 2,000 rows | | Rows read from a connector source of an inline table | Up to 2,000 rows per source file (sheet, file, app, or data source) | | Connector sources of an inline table | Up to 10 per inline table | | Google Drive files read as a connector source of an inline table | Up to 10MiB and 1,000 columns. For .xlsx files, up to 50MiB expanded. For Google Sheets spreadsheets, the exported .xlsx can be up to 10MiB and up to 50MiB expanded, and can't exceed the Google export limit (about 10MB) | | Items shown in the list of connector sources of an inline table | Up to the first 1,000 kintone apps and the first 1,000 Notion data sources. Up to the 100 most recently modified Google Drive files | | Notion property values read as a connector source of an inline table | For relations, people, titles, and text, up to the first 25 items per page | | Downloading an inline table as Excel (.xlsx) | Up to 32,767 characters of text per cell | | Writing an inline table to Google Sheets | Up to 50,000 characters per cell. Up to 1 million cells in the table (rows, excluding the column name row, × columns), and up to about 70MB of data to send (dates, datetimes, and long strings take more space). Up to 10 million cells in the spreadsheet after writing | | Inline tables per notebook | Up to 100 | | Inline table revisions per notebook | Up to 1,000, with a combined size of 1GiB (including sheet settings) | | SQL with expanded inline tables | Up to 900KiB | | Sheet settings per inline table | Up to 4MiB (counted separately from the 10MiB CSV) | | Views per inline table | Up to 30 | | Inline table column display name | Up to 200 characters | | Inline table formula | Up to 2,000 characters | | Inline table manual values kept for removed rows | Up to the 5,000 most recent | | Grid page columns | 1-60 (default 12) | | Grid page row height | 10-120px (default 60px) | | Metadata sync: number of synced schemas (datasets) | Up to 200 | | Metadata sync: number of tables per schema | Up to 1,000 | | Catalog table preview | Up to 100 rows | | [PostgreSQL run results](../features/connection/warehouses/postgresql#result-limits) | Up to 1,048,575 rows or 100 MiB (uncompressed). Rows beyond the limit are cut off | | A row in [PostgreSQL run results](../features/connection/warehouses/postgresql#result-limits) | Up to 16 MiB (a larger row makes the SQL run fail) | | [SQL statements per PostgreSQL run](../features/connection/warehouses/postgresql#query-execution) | Only one | | [PostgreSQL SQL run time](../features/connection/warehouses/postgresql#query-execution) | Up to 15 minutes | | [PostgreSQL run result retention](../features/connection/warehouses/postgresql#result-retention) | Eligible for deletion 2 days after the run | | [Snowflake organization name and account name](../features/connection/warehouses/snowflake#configure) | Letters, numbers, `-`, and `_` only | | [Redshift region](../features/connection/warehouses/redshift#configure) | Letters, numbers, and `-` only | | Query folder depth | Up to 5 | | Saved query table function export history | Latest 50 entries | | Audit log retention ([new format](../workspace/access-and-security/audit-log#formats)) | 3 years from the date recorded | | Audit log retention ([legacy format](../workspace/access-and-security/audit-log#formats)) | 1 year from the date recorded | | Agent usage retention | 30 days | | Routine schedule | Minutes in 5-minute steps. Runs at least 10 minutes apart | | Routine instruction | Up to 30,000 characters | | Workflow schedule | Minutes in 5-minute steps. Runs at least 10 minutes apart | | Canvas description | Up to 500 characters | | Data loaded into a Canvas | Up to 20 per Canvas, 12 MB in total | | Tool results and attached files loaded into a Canvas | Up to 3 MB each (size of the table as JSON) and 100 columns | | Canvas list search words | Up to 100 characters. Only the first 5 space-separated words are used. | | Agent session retention | 30 days after last activity, including shared sessions | | Agent message text | Up to 30,000 characters | | Files attached to an agent message | Up to 10 per message. Images up to 2 MB after resizing; other files up to 10 MB each. PDFs up to 500 pages. Excel files up to 50 MB uncompressed. Up to 10 MB of text read from a PDF or Excel file | | Recording time for agent [voice input](../features/ai-agent/overview#voice-input-behavior) | Up to 4 minutes per recording | | Access removal in an open shared session | Up to 5 minutes | | Removing a user from or deleting a [service account](../workspace/access-and-security/service-account#revocation) | Up to 1 hour, except for an open notebook editing screen | | Public link expiration | 1-90 days (when enabled; default is 30 days) | | Report cache duration | Up to 24 hours (default 24 hours; 0 disables caching; in 10-minute increments) | | Signed embed token expiration (`expires_in`) | Default 3600 seconds, up to 86400 seconds | | Signed embed cache max age (`cache_max_age`) | Default 86400 seconds, up to 86400 seconds (0 disables caching) | | Signed embed audit log note (`audit_note`) | Up to 256 characters | | Workflow steps | Up to 20 | | Workflow owners | Up to 30 | | Workflow email recipients | Up to 20 | | Workflow Run Query results (used by later steps) | Up to 20 rows | | Workflow HTTP Request headers | Up to 50 | | Workflow HTTP Request timeout | 30 seconds | | Workflow HTTP Request redirects | Up to 3 | | Text multi input parameter values | Up to 1,000 | | Text multi select parameter choices | Up to 1,000 | | PAT expiration | 1-365 days | | Email invitation expiration (workspace / organization owner) | 7 days from creation (7 days from resend if resent) | | [Verification code for joining via an allowed domain](../workspace/administration/invite#join-verification-code) | Expires 10 minutes after it's sent. You can resend 60 seconds after the previous send | | [Custom role](../workspace/access-and-security/roles) name and description | The name is 1 to 50 characters and must be unique in the workspace, ignoring case. URLs, email addresses, and built-in role names aren't allowed. The description is up to 500 characters. | | Workspace name | 1 to 50 characters; URLs and email addresses aren't allowed. | | Account full name and nickname | Full name: 1 to 50 characters. Nickname: optional, or 1 to 50 characters when set. Neither can contain URLs or email addresses. | | Email addresses per bulk invite | Up to 20 | | Invitation emails per workspace | Up to 200 in any 1-minute period, 400 in any 1-hour period, and 600 in any 24-hour period (new invitations, resends, and guest invitations from reports combined) | | Organization owner invitation emails | Up to 200 per organization in any 1-minute period, 400 in any 1-hour period, and 600 in any 24-hour period (new invitations and resends combined) | | [SAML SSO](../organization/settings/saml#constraints) identity providers | Up to 5 per organization (deleted IdPs don't count) | | [SAML SSO](../organization/settings/saml#constraints) X.509 certificates | 1 to 3 per IdP | | [SSO sign-in](../account/settings/login#sso-login-spec) validity | 7 days from your last SSO sign-in | | Chart rendering data points | Up to 1,000 rows | | Chart frames (grid layout) | Up to 16 | | Explorer Limit (rows fetched) | Up to 1,000 rows | | Explorer distribution tab target columns | Up to 5 | | AI profile usage limits | Up to one Monthly, Weekly, and Daily limit each for profile limit and per-user limit | | MCP access profile assignments | Up to 100 users and groups in total | | [MCP client connection](../workspace/external-integrations/mcp#connect) validity | Up to 30 days | | MCP direct tool call wait time | Up to 50 seconds | | MCP `run_sql` row retrieval | `limit`: 1–1,000 (default 50) | | MCP `get_query_result` row retrieval | `limit`: 1–1,000 (default 100); `offset`: 0 or greater (default 0); `offset + limit` must not exceed 1,000 | | MCP `external_service_search` results | `limit` (connectors): 1–20 (default 5); tools per connector: up to 10 (all tools when `connector_id` is set) | | Temporary file size for agent sending | Up to 50 MB | | Size of [files the agent downloads](../workspace/external-integrations/agent-connectors#file-download) with API connectors | Up to 10 MB | | Agent temporary file availability | In the same conversation, for the session's retention period | | Additional allowed URL prefixes for a custom API | Up to 10 | | Overview added to a connector | Up to 1,000 characters | | Skill docs added to a connector | Up to 10, with titles up to 100 characters and bodies up to 20,000 characters each | | MCP server instructions for a connector | First 4,000 characters (the rest isn't passed to the agent) | ## Limits that vary by contract {#plan-limits} The following items have a limit that varies by your contract. You can check the limit that applies to you in [global nav](../guide/screen-layout) > **Workspace settings** > **Usage**. * Number of members * Number of editors (including users with a [custom role](../workspace/access-and-security/roles#contract)) * Number of viewers * Number of guests * Number of groups * Number of teamspaces * Number of connections * Number of synced tables * Number of notebooks * Number of reports * Number of public links * Number of signed embeds * Number of queries * Number of active workflows * Monthly Codatum AI usage * Number of AI profiles (Managed and Custom combined) --- --- url: 'https://docs.codatum.com/reference/glossary.md' description: A glossary of Codatum terms with links to the detailed specifications --- # Glossary ## Screen {#screen} | Term {.nowrap} | Definition | Details | | --- | --- | --- | | Global nav | The entry points to the main features and settings, at the left edge of the screen | [Screen layout](../guide/screen-layout), [Navigation](../guide/navigation) | | Header | The region at the top of the screen. Holds the title, action buttons, and more | [Screen layout](../guide/screen-layout) | | Left sidebar | The region to the left of the main area. Holds lists, trees, filters, and more | [Screen layout](../guide/screen-layout) | | Main area | The region at the center of the screen. Holds the main content for that screen | [Screen layout](../guide/screen-layout) | | Right sidebar | The region to the right of the main area. Holds detail information, auxiliary panels, and more | [Screen layout](../guide/screen-layout) | ## Feature status {#feature-status} ### Release status | Term {.nowrap} | Definition | | --- | --- | | Preview | A pre-release feature that isn't available to everyone and requires a request for access | | Beta | A pre-release feature that's available to everyone but whose specification isn't finalized | | Deprecated | A feature that will be removed in the future | ### Availability {#optional-feature} | Term {.nowrap} | Definition | | --- | --- | | Optional feature | A feature whose availability depends on your contract | ## Account {#account} | Term {.nowrap} | Definition | Details | | --- | --- | --- | | Account | The unit you use to log in to Codatum. A single account is shared across workspaces | [Account](../account/overview#account-and-user) | | Account settings | Account-wide settings and your settings for the current workspace | [Account settings](../account/overview#account-settings) | | User | An account that belongs to a workspace. Includes members and guests | [User](../workspace/administration/user#member-and-guest) | | Member | A Workspace Owner, Workspace Editor, Workspace Viewer, or user with a custom role | [User](../workspace/administration/user#member-and-guest) | | Guest | A workspace guest. Can only access limited resources | [User](../workspace/administration/user#member-and-guest) | | Service account | An account created in a workspace, independent of any user. It can have a workspace role, groups, and permissions on resources. It isn't used to log in. | [Service account](../workspace/access-and-security/service-account) | | PAT | Personal access token | [Personal Access Tokens](../account/settings/pat#issue-token) | ## Workspace and permissions {#workspace-and-permissions} | Term {.nowrap} | Definition | Details | | --- | --- | --- | | Workspace | The unit for managing a set of resources and users together | [Workspace](../workspace/overview) | | Organization | The unit that groups workspaces. Holds the organization name, country, organization owners, and billing information | [Organization](../organization/overview#organization-and-workspace) | | Organization owner | The role that can edit organization settings and invite or remove other organization owners. Can also manage billing and change the plan. Separate from workspace roles | [Members](../organization/settings/members#owners) | | Organization settings | The screen for managing the organization name, country, organization owners, and billing information | [Organization settings](../organization/overview#organization-settings) | | Resource | An object such as a notebook, connection, or teamspace | [Permissions overview](../permissions/overview#terminology) | | Workspace role | A role that every user in a workspace is always assigned exactly one of | [User](../workspace/administration/user#workspace-roles), [Permissions overview](../permissions/overview#terminology) | | Custom role | A workspace role created for each workspace by choosing a permission level for each area | [Roles](../workspace/access-and-security/roles) | | Resource role | A role assigned to an individual resource | [Permissions overview](../permissions/overview#terminology) | | Group | A unit for granting permissions to multiple users together | [Group](../workspace/administration/group) | | Teamspace | An area where a specific team jointly manages notebooks and folders | [Teamspace](../workspace/administration/teamspace) | | Access scope | The framework that determines how permissions are evaluated, based on the type of root folder a resource belongs to | [Access scope](../permissions/overview#access-scope) | | Access level | A setting that determines who can use a connection | [Access level](../permissions/resources/connection#access-level) | | Additional notebook permissions | A feature for granting specific users or groups access to a notebook, separate from a folder's base permissions | [Additional notebook permissions](../features/notebook/sharing/additional-permissions/overview) | | Shared folder | The area where notebooks shared through additional notebook permissions appear for the recipient | [Folders](../features/notebook/folder) | | Domain | In organization settings, a domain whose ownership you prove with a DNS TXT record. Only one organization can have a verified domain | [Domains](../organization/settings/domains) | | SAML SSO | A setting that lets people with an email address on a verified domain sign in through the organization's IdP | [SAML SSO](../organization/settings/saml) | | Allowed domain | A setting that allows accounts with an email address at a specified domain to join | [Invitations and joining](../workspace/administration/invite#allowed-domains) | | API key | Credentials tied to a workspace | [API keys](../workspace/access-and-security/api-key) | | Workspace policy | A setting that restricts public link creation or Codatum CLI use at the workspace level | [Workspace policy](../workspace/access-and-security/policy#policy-settings) | | Audit logs | A record of important actions and system events | [Audit logs](../workspace/access-and-security/audit-log) | | MCP | A protocol for connecting AI agents and tools (Model Context Protocol) | [MCP clients](../workspace/external-integrations/mcp), [Agent connectors](../workspace/external-integrations/agent-connectors) | ## Data {#data} | Term {.nowrap} | Definition | Details | | --- | --- | --- | | Connection | A connection setting for a data warehouse. The unit for running SQL and syncing table metadata | [Connection](../features/connection/overview) | | Demo connection | A sample connection for trying out the product. Its on-screen connection name is `Demo Connection` | [Demo connection](../features/connection/overview#demo-connection) | | Job label | Metadata that identifies the source of execution on the data warehouse side | [Job label](../features/connection/job-label) | | Catalog | The feature that manages metadata for tables and saved queries | [Catalog](../features/catalog/overview) | | Table metadata sync | The process that brings table and column metadata from a connection into the catalog | [Table metadata sync](../features/catalog/metadata-sync) | | Annotation | A description and tags added to a table or column in the catalog (the on-screen labels are **Description** / **Tags**) | [Annotation](../features/catalog/annotation) | | Tag | A classification label defined at the workspace level and applied to tables, columns, queries, reports, and more | [Tags](../workspace/data-management/tag) | | Query job | A unit of SQL execution history. Used as the basis for popularity and referenced in catalog details | [Query jobs](../features/catalog/overview#query-jobs) | | Popularity | A relative score based on how often a query job is referenced | [Popularity](../features/catalog/overview#popularity) | ## Analysis and sharing {#analysis-and-sharing} | Term {.nowrap} | Definition | Details | | --- | --- | --- | | Quick search | Cross-search across notebooks, tables, and queries | [Quick search](../features/quick-search/overview) | | Query (saved query) | Saved SQL reused within a connection | [Query](../features/saved-query/overview) | | Notebook | Your workspace for analysis, bringing together SQL, charts, and text | [Notebook](../features/notebook/overview) | | Doc page | A notebook page type using a flow-based block editor to lay out SQL, charts, text, and more vertically | [Doc page](../features/notebook/doc-page/overview) | | Grid page | A dashboard-style notebook page type that tiles charts and other content defined on doc pages | [Grid page](../features/notebook/grid-page/overview) | | SQL block | The unit for editing and running SQL, showing results, and creating charts within a notebook | [SQL block](../features/notebook/doc-page/sql-block) | | Chart | A feature that aggregates and processes SQL results and displays them as a graph or table | [Chart](../features/notebook/chart/overview) | | Dimension | The axis a chart uses to group data (shown on screen as **X value**, **Label**, **Hierarchy**, and similar) | [Dimensions and metrics](../features/notebook/chart/concept/dimension-metrics#dimension-metric) | | Metric | The numeric value a chart aggregates (shown on screen as **Y value** and **Value**) | [Dimensions and metrics](../features/notebook/chart/concept/dimension-metrics#dimension-metric) | | In-memory processing | Processing that builds chart data in the browser without issuing new SQL, used when the data source has 1,000 rows or fewer | [In-memory processing](../features/notebook/chart/concept/overview#in-memory-processing) | | Frame | A feature that splits a chart into multiple charts based on the values in a specified column | [Frame feature](../features/notebook/chart/common-settings/frame#frame-feature) | | Parameter | A mechanism that uses an input form at the top of a page or on a grid page, together with placeholders in SQL, to repeat the same analysis with different values | [Parameter](../features/notebook/parameter/overview) | | Explorer | A feature for filtering, aggregating, and pivoting SQL results or chart data sources through a GUI | [Explorer](../features/notebook/explorer) | | Comment | Discussion and feedback attached to the body of a notebook or report. Supports mentions | [Comment](../features/notebook/comment) | | Snapshot | The content of a notebook at the time it was published, as shown through a report, public link, or signed embed | [Sharing](../features/notebook/sharing/overview) | | Report | A feature for publishing and sharing a notebook, for example as read-only | [Report](../features/notebook/sharing/report/overview) | | Public link | A feature that publishes a notebook's content as a snapshot at publish time and lets people view it without logging in | [Public link](../features/notebook/sharing/public-link/overview) | | Signed embed | A feature that embeds a notebook's published content into an external site or app using an API key and token | [Signed embed](../features/notebook/sharing/signed-embed/overview) | | Workflow | A feature that processes query or report steps on a schedule and connects them to follow-up actions such as notifications | [Workflow](../features/workflow/overview) | | Template variable | A mechanism for embedding values such as the results of earlier steps into a workflow's body, prompts, or run conditions (using Liquid syntax) | [Template variables](../features/workflow/template-variables) | | Codatum CLI | A CLI (`cdm`) for operating Codatum from a terminal, CI, or an AI agent | [Codatum CLI](../features/cli/overview) | ## AI {#ai} | Term {.nowrap} | Definition | Details | | --- | --- | --- | | AI agent | A feature that autonomously carries out data analysis and notebook creation and editing based on natural language instructions | [AI agent](../features/ai-agent/overview) | | Canvas | An HTML page created by the AI agent. You can view and share it from a dedicated URL, and review it from **Canvases** on the full page | [Canvas](../features/ai-agent/overview#canvas) | | AI Assistant | A chat-based AI for creating SQL and charts and answering questions. A deprecated legacy feature; new provisioning has been discontinued. Its successor is the AI agent | [AI Assistant](../features/ai-assistant/overview) | | AI Analyst | A way (role) to launch the AI Assistant, for example from the `/` menu on a doc page | [AI Assistant](../features/ai-assistant/overview#roles) | | AI Support | An AI Assistant role for answering questions about how to use Codatum | [AI Assistant](../features/ai-assistant/overview#roles) | | AI profile | The unit of settings for the connection method, permissions, and fixed context used by the LLM for the AI agent and workflows | [AI profile](../workspace/codatum-ai/ai-profile) | | Agent context | Context that the AI agent loads automatically (the `.agent` folder or page, or context from an AI profile) | [Agent context](../features/ai-agent/agent-context) | | Agent connector | An external integration used by AI agents, MCP clients, or inline tables (MCP or API) | [Agent connectors](../workspace/external-integrations/agent-connectors) | --- --- url: 'https://docs.codatum.com/reference/requirements.md' description: 'Recommended OS and browsers, and known browser extension issues' --- # System requirements ## Recommended environment ### Operating system For using the web app (browser). * Windows (latest version) * macOS (latest version) ### Browser * Windows: Google Chrome, Microsoft Edge (latest version) * macOS: Google Chrome, Safari (latest version) ### Codatum CLI {#codatum-cli} The [Codatum CLI](../features/cli/overview) (`cdm`) is distributed for the following platforms. * macOS (Apple Silicon / Intel) * Linux (x64 / arm64, glibc and musl) * Windows (x64) For installation instructions, see the [Codatum CLI documentation](https://cli-docs.codatum.com). ## Notes ::: warning Some browser extensions can affect notebook performance. If you run into issues, try disabling the extension. ::: The following browser extensions are known to cause issues. * DeepL Translate (Chrome extension) * Microsoft Translator (Edge add-on)