Table naming in Loam
Tables use full dataset paths from the workspace root. Learn how paths, nesting, and quoting work.
Dataset paths
Every table in Loam has a full path from the workspace root. A path contains zero or more datasets followed by the table name. SQL calls each dataset component a namespace:
namespace.namespace.tableFor example:
"commerce"."stripe"."production"."charges"- Datasets keep related datasets, tables, and views together. You can nest them when another level is useful.
- The final name identifies the table you query. A view uses the same path rules.
Create a dataset with SQL
The SQL command uses the technical term NAMESPACE. Create each parent dataset before its child; Loam does not create missing parents.
CREATE NAMESPACE "commerce";
CREATE NAMESPACE "commerce"."stripe";
CREATE NAMESPACE "commerce"."stripe"."production";Examples
-- A table in one dataset
"sales"."orders"
-- A table in two nested datasets
"customers"."crm"."contacts"
-- A connected table in three nested datasets
"commerce"."stripe"."production"."charges"Quoting rules
Unquoted SQL identifiers normalize to lowercase. Double quotes preserve exact spelling and allow names with uppercase letters, spaces, punctuation, or reserved words. Quoting every component is a safe default for copied paths.
-- Correct: each part is quoted
SELECT * FROM "sales"."orders"
-- Dataset paths can have multiple levels
SELECT * FROM "commerce"."stripe"."production"."charges"Simple valid names also work without quotes, but quoting keeps the full path explicit.
Finding your table names
Not sure what your tables are called? There are two easy ways to find out:
- App sidebar: follow the dataset tree to find the full table path, then open the SQL Console (sign in to open this page).
SHOW RELATIONS INquery: runSHOW RELATIONS IN commerce.stripe.productionin the SQL Console to list tables and views directly inside that dataset.
Common mistakes
Using a relative or incomplete path
Every path starts at the workspace root. Loam has no current dataset, search path, or automatic default dataset. For a table at commerce.stripe.production.charges, that entire path is required.
Using single quotes instead of double quotes
Single quotes (') are for string values in SQL, not for table names. Use double quotes (") around table name parts.
-- Wrong: single quotes
SELECT * FROM 'commerce'.'stripe'.'production'.'charges'
-- Right: double quotes
SELECT * FROM "commerce"."stripe"."production"."charges"Related articles
Last updated 2026-08-21