Flat File Module Skipping Rows

1
Hi all, I’m using the Flat File Module to import a csv (https://appstore.home.mendix.com/link/app/429/) I’ve noticed that the module skips rows if I have a column of DataType Decimal or integer which are null.  This means I am unable to import my datasets correctly. I’d expect the module to import the row but to leave that numeric column null (as per the csv)? It's a valid scenario for me to have some values which are null: Example - A list of users where Age (decimal) was optional: ----- Name,Age,Address Tim Cook,59,1 infinite loop Bill Gates,,Redmond Washington Lewis Hamilton,35,1 Race Drive -----   In this scenario Bill Gates didn't import, only Tim Cook and Lewis Hamilton. Has anyone had this issue before or ideas how to resolve?  Module version: 7.23.5  
asked
3 answers
3

Issue has been resolved and a new version is available from the appstore, see

https://appstore.home.mendix.com/link/app/429/Erwin-'t-Hoen/Flat-&-delimited-file-import

Thanks to Elliot for pointing out the issue!

A release for Mendix 8.5 is available from the appstore as well.

 

answered
1

Just tested this in Mendix 7.23.5 and when using the data supplied above in a csv file the data is imported whether using a decimal or an integer for the mapping of the age column.

Also tested this in an upgrade to Mendix 8.5.0, this will import without issues as well.

So for both the result is the same and I get 3 records.

Is there an error shown in the log? Or in the console?

Is there custom logic implemented on the entity that you are importing into, maybe some validations there preventing the import of the row with the missing Age? An issue with the CSV or configuration of the import definition?

answered
1

Hi Erwin,

Appreciate the fast reply. I have just tried myself on Mx 7.23.5 but I still get the same issue, when a decimal is null the whole row is skipped.

I’ve attached some screenshots of my import definition and Domain model (https://imgur.com/a/bXYoCa3 – also inline below). Could you try to re-create your side to see if you also have the same problem? 

I wrongly mentioned in my original post that integers had the same issue. This wasn’t true, Integers work fine when null. The problem is just with decimals. 

There are no logs in the console, on the module I just get 2x INFO “Importing files started” & “Importing files finished”.

When I when with the modified csv below, Philipa Smith doesn’t as the Decimal is null. 

I am using the latest version of Mx Reflection and Flat File importer on a blank project. There are no other modules installed. 

SampleData_NullDecimal.csv UTF-8:

Name,Address,Age,Decimal,DOB
Steve Jobs,22 Tudor Street London,35,1,13/03/1985
Phillipa Smith,18 Tulip Avenue,22,,15/01/1998
Bill Gates,59 Redmond Washington,,3,15/01/1961
Lewis Hamilton,1 Race Drive,34,4,15/01/1953

Domain Model

Domain Model

 

Interface Definition

Interface Definition

 

File Queue

File Queue

 

Import Results

Import Results

 

CSV Screenshot

CSV


 

answered