Managing Relationships

When dragging tables to an endpoint diagram, Skyvia automatically generates the corresponding OData entities and relationships (associations) between them, based on the data source metadata. Skyvia even supports self-referencing relationships, when an entity references itself.

If necessary, you can edit or delete the generated relationships or even create your own custom ones.

 

ExpandedToggleIcon        Editing Relationships

To edit a relationship, in an entity on one of the ends of this relationship, point to the corresponding navigation property, and click icon-pencil-small edit association.

connect-edit-association

This opens the Edit Association dialog box.

association-editor

In this dialog box you can set the relation Cardinality - One to Many, One to One, One or Zero to One. You also can set Names for the corresponding navigation properties on both ends of the association and select entity columns, on which the association is built.

 

ExpandedToggleIcon        Deleting Relationships

To delete a relationship, in an entity on one of the ends of this relationship, point to the corresponding navigation property, and click query-icon-cancel-rename delete association.

The association and the corresponding navigation properties in entities will be deleted.

 

ExpandedToggleIcon        Adding Custom Relationships

In addition to relationships, automatically generated based on data source metadata, Skyvia allows adding custom relationships to OData endpoints.

To add a custom relationship, find the plus icon connect-icon-plus at the bottom of the entity that should become the parent in the new association. Drag this icon to the entity, that should become the child in this association. This opens the Edit Association dialog box.

association-editor-empty

In this dialog box, select the association Cardinality, specify the Names of the corresponding navigation properties, and select the data source Columns, based on which the association will be built.

Please note that that in case of custom or modified relationships, you should care that the data in your data source corresponded to these relationships yourself.