Item fields
These fields sit around the definition. An import file row uses them.
A metric’s owner is the person recorded on the item, shown as Owner or Unassigned. The definition has no owner field.
Metric definition
Spec version1.0-draft.4. Unknown fields are refused at every level. Put experimental data in extensions.
The Shown as labels below are the editor’s. A metric’s page sometimes uses shorter words for the same field: Aggregation for the aggregation type, Data type for the output data type, Represents for the source entity, Table for the source table, and Its own SQL for source SQL.
aggregation
A value outside the listed words is kept, with a warning.
output
source
Give exactly one of
table and sql, and it can’t be empty.
joins[]
dimensions[]
examples[]
provenance
Version rules
When you save a new revision of a metric, Atlan compares it with the current one:- If the calculation changed,
versionmust be higher. The calculation coversspec_version,dialect,formula,aggregation,output,filters,mandatory_filters,source,joins,depends_on,grain,population,exclusions,extensions, and each dimension’sname,kind,sql,datatype,filter_form,required_join, andvalue_map. - If only
display_name,description,examples,provenance,replaced_by, or a dimension’svalues,values_truncated, ordescriptionchanged,versioncan stay the same. versioncan never go down.
version by 1 each time you edit a metric. The definition version is separate from the revision number and the release version. See Three different version numbers.
Saved query definition
Spec version1.0-draft.1. Unknown fields are refused. Only spec_version and sql are required, but a field you include can’t be blank.
Saving a saved query follows the workspace’s release policy, so a save can release it straight away. In Studio, check Save as draft to keep the revision unreleased. Agents get only a saved query’s released revision. See Set workspace release policy.
Agents can find a released saved query by its name, description, question, paraphrases, and usage note, and by the table, column, dimension, measure, filtered column, parameter, and output names recorded with it. Only plain names are indexed, such as
orders or analytics.sales.orders; an expression is skipped. SQL text and filter values are never searched, and unreleased revisions are never returned.
Fields Atlan Trident adds
Atlan Trident computes these on every save. Anything you send for them is replaced.Warnings
Complete example
Limits
Errors
When a save is refused, the error names the field it’s about, for exampleField 'definition.source' is not valid. It never repeats the values or SQL you sent.
Common
422 fields:
Related
- How metrics work: What each part means and how versions differ.
- Write metrics: Fill in these fields in Studio.
- Import metrics and queries: Load many definitions from a file.