Skip to main content

D365O - Import CSV data through Data entity

Data entity is a new concept comes with D365O release where each entity related data can be accessed from a single view.

A data entity is an abstraction from the physical implementation of database tables. For example, customer related data is stored in different tables in AX which could be customer address (access from  LogisticsPostalAddress), customer name (access from DirPartyTable), and customer electronic address (access from LogisticsElectronicAddress).

Complete details are well explained here 
https://ax.help.dynamics.com/en/wiki/data-entities/

Let's create new data entity to import data from a CSV file, this data entity uses only one table to keep it simple. My following posts will show how to import data into through data entities using multiple tables.

Create a new table [Optional step]

I created a new table for this example.
















Create new data entity

Method 1:

























Method 2:

Add new item for Data entity






















Provide table as primary datasource



















Click Next and mark convert labels to field names


















Data entity will look like this in Visual Studio














With both above methods (whatever you choose) it created few artifacts in your project.

- data entity
- security privileges
- staging table
















Build your project

Press Ctrl + Shift + B or Right click on project and Build

Synchronize your tables by Right click on project and Sync 

Validate staging table properties

Set the configuration key to DMF and all other properties should be same as set below.
















Import data using this data entity

System administration | Data management





















Provide a name, choose data source as CSV, and select entity name from the list. Upload file to import.

My sample file has this data

101, Faisal
102, Fareed
103, Mohammad














It prompts with fields mapping error














Click on View map and connect fields as shown














Refresh page to view this screen and click Run project.






















Follow next few prompts and execute the batch job to import data into the staging table, verify data in the staging table. Import data into the target which will change the transfer status to completed.







































Open DataImport data from table browser to see data.

This data entity creates view in SQL server, you can even play around with the created view in SQL server.


Refernceshttps://ax.help.dynamics.com/en/wiki/building-and-consuming-data-entities/

Comments

  1. thank you so much.But when I tried it with system fields I'm unable to pull data from csv files and getting following error
    "Error processing data project xyz using job xyz "

    ReplyDelete
  2. The Le_Meridian Funding Service went above and beyond their requirements to assist me with my loan which i used expand my pharmacy business,They were friendly, professional, and absolute gems to work with.I will recommend  anyone looking for loan to contact. Email..lfdsloans@lemeridianfds.com  Or lfdsloans@outlook.com.WhatsApp ... + 19893943740.

    ReplyDelete

Post a Comment

I will appreciate your comments !

Popular posts from this blog

The Dual Write implementation - Part 1 - Understand and Setup

What is Dual-write? Tightly couples – complete at one transaction level Near real time Bi-directional Master data and business documents – Customer records you are creating and modifying and at this document we are talking about sales orders or quotes and invoice. Master data could be reference data e.g. customer groups and tax information Why Dual-write and why not Data Integrator? Data Integrator is Manual or Scheduled One directional Now, Let's deep dive and understand what is required for Dual-write setup and from where to start. First thing first, check you have access to https://make.powerapps.com/ Choose right environment of CDS (CE) Make sure you have access to the environment too, click on gear icon and Admin Center  Look for required environment and Open it, you must have access as going forward you are going to configure dual write steps in the environment user the same user you are logged in now. Now, go back to power platform admin center and...

D365FO: Entity cannot be deleted while dependent Entities for a processing group exist. Delete dependent Entities for a processing group and try again.

Scenario: There are times when you want to delete an entity from target entity list and when you do so, you face an error message which does not tell you where exactly the entity has been used.  "Entity cannot be deleted while dependent Entities for the processing group exist. Delete dependent Entities for a processing group and try again. " Solution: Browse the environment by appending this part  /?mi=SysTableBrowser&TableName=DMFDefinitionGroupEntity&cmp=USMF   at the end.  For example; if the environment URL is  https://daxture.sandbox.operations.dynamics.com then the complete URL will be https://daxture.sandbox.operations.dynamics.com/?mi=SysTableBrowser&TableName=DMFDefinitionGroupEntity&cmp=USMF Filter for Entity and it will give you the DefinitionGroup where the entity has been added or used in data management import/export projects. Get the DefinitionGroup name and search in the export/import projects under data management and either del...

Dual-write connection set error: An item with the same key has already been added

If you happen to see this error message then you have duplicate records in cdm_company entity in CDS environment. Check for cdm_companycode field this is normally not allowed but have a look and delete the ones with duplicates.