Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] Data Validation

Dear all,
I am new to Talend and have probably a very simple question.
Using a delimited file; there is a column named UserName. Each username must start with an "S" and it's length must be 5 characters.
How to validate and ensure that rejected records are omitted?
Thanks,
Kees
Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Sorry, I was referring to the above identified .... with the new setup all works fine ... there are multiple ways that lead to Rome, so to speak 0683p000009MACn.png
Thanks all for the help

View solution in original post

11 Replies
Anonymous
Not applicable
Author

Hi,
Welcome to Talend Community !
tFilterRow or tMap component can fit your need. I create an example job to show you how to add filter expression on tMap to filter rows, the job design looks like:
tFileinputdelimited--main-->tMap--main-->tLogrow
Set the filter expression on tMap as:
 row1.data.startsWith("S")&&row1.data.length()==5

Please see my screenshots for details.
As a newbie, I encourage you to read the online manual of tMap and tMap operation.
Best regards
Sabrina
0683p000009MEDP.png 0683p000009MEDU.png
Anonymous
Not applicable
Author

Hi Sabrina,
Thanks so much for the reply. I have looked matters up indeed but now am struggling with a bit of another issue.
In my TMap I have a default data conversion .... TalendDate.parseDate("dd/MM/yyyy",row1.Date) the input date comes from a delimited file in the format of "20/02/2012" ergo as per this format. Yet I receive the error upon test as follows: Exception in component tRowGenerator_1.
I get the same error when I parse an string to integer.
Looking forward to your reply ... since tomorrow I am suppose to demo the product to management for acceptance.
Anonymous
Not applicable
Author

Hi CPA_Talend
The exception occurs on tRowGenerator_1, there must be something wrong in the parameter setting, we usually click the Preview button to see if the data can be generated. If this button does't work in your side, please upload a screenshot of tRowGenerator setting window, it will be helpful for us to address the problem.
Shong
Anonymous
Not applicable
Author

Hi Shong,
Please see below
0683p000009ME1y.jpg
Anonymous
Not applicable
Author

Hi,
Unfortunately, the screenshot you provided in #5 is not the screenshot of tRowGenerator setting window as @shong said. It is still the tMap. In your workflow, you have used component tRowGenerator as your input and something wrong with it (Exception in component tRowGenerator_1.) .
The screenshot should be as the follows.
Best regards
Sabrina
0683p000009MEDZ.png
Anonymous
Not applicable
Author

Hi,
I wish that to be the case but I do not use the TRowGenerator component anywhere ... hence I am confused...
Anonymous
Not applicable
Author

Hi,
The problem may be occur in it if you don't use component tRowGenerator.
By the way, talend provide training to community user for the study of talend products.
Best regards
Sabrina

alevy
Specialist
Specialist

The Test! button in Expression Builder doesn't work and never has. I can't understand why Talend doesn't get rid of it as this question keeps coming up on the forum! To test, you have to run the job.
Anonymous
Not applicable
Author

Thanks all,
I build around it ... that seemed to work ... basically, I now do all conversions ahead of mapping activities and keep tMap as much as possible for it's job.
However it remains a little weird.