Save Sql Attribute
save_sql_attributeCreates, updates, certifies, or deletes a named SQL expression under a Term, executing it read-only first so broken SQL is rejected before saving.
Instructions
Create, update, certify or delete a named SQL expression under a Term. The expression is executed read-only against the database before it is saved, so a broken one is rejected with the error.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | Type of expression. | measure |
| name | Yes | Title Case name, e.g. 'Net Revenue'. | |
| term | Yes | Owning Term name. | |
| delete | No | Delete this SQL attribute. | |
| status | No | Set certified only when a person approved it. | |
| datasource | No | Datasource name. Optional when only one datasource is registered. | |
| expression | No | SQL in the datasource dialect. measure/dimension/filter: a fragment over the Term's own table qualified by the bare table name (SUM(order_lines.line_total)). join/query: a full SELECT. | |
| description | No | What it captures and when to use it. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||