Bertverbeek4PS / bc2adls

Exporting data from Dynamics 365 Business Central to Azure data lake storage or MS Fabric lakehouse
MIT License
60 stars 22 forks source link

Primary Key definition #144

Closed acjdekorte closed 5 months ago

acjdekorte commented 5 months ago

Dear Bert,

We would like to add the definition of the primary key of the tables to the datamodel. Based on https://learn.microsoft.com/en-us/common-data-model/sdk/logical-definitions, I expect that it should be parameter identifiedBy. I try to find the correct place within the json to add this, but I fail to do so. Do you have any clue where we should add this and if this should be an array or a comma separated list?

Bertverbeek4PS commented 5 months ago

You can also use IsPrimaryKey inside the attribute: https://learn.microsoft.com/en-us/common-data-model/schema/core/industrycommon/financialservices/financialservicescommondatamodel/group identifiedBy should also work. I expect it like in this small example:

{ "$type": "Entity", "entityName": "MyEntity", "attributes": [ { "name": "Id", "dataType": "Int64" }, { "name": "Name", "dataType": "String" } ], "identifiedBy": "Id" }