Question

Q: Find missing number from sequence of column data

  • 5 October 2021
  • 2 replies
  • 1 view

Badge

Hi there, so I have two column of data.

The column "Test_FloorNumber_Begin0" should have sequence of 0000, 0001, 0002, 0003 - the largest number of the input, or 0999.

The second column "Test_FloorNumber_Begin1" should have sequence of 1000, 1001 - the largest number of the input, or 1999.

The sequence should start from 0000/1000 to the largest number from the input data.

 

So I want to use FME to find out the missing number and output it. In this case 0000 to 0003 and 1002-1003 are missing.

Please help me as I want clueless on how to work this out.

Thank you very much.


2 replies

Userlevel 4
Badge +30

Hi @zacharylee1204​ 

 

The PythonCaller transformer is good in this case.

 

In the Workspace template ( FMWT ) there are 2 transformers PythonCaller - each attribute:

 

gapsResult in Data Inspector:

Result 

Thanks in Advance,

Danilo

Badge

Hi @zacharylee1204​ 

 

The PythonCaller transformer is good in this case.

 

In the Workspace template ( FMWT ) there are 2 transformers PythonCaller - each attribute:

 

gapsResult in Data Inspector:

Result 

Thanks in Advance,

Danilo

I will try it later today. Thank you very much! :)

Reply