From honeydew-ai
Step-by-step guide to defining calculated attributes (dimensions) on Honeydew entities, including SQL expression building and pushing via MCP tools.
How this skill is triggered — by the user, by Claude, or both
Slash command
/honeydew-ai:attribute-creationThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Before creating attributes, ensure you are on the correct workspace and branch. Use `get_session_workspace_and_branch` to check the current session context. For development work, create a branch with `create_workspace_branch` (the session switches automatically). See the `workspace-branch` skill for the full workspace/branch tool reference.
Before creating attributes, ensure you are on the correct workspace and branch. Use get_session_workspace_and_branch to check the current session context. For development work, create a branch with create_workspace_branch (the session switches automatically). See the workspace-branch skill for the full workspace/branch tool reference.
A Honeydew calculated attribute is a virtual, per-row column defined on an entity — analogous to an expression in a SQL SELECT clause.
It is evaluated once per row, not aggregated. In BI tools it surfaces as a dimension users can group, filter, and slice by.
Use a calculated attribute when:
net_price, customer_tier, order_month)Do not use a calculated attribute for aggregations across rows — use a metric instead.
entity.field format for all attribute/metric referencesorders.amount, not just amountSee reference.md for: SQL functions, JSON/semi-structured data, geography, data types, full YAML schema, attribute types, time grain, and format strings.
Call create_object with yaml_text:
type: calculated_attribute
entity: <entity_name>
name: <snake_case_name>
display_name: <Human Readable Name>
description: |-
<business description>
owner: <owner_email_or_team>
datatype: string|number|float|bool|date|timestamp|time
sql: |-
<SQL expression>
folder: <optional folder path>
Required fields:
type: calculated_attributeentity — the entity this attribute belongs toname — snake_case identifierowner — CRITICAL: always set (email or team name)datatype — CRITICAL: always set explicitlysql — the expressiondescription — business context for a non-technical user: WHY this attribute exists, which business team defines the threshold/logic, known caveats, or governance notes. Do NOT describe the SQL expression or restate what the name already says. If there's nothing meaningful to add beyond the name, omit it entirely.get_entity or search_model (with search_mode: EXACT) to find the attribute's object_key.update_object with the full updated YAML (yaml_text) and the object_key.Minimal diff rule: When updating, preserve the existing field order and formatting from the current YAML. Only change the fields you need to modify. Objects are versioned in git, so unnecessary reordering or reformatting creates noisy diffs.
After a successful create_object or update_object call, the response includes a ui_url field. Always display this URL to the user so they can quickly open the object in the Honeydew application.
search_model (with search_mode: EXACT) to find the attribute's object_key.delete_object with that object_key.See examples.md for full worked examples covering: basic, boolean flag, grouping/binning, multi-entity, date truncation, window function, running total, semi-structured JSON, safe division, update, and delete.
Use these MCP tools to explore existing attributes:
get_entity — Get entity details including all attributes (filter by __typename for CalcAttribute or DataSetAttribute)get_field — Get detailed info about a specific attribute by entity and field namesearch_model — Search for attributes across the model by name (use search_mode: EXACT for known names, OR for broad discovery)list_entities — List entities to identify where to anchor new attributesUse the honeydew-docs MCP tools to search the Honeydew documentation when:
reference.md (Snowflake, Databricks, BigQuery differences)Search for topics like: "calculated attributes", "attribute types", "multi-entity attribute", "aggregation attribute", "time grain", "format strings", "advanced modeling".
sql field. A good description answers "why does this attribute exist?" or "what should a business user know about this value?" (e.g., who owns the threshold definition, known edge cases, data quality caveats). If there's nothing to add beyond the name, leave the field out entirely.entity.attribute_name) rather than inlining its SQL expression. This keeps definitions DRY and ensures changes propagate.orders.amount, not amount.After creating ANY attribute, you MUST invoke the validation skill to test and validate results.
See validation skill for:
get_data_from_fields (attributes go in the attributes parameter)Quick validation — check distinct values:
Call get_data_from_fields with:
attributes: ["<entity>.<attribute_name>"]metrics: ["COUNT(<entity>.<attribute_name>)"] — forces aggregation, returning one row per distinct valueThis lets you quickly inspect all distinct output values and their frequencies to confirm the attribute logic is correct (see the query skill's "Getting Distinct Values" tip for more details).
amount will fail — write orders.amount.npx claudepluginhub honeydew-ai/honeydew-ai-coding-agents-plugins --plugin honeydew-aiGuides defining Honeydew entities from data warehouse sources like Snowflake, Databricks, or BigQuery—covering source type, granularity key, attribute mapping—then pushes via MCP tools like create_entity.
Guides creation of Analytic Models in SAP Datasphere for SAP Analytics Cloud, defining reporting dimensions, measures (calculated, restricted, count distinct), currency/unit conversions, exception aggregations for dashboards, KPIs, and self-service BI.
Enriches DataHub metadata: adds/updates descriptions, tags, glossary terms, ownership, deprecation, domains, data products, structured properties, and documents.