Wednesday, 1 August 2012

Step by step import with Data Migration Framework [AX 2012]

Follow the steps on msdn to install the Data Migration Framework.

Once you have install, there is also a user guide on msdn but not very detailed. I did my first walk through today and took some notes along the way.

There are demo files you should look at.

C:\Program Files\Microsoft Dynamics AX 2012 Data Migration Framework (Beta)\DemoFiles\Delimited

1. Click on Data Migration Framework > Setup > Source data formats to set up your source data format. Currently there is on flat file imports available with possible future enhancements from Microsoft to support other types.


2. Under the Applications content, you can select your dimensions. The Dimension code lookup is a multiselection lookup (tick the selection box on the left of the lookup and ok).


3. Click on Data Migration Framework > Common > Processing group. Create a new record and give it a name and description


4. From the Processing group form, click on Entities.

Create a new record. In this example I created one for a Vendor import. The Sample file path field will be blank.


Note: You can use the demo file located under the installed folder. C:\Program Files\Microsoft Dynamics AX 2012 Data Migration Framework (Beta)\DemoFiles

If you use the Demo files, then skip steps 5 to 7. If you want to modify the columns, then do steps 5 to 7, as it will ask you if you want to modify the existing file format.

5. Generate a sample file by clicking on Generate source file button. Follow the wizard and select the fields to import.


6. Then click the Generate sample file button. This will open up the sample file in notepad.


Click Finish when done.

7. Now fill in your data on the txt file.


8. Back on the main form click the Generate source mapping button. This will analyse the file and do the mapping between the file and the stagging table.

9. Now you can open and view the mapping by clicking on the Modify source mapping button.

It should looks something like this. The Source is your txt file and the Staging is your staging table in AX. If your source file is messed up, you should be able to see it here.


10. Now validate the setup by clicking the Validate button on the main form.

11. View target mapping. This is a mapping between the Staging to the Target table. This should already be predefined. You can however modify the mapping.

Notice a the Function options on the left. These are predefined methods in the class to allow you to execute business logic. The example below, when you pass in a string of dimensions A-B-C, the GenerateDefaultDimension function splits the string up and generates a DefaultDimension RecId. A similar thing happens with the GenerateParty, which creates all the required global address book records to return a Party RecId.


12. Back on the main form.Click the Preview source file button. This loads up the file, to give you a preview of your file..


13. Go back to the Processing group form and click the Get staging data. This opens up a dialog with the processing group, click OK. You will then get this form.

Click on the Run to run client side or Click on Run on AOS to run server side. Usually, the user account doing the import wont have access to SQL integration servers. Use the second option and it will run under the service account. This should run and complete with out errors.


14. You can now see the staging table by going to the Execution history from the Processing group form. From there you click the View staging data button. You can modify the staging data before you process it to the target.


15. To process to the target, click on the Copy data to target button. Follow the options to execute the process.

You are now done. The result should be the vendor record created.



Shirley said...

This is very helpful! How did you get the supporting data loaded, though? Zip codes, states, etc. Did you include code in the vendor import or create a new entity?

Munib said...

You have to load those separately.
I have done some of them with jobs and some of them with excel mapping.

It is a little cumbersome.

Gina Luciano said...

This is very helpful! On step 12 I run into this error
Assembly containing type Microsoft.Dynamics.AX.DMF.SSISHelper.DMFEntity is not referenced.
Object 'CLRObject' could not be created

I followed your instructions exactly and have done it more than once. I cannot figure out the issue. Help would be greatply appreaciated!

Gina Luciano said...

This is very helpful! On step 12 I run into this error
Assembly containing type Microsoft.Dynamics.AX.DMF.SSISHelper.DMFEntity is not referenced.
Object 'CLRObject' could not be created

I followed your instructions exactly and have done it more than once. I cannot figure out the issue. Help would be greatply appreaciated!

Munib said...

Sounds like an installation issues. I would go through the installer and make sure the components are installed.

Fadi Ghrawi said...

thanks for your help.
am trying to upload product.
basically i just went with the mandatory fields of product:






everything is fine until i copy data to target, it gives me that "Cannot create a record in Product number (EcoResProductIdentifier). Product number: XXXXXXXX.
The record already exists."
when i check the eEcoResProductIdentifier i do not fine that my item do exists.
i try totally new items, the same thing.
i disabled the method of check in the EcoResProductIdentifier table and i still get the same error, what is wrong with it?
is it a microsoft bug or i should be added other fields?
please help.

Anonymous said...

Microsoft Dynamics AX 2012 Data Migration Framework Beta 2.0 is now available on Information source

Anonymous said...


1) I just posted an error related to issue when trying to 'Preview Source File' and giving a SSIS weird error. ". I see this issue when trying to create a custom template(you select columns you want in your file).. I have not found resolution to this issue.
2) Jumped that hurdle as I need to move on, and just using DMF std template and updating with my data. I am able to preload and copy to staging table.
3) The issue I have now is that the last step does not copy staging table to the target. I get 'ZERO RECORDS' :(
Cheers.. zorro

Anonymous said...

When I try to preview sourcefile, I am getting an error. I am trying to use the customer_contactinfo.txt file

Could not find a part of the path 'C:\Data Migration Framework AX 2012\AX DMF Shared Folder\{A0F2F171-CEF0-40A0-9C15-54276594D7D0}..txt'.

Munib said...

Not sure whats going on. But check your installation.
Make sure you installed in the program folders. ie default folders.

Beta 2 is released. You may consider installing that.

Anonymous said...

OK ..

1) Got my issue resolved after reinstalling DLL files to correct directory. Make sure your DLL files are placed on the right folder.

2) I was able to use the demo files, updated with my own data and upload few vendors. I made no modifications to file other than data.

3) Trying to create my OWN vendor file with fewer columns. I get an error saying

-1073450952SSIS.PipelineSSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on component "Flat File Source" (1) returned error code 0x80040E21. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing. There may be error messages posted before this with more information about the failure.


Munib said...

What where the steps you used to modify the new vendor import?

Make sure you hit the Generate source mapping button. This will set the relation between the source file and staging table.

Craig said...

Thanks for the help! Do you know how to have multiple lines for the Street field (as can be entered in AX directly)?

Munib said...

Good question Craig.
It looks like it isn't supported.

Fordy said...

It is possible to have multiple lines in the Street field. At the end of each line add a Line Feed character char(10).

Munib said...

Thanks Fordy.

Anonymous said...

I'm having a problem with the inventory journal entity. First the system did not generate InventTransId. I noticed that there was a function for this that was not used. I added it and it solved that issue. the problem now is that the journal line has an inventtrans id but not inventory transaction record is being generated. Any idea?

KK said...


Thanks a lot for your help.

Any idea for importing Chinese?
Which code page should be chosen? I have tried UTF8 and most Chinese but still failed. System keep prompting the file has problem or fail the validation.

Thanks in advance~~~

murali t said...

Even though I added the mandatory filed to the mapping still system showing error "add mandatory field to be mapped".

Muhammad Yousaf said...

hi murali, i am facing the same issue, i a getting the same error, will you tell me how to map the mandatory field and how were you able to solve this problem and to load the data


Blogger said...
This comment has been removed by a blog administrator.
lohit dacha said...


I am trying to run Site specific settings entity. The load works perfectly fine. But when I look at the site settings (Item >> Plan >> Site specific settings), all the previous sites data is wiped out and replaced by data from the newest load. I want it to write below the existing lines, not replace. What is it that I am doing wrong? Is it Default values or Dim ID that I might need to add?