AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 08.10.2015, 15:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
emeadaxsupport: DIXF - Importing Data - How to establish which rows you need to look at when you aren't able to import every row in your input file
Источник: http://blogs.msdn.com/b/axsupport/ar...nput-file.aspx
==============

Consider a scenario where you are importing a lot of data using DIXF, but one or more of the rows in the input file contain "bad data" that result in some rows not being imported OK into your staging table. How do you establish which rows are the problem, so that you can correct them?

In the example below, I am working with the Units demo data file (CSV - delimited) that ships with AX 2012 R3.

You can usually find this file here:

C:\Program Files (x86)\Microsoft Dynamics AX\60\Client\DemoFiles\Delimited

In this example, I have copied the UnitOfMeasureEntity.txt file to another folder called C:\DIXF_IMPORT , renamed the file and called it 'MSFT_UnitOfMeasureEntity.txt' and I've edited one of the 6 rows in it so that it will generate an error.

The file I am working with looks like this:

Please note that the file header column info (Symbol, DecimalPrecision, etc.) has been truncated - Check the real sample data file for the details

----------------------------------------------------------------------------------------
Symbol,DecimalPrecision,IsBaseUnit,IsSystemUnit,SystemOfUnits,UnitOfMeasureClass,UOMInternalCode_CodeSymbol,UOMTranslation_Description

DIXF_AA,1,No,No,Metric units,Undefined,Weeks,Inches
DIXF_AB,2,No,No,Metric units,Mass,Years,Kilograms
DIXF_AC,0,No,No,None,Undefined,Milliseconds,Kilometers
DIXF_AD,---,No,No,United States customary units,Mass,Days,Pounds
DIXF_AE,0,No,No,United States customary units,Mass,Seconds,Pint
DIXF_AF,1,No,No,United States customary units,Undefined,Metric tons,1/8 square inch
----------------------------------------------------------------------------------------

The change I've made is highlighted in red above.

1. The error

When I try to import the Units entity data file shown above into staging, I get the following error:



Warning Message (17:46:01) The file for entity Units is having 1 error(s)
Info Message (17:46:01) '0' 'Units' record(s) inserted in staging
Warning Message (17:46:01) For additional warnings or errors, please check the log

2. How to find the relevant rows in the input file that need to be fixed

There are at least two ways to establish what rows in your input file are causing problems.


Data import/export framework parameters / Create error file


Navigate to /Data import export framework/Setup , click on 'Data import/export framework parameters', and check the 'Create error file' checkbox.



Once you've done this, you can re-run your 'Get staging data' process and any errors will be captured in an error file for review.


Staging data execution (DMFStagingData form) / Details / Create error file

If you haven't enabled this functionality using the method described above, and you want to enable it for a particular Processing group that you are importing into staging, you can also do that.

Navigate to /Data import export framework/Common, click on 'Processing group', select the relevant 'Processing group' (in this case it is Units) and click on 'Get staging data'.



When the subsequent screen appears, click on the 'Details' link and check the 'Create error file' checkbox, and finally, on 'Run'.



Again, any errors will be captured in an error file for review.

You can review the error file by looking at the 'Execution history' of your 'Processing group', then clicking on 'Error log' followed by 'View error file'.



3. Get staging data again once the errors in your input file have been corrected


Once I put a valid DecimalPrecision value in my input file and re-run the 'Get staging data' processing, the 6 rows in my input file are imported into staging OK.



InfoLog shows successful import.



Data visible OK in the staging table in the SQL Server database.





















Источник: http://blogs.msdn.com/b/axsupport/ar...nput-file.aspx
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
emeadaxsupport: Importing a General Journal using Data Import/Export Framework AX 2012 Blog bot DAX Blogs 0 17.07.2014 20:12
emeadaxsupport: SEPA affected objects Blog bot DAX Blogs 0 29.11.2013 13:11
atinkerersnotebook: Walkthrough & Tutorial Summary Blog bot DAX Blogs 1 09.09.2013 09:11
DynamicsAxSCM: Import vendor catalogs: from setup to importing a sample catalog – Part 2 (Importing a sample catalog) Blog bot DAX Blogs 0 09.09.2012 20:15
Microsoft Dynamics CRM Team Blog: Create Sample Data for your Solution Blog bot Dynamics CRM: Blogs 0 01.12.2011 05:14
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 19:05.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.