Finding missing values in a sequence

One Star

Finding missing values in a sequence

Hi all,
I have a sequence of numbers, there are some repeated values (which are fine) and some missing values
Incomplete Sequence (e.g.)
1
2
3
5
6
6
9
10
Is there an easy way in Talend that I can extract the values that are missing. So in the above example I need the values of 4, 7 and 8.
I am working on a mathematical solution (joining it with a complete sequence, finding the differences, then the differences of the differences) at the moment, but it seems quite a contrived way to do it, is there an easier way??
It needs to be able to deal with the duplicate values, and more than 1 missing value in a row.
Thanks in advance,
Nilan
One Star

Re: Finding missing values in a sequence

hi,
try an inner join with an input including all occurencies (as main)
(1
2
3
4
5
6
7
8
9
10
)
and your input as lookup in a tMap and activate "Catch lookup inner join reject"
One Star

Re: Finding missing values in a sequence

Hi Amany, thanks for the suggestion, I implemented it using tJoin rather than tMap (tmap just returned nulls for some reason) but got it working Smiley Happy

What’s New for Talend Spring ’19

Watch the recorded webinar!

Watch Now

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.

Download

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch

Downloads and Trials

Test drive Talend's enterprise products.

Downloads