CML — Node reference
Full reference for .node.celiq files.
File structure
node: <identifier> # required
table: <schema.table> # required
label: <display name>
description: <text>
connection: <connection name> # override project connection
attributes:
- <attribute definition>
metrics:
- <metric definition>
joins:
- <join definition>
Node fields
| Field | Type | Required | Description |
|---|---|---|---|
node | string | ✓ | Unique identifier — matches filename prefix |
table | string | ✓ | Database table (schema.table or just table) |
label | string | Human-readable name | |
description | string | Shown in Browse mode | |
connection | string | Override the project-level connection |
Attribute fields
| Field | Type | Required | Description |
|---|---|---|---|
name | string | ✓ | Database column name |
type | string | ✓ | string, integer, float, date, datetime, boolean |
label | string | Display name | |
description | string | ||
role | string | primary_key, foreign_key, attribute, dimension | |
is_date | boolean | Enables date grain picker | |
is_hidden | boolean | Hide from field picker | |
geo_type | string | See Geo types → |
Metric fields
| Field | Type | Required | Description |
|---|---|---|---|
name | string | ✓ | Unique identifier |
sql | string | ✓ | Aggregation expression, e.g. SUM(amount) |
type | string | integer, float, currency, percentage | |
label | string | Display name | |
description | string |
Join fields
| Field | Type | Required | Description |
|---|---|---|---|
node | string | ✓ | Target node name |
type | string | left (default), inner, right, full | |
on | string | ✓ | SQL join condition |
Full example
node: payment
table: public.payment
label: Payments
description: One row per payment transaction.
attributes:
- name: payment_id
type: integer
role: primary_key
label: Payment ID
- name: customer_id
type: integer
role: foreign_key
- name: payment_date
type: date
is_date: true
label: Date payment was made
- name: amount
type: float
label: Payment amount
metrics:
- name: total_revenue
label: Total payment revenue
sql: SUM(amount)
type: currency
- name: payment_count
label: Number of payments
sql: COUNT(*)
type: integer
- name: avg_payment
label: Average payment amount
sql: AVG(amount)
type: float
joins:
- node: customer
type: left
on: payment.customer_id = customer.customer_id