Skip to content

featurebyte.Catalog.list_relationships

list_relationships(
include_id: Optional[bool]=True,
relationship_type: Union[RelationshipType, str, NoneType]=None
) -> DataFrame

Description

List all relationships that exist in your FeatureByte instance, or filtered by relationship type. This provides a dataframe with:

  • the relationship id
  • primary entity
  • related entity
  • table source
  • enabled (whether the relationship is enabled)
  • creation timestamp
  • update timestamp
  • comments

Parameters

  • include_id: Optional[bool]
    default: True
    Whether to include Relationship object id in the output.

  • relationship_type: Union[RelationshipType, str, NoneType]
    This parameter allows you to filter the results based on a specific relationship type. If no relationship type is provided (default is None), no filtering will be applied based on relationship type.

Returns

  • DataFrame
    A dataframe containing the relationships.

Examples

List all relationships.

>>> catalog.list_relationships()[
...     [
...         "relationship_type",
...         "entity",
...         "related_entity",
...     ]
... ]
  relationship_type           entity   related_entity
0      child_parent   groceryinvoice  grocerycustomer
1      child_parent  grocerycustomer      frenchstate