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

# Connecting Starburst Galaxy to Omni

> Learn how to create a dedicated Starburst Galaxy user, grant privileges, and connect your Galaxy cluster to Omni.

export const BaseAccess = () => {
  return <span>
      <ParamField path="Base Access" required>
        Select the <a href="/administration/users/permissions">minimum level of access</a> users should have to models in the connection.
      </ParamField>
    </span>;
};

export const AlwaysScopeViewNames = () => {
  return <span>
      <ParamField path="Always Scope View Names" default="enabled">
        When enabled, Omni will prefix generated view names with schema and catalog, e.g. <code>my_catalog_public__orders</code> instead of <code>orders</code>. Defaults to enabled. See <a href="/connect-data/view-name-generation">View name generation</a> for more information.
      </ParamField>
    </span>;
};

export const AutoGenerateRelationshipsAllModes = () => {
  return <span>
      <ParamField path="Auto-generate relationships" default="Both">
        Controls how Omni infers relationships during schema refreshes. Select from four modes:

        <ul>
        <li><strong>Both</strong> - Infer from foreign key constraints and column name matching</li>
        <li><strong>Foreign keys only</strong> - Foreign key constraints only</li>
        <li><strong>Column names only</strong> - Column name matching only</li>
        <li><strong>None</strong> - Skip auto-generation entirely</li>
        </ul>
      </ParamField>
    </span>;
};

export const TrustServerCertificate = () => {
  return <span>
      <ParamField path="Trust Server Certificate">
        Whether to trust the server's SSL/TLS certificate without validation. Enable this option when connecting to a database that uses a self-signed certificate or a certificate signed by an internal certificate authority that Omni cannot otherwise verify.
      </ParamField>
    </span>;
};

export const AllowUserSpecificTimezones = () => {
  return <span>
      <ParamField path="Allow User-Specific Timezones">
        When enabled, users can override the connection timezone with their own when querying.
      </ParamField>
    </span>;
};

export const QueryTimezone = () => {
  return <span>
      <ParamField path="Query Timezone" required>
        The timezone to use for Omni queries. If a timezone is specified, data will be converted from the <strong>Database Timezone</strong> to the selected timezone.
      </ParamField>
    </span>;
};

export const DatabaseTimezone = () => {
  return <span>
      <ParamField path="Database Timezone" required>
        The timezone used by the database.
      </ParamField>
    </span>;
};

export const Password = () => {
  return <span>
      <ParamField path="Password" required>
        The password for database authentication.
      </ParamField>
    </span>;
};

export const TableUploads = ({label = "Schema for Table Uploads", term = "schema"}) => {
  return <span>
      <ParamField path={label}>
        The name of the {term} to use for table (CSV) uploads. If left blank, you can upload tables but they won't be pushed to the database or be available for use in joins.
      </ParamField>
    </span>;
};

export const Offloaded = ({term = "Schemas"}) => {
  const lower = term.toLowerCase();
  return <span>
      <ParamField path={`Offloaded ${term}`}>
        A comma-separated list of {lower} to include in the connection, which will only load on demand. This setting is good for large {lower} or dbt dev {lower}.
      </ParamField>
    </span>;
};

export const Default = ({term = "Schema", required = true, defaultValue}) => {
  const lower = term.toLowerCase();
  return <span>
      <ParamField path={`Default ${term}`} required={required} default={defaultValue}>
        The default {lower} for the connection.
      </ParamField>
    </span>;
};

export const IncludeOther = ({term = "Schemas"}) => {
  const lower = term.toLowerCase();
  return <span>
      <ParamField path={`Include Other ${term}`}>
        A comma-separated list of other {lower} to include in the connection.
      </ParamField>
    </span>;
};

export const Database = () => {
  return <span>
      <ParamField path="Database" required>
        The database to connect to.
      </ParamField>
    </span>;
};

export const Port = ({defaultValue}) => {
  return <span>
      <ParamField path="Port" required default={defaultValue}>
        The port number for the database connection.
      </ParamField>
    </span>;
};

export const Host = ({additionalCopy}) => {
  return <span>
      <ParamField path="Host" required>
        The address of the database server. {additionalCopy}
      </ParamField>
    </span>;
};

export const DisplayName = () => {
  return <span>
      <ParamField path="Display Name" required>
        A user-friendly name for the connection, which will be used throughout Omni.
      </ParamField>
    </span>;
};

This guide covers connecting Omni to [Starburst Galaxy](https://www.starburst.io/starburst-galaxy/), Starburst's managed Trino service.

<Note>
  In Trino, a **catalog** is what other databases call a database — it's a configured connection to an underlying data source (such as Iceberg, Hive, Postgres, or Snowflake). A Trino cluster can expose multiple catalogs, each containing schemas and tables. Throughout this guide, the Omni connection field labeled **Database** refers to a Trino catalog.
</Note>

## Requirements

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

* **Organization Admin** permissions in Omni
* **In Starburst Galaxy**:
  * Permissions that allow you to create roles, users, and assign privileges. The `accountadmin` role includes all these permissions.
  * An existing Galaxy cluster

## Setup

<Steps>
  <Step title="Create a Galaxy role for Omni" id="create-omni-role" titleSize="h3">
    In this step, you'll [create a dedicated Galaxy role](https://docs.starburst.io/starburst-galaxy/security-and-compliance/manage-galaxy-access/manage-users-roles-and-tags/index.html#add-a-role) for Omni. You'll assign privileges to the role in a later step.

    1. In Galaxy, navigate to **Access > Roles and privileges**.
    2. Click **Create role**.
    3. Enter a name (for example, `omni`) and an optional description.
    4. Check the **Grant to the creating role** checkbox. This grants the new role to your current role so that you can continue to administer it.
    5. Click **Create role**.
  </Step>

  <Step title="Grant privileges to the role" titleSize="h3">
    Next, you'll grant privileges to the Omni role that will allow it to access the cluster and the catalogs and schemas it contains.

    <Steps>
      <Step title="Grant cluster access to the role" id="cluster-access">
        Start by granting the role permission to run queries on the cluster Omni will connect to.

        1. On the **Roles and privileges** page, click the `omni` role you just created.
        2. Open the **Privileges** tab.
        3. Click **Add privileges**.
        4. Click the **Cluster** tab.
        5. In the **Cluster alias** dropdown, select the cluster Omni will connect to.
        6. Set **Do you want to allow access?** to **Allow**.
        7. Under **What can they do?**, select **Use cluster**. The dialog should look like the following:

                   <Frame caption="Configured cluster privileges for the Omni role">
                     <img src="https://mintcdn.com/omni-e7402367/pWESsJx-Uvh-y4ip/connect-data/images/starburst-cluster-privileges.png?fit=max&auto=format&n=pWESsJx-Uvh-y4ip&q=85&s=83e404750cfcdbce88293915efdb111e" alt="Configured cluster access privileges for the Omni role in the Starburst Galaxy UI" width="1181" height="789" data-path="connect-data/images/starburst-cluster-privileges.png" />
                   </Frame>
      </Step>

      <Step title="Grant data privileges to the role" id="grant-data-access">
        Next, grant the role [access to the catalogs and schemas](https://docs.starburst.io/starburst-galaxy/security-and-compliance/manage-data-access/data-privileges.html) you want to model in Omni.

        1. Still on the **Add privileges** dialog, click the **Data** tab.

        2. In the **Scope** dropdown, select a catalog you want Omni to access.

           You can also toggle a catalog open to grant access on a per-schema basis:

                   <Frame caption="Toggle open a catalog to selectively grant schema access">
                     <img src="https://mintcdn.com/omni-e7402367/pWESsJx-Uvh-y4ip/connect-data/images/starburst-select-a-schema.png?fit=max&auto=format&n=pWESsJx-Uvh-y4ip&q=85&s=8888e540cef1c2f2715a5209d62ceccc" alt="List of schemas in a catalog in the Starburst Galaxy UI" width="615" height="360" data-path="connect-data/images/starburst-select-a-schema.png" />
                   </Frame>

        3. Set **Do you want to allow access?** to **Allow**.

        4. Under **What can they do?**, select **Select from table**. The dialog should look like the following:

                   <Frame caption="Configured data privileges for the Omni role">
                     <img src="https://mintcdn.com/omni-e7402367/pWESsJx-Uvh-y4ip/connect-data/images/starburst-data-privileges.png?fit=max&auto=format&n=pWESsJx-Uvh-y4ip&q=85&s=62269fed2789a5837ec23a6007e134d7" alt="Configured data access privileges for the Omni role in the Starburst Galaxy UI" width="1176" height="796" data-path="connect-data/images/starburst-data-privileges.png" />
                   </Frame>

        5. Repeat this for every catalog and schema you want Omni to query.

        6. Click **Save privileges**.
      </Step>
    </Steps>
  </Step>

  <Step title="Create the Omni user in Galaxy" id="create-omni-user" titleSize="h3">
    Next, you'll create a dedicated Galaxy user for Omni and assign it the role you configured.

    1. In Galaxy, navigate to **Access > Users**.

    2. Click **Create user**.

    3. Enter an email address for the new user (for example, `omni@yourcompany.com`).

           <Note>
             Galaxy will send an invitation email to this address. You'll need access to the inbox to complete the account setup and set a password.
           </Note>

    4. In **Roles**, select the `omni` role you created earlier.

    5. In **Default role**, select the `omni` role. The dialog should look like the following:

           <Frame caption="Create Omni user settings">
             <img src="https://mintcdn.com/omni-e7402367/pWESsJx-Uvh-y4ip/connect-data/images/starburst-create-user.png?fit=max&auto=format&n=pWESsJx-Uvh-y4ip&q=85&s=6e3c68dd40b8a66b71a2061301960e18" alt="Initial settings for creating an Omni user in the Starburst Galaxy UI" width="620" height="420" data-path="connect-data/images/starburst-create-user.png" />
           </Frame>

    6. Click **Add user**.

    7. Open the invitation email and follow the link to set the user's password. Save the password somewhere secure — you'll need it when configuring the Omni connection.
  </Step>

  <Step title="Set up a table upload schema" id="set-table-upload" titleSize="h3">
    <Callout icon="hand-point-up" color="#ff4179">
      **This step is optional.** However, we recommend completing it as part of the initial set up or you won't be able to use uploaded files like CSVs in joins.
    </Callout>

    To use [table uploads](/analyze-explore/data-input-csvs), the [Galaxy `omni` role](#create-omni-role) needs write access to a dedicated schema in a writable catalog. This schema can't be used for other modeled tables.

    Generally, the steps to set up a table upload schema will look like:

    1. Verify that the Galaxy connector (data source) associated with the catalog supports write operations. Some connectors - like Google Sheets and Salesforce - are read-only and can't be used for table uploads.
    2. In the underlying data source (e.g., Postgres, MySQL), create a schema in a catalog that the Galaxy `omni` role has access to.
    3. Verify that the new schema is accessible to Galaxy.
    4. In Galaxy, add privileges to the [Galaxy `omni` role](#grant-data-access) that will allow the Omni Galaxy user to:
       * Access the catalog and schema used for table uploads
       * Create new tables in the schema
       * Select from, insert into, update, and delete from tables in the schema
  </Step>

  <Step title="Get the connection details from Galaxy" id="get-connection-info" titleSize="h3">
    1. In Galaxy, navigate to **Partner connect**.
    2. Click the **Connection info** section to open it.
    3. Select the cluster you want to connect to Omni.
    4. In the **Other clients** section, note the **Host** and **Port** values — you'll need these in the next step. The port for Galaxy is always `443`.

    <Frame caption="Note the Host and Port values in the Other clients section">
      <img src="https://mintcdn.com/omni-e7402367/pWESsJx-Uvh-y4ip/connect-data/images/starburst-connection-info.png?fit=max&auto=format&n=pWESsJx-Uvh-y4ip&q=85&s=2bf5877e11fea9272d6fbe65af8562d4" alt="Highlighted Other Clients connection info in the Starburst Galaxy UI" width="928" height="479" data-path="connect-data/images/starburst-connection-info.png" />
    </Frame>
  </Step>

  <Step title="Allowlist Omni's IP addresses" id="allowlist" titleSize="h3">
    If your Galaxy cluster restricts access by IP address, add Omni's IPs to the allowlist.

    Omni's IP addresses can be found on an individual connection's page in Omni, accessed by navigating to **Settings > Connections** and clicking a connection.

    If your cluster doesn't restrict access by IP, skip this step.
  </Step>

  <Step title="Create the connection in Omni" id="create-connection" titleSize="h3">
    1. In Omni, click **Settings > Connections**.

    2. Click the **Trino** option.

    3. On the connection setup page, fill in the connection details:

           <DisplayName />

           <Host additionalCopy="This should look like org-cluster-name.trino.galaxy.starburst.io." />

           <Port defaultValue="443" />

           <ParamField path="Database" required>
             The name of the Trino catalog Omni should connect to.
           </ParamField>

           <IncludeOther term="Databases" />

           <Default term="Schema" />

           <Offloaded />

           <TableUploads />

           <ParamField path="Username" required>
             The Omni Starburst user's email address, followed by `/` and the role name. The role suffix tells Galaxy which role to use for the session. The `omni` role should be the default for this user, but adding the role suffix explicitly sets the role.

             For example, if the user is `omni@yourcompany.com` and the role is `omni`, enter `omni@yourcompany.com/omni`.
           </ParamField>

           <Password />

           <DatabaseTimezone />

           <QueryTimezone />

           <AllowUserSpecificTimezones />

           <TrustServerCertificate />

           <AutoGenerateRelationshipsAllModes />

           <AlwaysScopeViewNames />

           <BaseAccess />

    4. When finished, click **Create connection**.

    <Note>
      Galaxy clusters auto-suspend after an idle period (configurable per cluster). The first query Omni runs after suspension will be slower while Galaxy resumes the cluster. This is expected behavior and doesn't require any additional setup.
    </Note>
  </Step>
</Steps>

## What's next?

Now that your database is set up, you can:

* Use the Omni Agent's [quickstart skill](/modeling/topics/quickstart) to create your first topic from business questions
* Configure user permissions, [schema refreshes](/modeling/develop/schema-refreshes), [environments](/connect-data/dynamic-environments) and [timezone settings](/connect-data/timezones)
* Learn how Omni [generates the model](/modeling/develop/model-generation) associated with the connection
