Datavserse Relationships from SQL

Viewed 12

If I want to import sql data into dataverse tables how can I import data from 2 exist sql tables and map the relationship with a primary key / foreign key relationship?

When I tried this, I didn't get an option to select the pk/fk to map and the relationship in the lookup returned no results for the existing data. How do we know what keys are being used for the relationship?

1 Answers

I think you already know the type of relationships been used in dataverse, As dataverse itself has sql database as backend. Types of table relationships

Now for example, you wish to import contacts into dataverse and that contact has parent (N:1) Account related to it.

You will first need to have that Account record already in dataverse. If it is not available you will import/create Account Record.

If Account record is already available you will need to get Guid of that account record. Once you have the Guid, in contact table you will parentcustomerid field and you should set this field with Type of table i.e. account and it's Guid.

check this forum especially comment section

Related