Saturday, March 18, 2017

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

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.



  1. I think this is an informative post and it is very useful and knowledgeable. therefore, I would like to thank you for the efforts you have made in writing this article. Energy Dais presents the most comprehensive list of the Oil Drilling Rig manufacturers in India, Middle East, USA & Canada. Choose from a list of 100+ handpicked Drilling Rig Manufacturers and suppliers to get custom quotations. oil drilling rig manufacturers

  2. 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 "

  3. 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.  Or ... + 19893943740.


I will appreciate your comments !

Download large bacpac (sandbox database) to DEV environment much faster

As the LCS website gets slower and slower and the database backups get bigger and bigger.  Use AZCopy to download objects out of LCS asset l...