Date format - Log error - PX
Posted: Fri Jun 05, 2009 6:38 am
Dear Expert,
I'm facing an issue while checking the date format in transformer stage.
The date value from the input file is defined as Char[10] and the corresponding target datatype is Date.
I'm checking the date format if "yyyy-mm-dd" otherwise I'm rejecting the rows. I have used the following constraints in my transformer
correct path
------------------
Reject path
-----------------
For the input values
Rows EFF_DT EXP_DT
1 2000-01-01 2000-10-10 - (correct)
2 ' ' ' ' - (reject)
3 2/02/2001 2/11/2001 - (reject)
I'm able to get the records in the respective path. The job design is green. However log shows couple of fatal errors as follows:
1. APT_CombinedOperatorController,0: Data string ' ' does not match format '%yyyy-%mm-%dd': an integer was expected to match tag %yyyy.
Data string ' ' does not match format '%yyyy-%mm-%dd': an integer was expected to match tag %yyyy.
Data string ' ' does not match format '%yyyy-%mm-%dd': an integer was expected to match tag %yyyy.
2. APT_CombinedOperatorController,0: Data string '2/11/2001 ' does not match format '%yyyy-%mm-%dd': the value for tag %yyyy has fewer characters than expected.
Could you please share your ideas on how I can suppress these fatal errors?
Thanks & Regards
I'm facing an issue while checking the date format in transformer stage.
The date value from the input file is defined as Char[10] and the corresponding target datatype is Date.
I'm checking the date format if "yyyy-mm-dd" otherwise I'm rejecting the rows. I have used the following constraints in my transformer
correct path
------------------
Code: Select all
constraint IsValid("Date",EFF_DT)=1 AND IsValid("Date",EXP_DT)=1
-----------------
Code: Select all
constraint IsValid("Date",EFF_DT)=0 AND IsValid("Date",EXP_DT)=0 OR (EFF_DT=' ' EXP_DT=' ')
Rows EFF_DT EXP_DT
1 2000-01-01 2000-10-10 - (correct)
2 ' ' ' ' - (reject)
3 2/02/2001 2/11/2001 - (reject)
I'm able to get the records in the respective path. The job design is green. However log shows couple of fatal errors as follows:
1. APT_CombinedOperatorController,0: Data string ' ' does not match format '%yyyy-%mm-%dd': an integer was expected to match tag %yyyy.
Data string ' ' does not match format '%yyyy-%mm-%dd': an integer was expected to match tag %yyyy.
Data string ' ' does not match format '%yyyy-%mm-%dd': an integer was expected to match tag %yyyy.
2. APT_CombinedOperatorController,0: Data string '2/11/2001 ' does not match format '%yyyy-%mm-%dd': the value for tag %yyyy has fewer characters than expected.
Could you please share your ideas on how I can suppress these fatal errors?
Thanks & Regards