Skip to main content
Solved

How to detect 'empty' keys when read parquet file using dex mapping

  • January 26, 2026
  • 4 replies
  • 47 views

Forum|alt.badge.img+4

Dear Community,

I’m using the following dex mapping :

<AimmsParquetMapping>

    <RowMapping name="xxx">
    <ColumnMapping name="A" binds-to="iA" binds-existing="1" skip-non-existing="0"/>
    <ColumnMapping name="B" binds-to="iB"/>
     <ColumnMapping name="C" maps-to="plan(iA,iB)"/>
    </RowMapping>
</AimmsParquetMapping>

Suppose now I have a row in the input file that has a NULL for the iA value. I would expect an error when reading the file, since NULL is not in the set, but the line just got skipped. Is there something wrong here or is there another way to detect empty key values?

Kind regards,

Marc

Using DEX version: 25.6.1.1

 

 

 

Best answer by Marc Wingender

Hi Chris, thanks for the reply. I tried your example and that is indeed exactly what I expected. I’ll try now to narrow it down why I can’t seem to reproduce the error message. 

some minutes later… Ok after restarting I get the same results (add dex mapping is done differently in this project)

The option to set the skip value to ‘2’ is not raising a warning, but i can continue from here. Thanks

4 replies

Forum|alt.badge.img+3
  • Ace
  • January 26, 2026

Hi Marc, does using skip-non-existing="2" help in your case? Not sure if you have tried this already.

 

A value of 2 will skip the value, but will also issue a warning. You can use this attribute to skip objects or rows that are indexed by empty labels in the data file, but also by non-empty labels that cannot be added to e.g. a defined set in the model.


Forum|alt.badge.img+4
  • Author
  • AIMMS Partner
  • January 27, 2026

Hi Joost, yes I also tried value of ‘2’, but with same outcome


Chris Kuip
AIMMSian
Forum|alt.badge.img+7
  • AIMMSian
  • February 1, 2026

Hi Marc,

 

I tried to reproduce your claim, but failed.

Running the procedure pr_reproduction in the enclosed AIMMS project produces:
ReadFromFile: Empty element encountered for index i_a in Parquet table file 'data/sampleInput.parquet', table 'sampleInput', data row '1', column 'a'

What am I missing here?

With kind regards,

Chris
 


Forum|alt.badge.img+4
  • Author
  • AIMMS Partner
  • Answer
  • February 3, 2026

Hi Chris, thanks for the reply. I tried your example and that is indeed exactly what I expected. I’ll try now to narrow it down why I can’t seem to reproduce the error message. 

some minutes later… Ok after restarting I get the same results (add dex mapping is done differently in this project)

The option to set the skip value to ‘2’ is not raising a warning, but i can continue from here. Thanks


Didn't find what you were looking for? Try searching on our documentation pages:

AIMMS Developer & PRO | AIMMS How-To | AIMMS SC Navigator