How to import .csv file into AX 2009 so i could use it as a datasource?


Create a table in the AOT with the same structure as your CSV. Use the data importer tool under (Administration>Periodic>Data export/import>Definition groups) and create a definition group of type Custom and setup the fields and delimiter, then import that into your custom table you created. Then you can use that table, which is full of data, as a datasource.

Thanks man!

I have two files that I need to import. After importing, I need to compare thier data and find thier mismatch field if there is any. Do I need to create another table for the mismatch data result?

It depends. I’d need more info on your specific case because there are many ways to solve the problem. You can just add an extra field in the table you create in the AOT and have that be a type “yesNo” (boolean) and then during the import, if you know exactly what you are looking for, you can create some simple import code on the other tabs under the “table setup” section of the data importer. Or you could just add that extra column, then write a job to iterate over the data and update that column.

Your question is a little too vague to give a good answer.