Relationship Naming Convention

How to name relationship_type values in dbt-nexus using agent nouns that match natural-language analytical questions.

In dbt-nexus, relationship_type should answer:

What is entity A to entity B?

Use an agent noun (role noun), not an abstract noun.

Rule

  • Use: member, advisor, owner, admin
  • Avoid: membership, advisory, ownership, administration

This keeps relationship queries aligned with natural-language business questions.

Why

Analysts and operators ask:

  • "Who are Kevin's advisors?"
  • "Which households is Cody a member of?"
  • "Who is the owner of this account?"

They do not ask:

  • "What memberships does Kevin have?"
  • "What advisory exists for this household?"

relationship_type should match the way people ask and filter.

How Relationship Fields Work Together

A relationship row is interpreted from these fields:

  • entity_a_role
  • relationship_type
  • entity_b_role
  • relationship_direction

Read as a sentence:

{entity_a_role} is {relationship_type} of {entity_b_role} (given a_to_b)

Examples:

  • contact + member + household => "contact is member of household"
  • primary_advisor + advisor + household => "primary_advisor is advisor of household"
  • owner + owner + household => "owner is owner of household"

Role vs Relationship Type

relationship_type is the broad noun category. entity_a_role is the refiner.

Example:

  • relationship_type = 'advisor'
  • roles can be primary_advisor, secondary_advisor, planner

This allows both broad and precise queries:

-- All advisors for a household
where relationship_type = 'advisor'

-- Only primary advisors
where relationship_type = 'advisor'
  and entity_a_role = 'primary_advisor'

Austin Wealth Reference

relationship_type entity_a_role(s) entity_b_role
member contact household
advisor primary_advisor, secondary_advisor, planner household
owner owner, salesforce_user household
admin client_services_admin household