Skip to main content
If you receive this error when querying a PostgreSQL database connection, it means that the query includes tables from two databases.While you can include multiple databases in a single Omni PostgreSQL connection, PostgreSQL itself does not allow queries that reference more than one database or cross-database joins.
By default, Omni’s Trino connector sets query_max_stage_count to 200. You can override this default with the sql_preamble parameter.Add the following to the model’s settings file:
If you add a column to a table and the column doesn’t appear in Omni for a BigQuery view built on that table, the view’s stored schema is likely out of date. Queries against the view can still return the new column.BigQuery stores a logical view’s schema when you create the view. If the view is defined with SELECT *, running a query re-runs the view’s SQL, so the query returns columns added to the table later. But the view’s metadata in INFORMATION_SCHEMA.COLUMNS, which Omni reads during a schema refresh, doesn’t change until the view’s SQL definition is changed or the view is recreated. As a result, a schema refresh doesn’t add the new column to the view in Omni.For more information, refer to Create logical views in the BigQuery documentation.To resolve this issue:
1

Recreate the view in BigQuery

Run CREATE OR REPLACE VIEW with the view’s existing SQL. For example:
2

Refresh the schema in Omni

Refresh the schema for the connection. The new column should now appear in the view.
If your BigQuery dataset has tables that end in eight digits, such as Google Analytics 4’s events_20240101 and events_20240102:
  • Omni models them as one _all view. After a schema refresh, Omni generates one view with a wildcard table_name. For example, events_all becomes events_*. This cannot be disabled.
  • They’re missing from Omni. Another table or view in the dataset starts with the same prefix but doesn’t end in eight digits, such as events_summary or events_backfill. Because events_* would also read that table or view, Omni doesn’t generate the _all view or show the tables. Rename the other table or view, or move it to a different dataset, then refresh the schema.
When you use an _all view:
  • Filter on Table Date to read fewer tables. Table Date (table_suffix_date) is the date in each row’s table name. When you filter on this field, BigQuery reads only the matching tables. When you filter on other date fields, it reads every table.
  • Table Date is empty for tables that aren’t dated. Tables such as account_10000001 are also combined, into a view such as account_all.
  • For GA4, check for double counting. events_* also matches events_intraday_YYYYMMDD, so events_all counts a day twice until GA4 deletes that day’s intraday table. To get exact counts, refer to Count GA4 events exactly, including today.
If you can’t find a schema you included in a connection, it may be that the schema needs to be ‘activated’ to appear in the field browser in the workbook.To resolve this issue, try the following:
1

Edit the schema in the model IDE

Open the schema in the model IDE. Add a blank space to any view in the schema and save the changes.Once saved, the schema should be activated and appear in the workbook’s field browser.
2

Verify the connection's schema settings

If you open the model IDE but don’t see the schema, the issue may be an incorrectly configured connection setting or that schemas are unknowingly being restricted.When the Included schemas setting is used, Omni will include the only specified schemas in the model. If using this field:
  1. Open the connection’s settings page
  2. Verify that the schema is present
  3. Verify that the syntax is correct
Additionally, verify that schemas aren’t restricted via the model’s ignored_schemas parameter.
3

Manually query views

If the schema is loaded into the model but has not been activated, try manually querying views.In a workbook, open the All views & fields view in the field browser. Click the Schema button and select the schema from the dropdown.
4

Check if the view has been 'ignored'

If you’re able to see the schema in the model IDE but are missing a specific view in the schema, it may be that the view has been ignored.
  1. In the model IDE, toggle the view mode to Model. The dropdown may default to Combined, so be sure to update it if needed.
  2. Navigate to the file for the view and check for an ignored: true parameter.
  3. Remove the parameter and promote the changes to the shared model.