Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
smunagala1615566132
Contributor
Contributor

Using tSchemaComplianceCheck for max length validation of integer/long

Team,

tSchemaComplianceCheck is helping me in validating all the necessary schema validation but

when comes to long datatype, I provided length as 10 but even the value exceeds length of 10 it is not coming under rejects.

Eg:

I have mobile_number column which should hold only 10 digits but schema compliance check is not directing that to rejects. If the number is like 1234567890987 instead writing it into success path.

Could you please suggest me a way to handle this.

Thanks,

Srini

Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable

Hi

You need to convert the data type to string before tSchemacompliance if you want to check the length, convert the data type to long back if needed later.

 

Regards

Shong

View solution in original post

6 Replies
Anonymous
Not applicable

Hello,

Have you tried to do that by checking in tSchemacompliance in validation rules part? Could you please show us your tSchemacompliance component setting screenshot here?

Best regards

Sabrina

Anonymous
Not applicable

Hi

You need to convert the data type to string before tSchemacompliance if you want to check the length, convert the data type to long back if needed later.

 

Regards

Shong

smunagala1615566132
Contributor
Contributor
Author

Thank you Shong,

That's my initial thought but if we do length check first and do the integer check later . I need to unite main and rejects before I pass the data to second tschemacheckcompliance but Talend not letting me to do the tUnite for the same source.

Any suggestions would be greatly helpful. I need the flow like this

 

 0695b00000DuH4YAAV.jpgThanks,

Srini

Anonymous
Not applicable

Hi

Talend doesn't allow to create a cycle flow in the job, as a workaround, cache the output data into memory using tHashoutput components, in next subjob, read the data from memory using tHashInput.

...tschemacheckcompliance --main--tHashOutput1

--reject--tHashOutput2

|onsubjobok

tHashInput1---main--tUnite.....

|main

tHashIput2

 

Regards

Shong

smunagala1615566132
Contributor
Contributor
Author

Thanks Shong,

I'm currently using Talend Open Studio for Big Data 7.3.1 and I don't see any component like thash*. Could you please suggest what could be the reason.

0695b00000DuTZxAAN.jpg

Anonymous
Not applicable

please read this KB article to active these two components.