relationship Module

Relationship models for Dataverse (input and output).

Classes

CascadeConfiguration

Defines cascade behavior for relationship operations.

Valid values for each parameter:

  • "Cascade": Perform the operation on all related records

  • "NoCascade": Do not perform the operation on related records

  • "RemoveLink": Remove the relationship link but keep the records

  • "Restrict": Prevent the operation if related records exist

LookupAttributeMetadata

Metadata for a lookup attribute.

Valid required_level values:

  • "None": The attribute is optional

  • "Recommended": The attribute is recommended

  • "ApplicationRequired": The attribute is required

ManyToManyRelationshipMetadata

Metadata for a many-to-many entity relationship.

OneToManyRelationshipMetadata

Metadata for a one-to-many entity relationship.

RelationshipInfo

Typed return model for relationship metadata.

Returned by create_one_to_many_relationship, create_many_to_many_relationship, get_relationship, and create_lookup_field.

Example:


   result = client.tables.create_one_to_many_relationship(lookup, relationship)
   print(result.relationship_schema_name)
   print(result.lookup_schema_name)