From honeydew-ai
Guides you through defining a relationship between two Honeydew entities — covering join type, direction, cross-filtering, and connection method — then pushes the updated entity YAML to Honeydew via the MCP tools.
npx claudepluginhub honeydew-ai/honeydew-ai-coding-agents-plugins --plugin honeydew-aiThis skill uses the workspace's default tool permissions.
Before creating relations, 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.
Guides you through defining a new Honeydew entity from a data warehouse source — covering source type, granularity key, and initial attribute mapping — then pushes to Honeydew via the MCP tools.
Create and edit Omni Analytics semantic model definitions—views, topics, dimensions, measures, relationships, query views—using YAML via REST API. For adding fields, joins, metrics, or modifying data models.
Sets up Dataverse tables, columns, and relationships for Power Pages sites using OData API from ER diagrams or AI analysis after user approval.
Share bugs, ideas, or general feedback.
Before creating relations, 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 relation defines how two entities join together.
Relations are not standalone objects — they live inside the source entity's YAML as a relations: block.
Every relation connects the "many" side to the "one" side: for example, orders (many) → customers (one).
Relations enable:
Relations are defined on the source entity. To add a relation, use
update_objecton the entity that holds the foreign key (the "many" side).
There is no create_relation tool. Adding a relation means updating the source entity's YAML to include the relations: block.
Call update_object with:
yaml_text — the full updated entity YAML with the relations: blockobject_key — the entity's object key (find via list_entities or get_entity)Required permission: Editor or higher.
After a successful 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.
There is no delete_object for relations. To remove a relation, update the source entity's YAML with the relation removed from the relations: block.
get_entity on both entities and check which one has the relation in its relations: block.relations: list (keep all other relations intact).update_object with the updated YAML and the entity's object_key.Need to define a relation?
│
├─► Simple FK join (equality on one or more columns)?
│ └─► Use field-based connection
│ connection:
│ - src_field: <fk_column>
│ target_field: <pk_column>
│
├─► Complex join (range, filter, SCD Type 2, multi-entity)?
│ └─► Use expression-based connection
│ connection_expr:
│ sql: |-
│ <custom SQL>
│
└─► Removing an existing relation?
└─► Use update_object — remove relation from entity YAML
See examples.md for full worked examples covering: field-based join, composite key, expression-based (SCD Type 2), multiple relations, and removing a relation.
Use these MCP tools before defining relations:
get_entity — Get entity details including existing relations, attributes, and YAML definitionlist_entities — List all entities (to identify source and target)search_model — Search for entities or fields by name (use search_mode: EXACT for known names, OR for broad discovery)See reference.md for: YAML schema, relation direction (rel_type), join types, cross-filtering options, and connection methods.
IMPORTANT: Before creating any relations, analyze the modeling options and present them to the user for decision.
Steps:
list_entities and get_entityDo not assume a single correct answer. Relationship modeling involves trade-offs (query performance, maintainability, analytical flexibility) that depend on the user's specific needs.
Use the honeydew-docs MCP tools to search the Honeydew documentation when:
Search for topics like: "relations", "joins", "cross-filtering", "many-to-one", "relationship modeling".
rel_type: many-to-one.connection_expr for cases that genuinely require custom SQL.connection.cross_filtering: both unless performance is a concern. Restrict to one-to-many or none for large entities.relations: block — omitting an existing relation will delete it.After creating ANY relation, you MUST invoke the validation skill to test and validate.
See the validation skill (Entities → "Validating Relations") for:
get_entityQuick validation:
get_entity on the source entity, check its relations list.get_data_from_fields:attributes: ["<target_entity>.<attribute>"]metrics: ["<source_entity>.<metric>"]update_object replaces the full entity YAML. If the entity already has relations, fetch the current YAML first (via get_entity) and include all of them in the update.connection. A partial key join produces fan-out and incorrect aggregations.connection_expr without enforcing cardinality. Custom SQL joins bypass Honeydew's cardinality validation. A poorly written expression can silently produce many-to-many joins.many-to-one cross-filtering on large tables. Filtering from the "many" side back to the "one" side requires a reverse join and is expensive. Use none or one-to-many unless the use case requires it.