Hi,
I have source File which is flat file i am getting some warning messages;
Please some one can hel me out
source: falt file
delimiter: |(Pipe)
Final delimiter: None
Source as follows:
CUSTOMER_ID|CUSTOMER_NAME|TRANSACTION_DT|STR_DT,END_DT
1|UMA|1/1/2010|5/20/2010|12/20/2010
1|UMA|5/28/2010|5/20/2010|12/20/2010
Metadata definitiions:
Col Name Type Lenth Nullabale
CUSTOMER_ID integer 10 n
CUSTOMER_NAME varchar 10 n
TRANSACTION_DT date 10 n
STR_DT date 10 n
EMD_DT date 10 n
My logic is to filter the Transaction date between STR_DT and END_DT
My issue was, when i load the metadata definitions in sequention file and try to view the data. I am unable to view the data. It gives following error:
##W IIS-DSEE-TFIG-00198 14:00:04(000) <Sequential_File_0,0> Field "TRANSACTION_DT" delimiter not seen, at offset: 16
##W IIS-DSEE-TOIX-00154 14:00:04(001) <Sequential_File_0,0> Import warning at record 0.
##W IIS-DSEE-TOIX-00018 14:00:04(002) <Sequential_File_0,0> Import unsuccessful at record 0.
##W IIS-DSEE-TFRS-00051 14:00:04(003) <Sequential_File_0,0> Missing record delimiter "\n", saw EOF instead
##W IIS-DSEE-TOIX-00154 14:00:04(004) <Sequential_File_0,0> Import warning at record 1.
##W IIS-DSEE-TFIG-00198 14:00:04(005) <Sequential_File_0,0> Field "TRANSACTION_DT" delimiter not seen, at offset: 16
##W IIS-DSEE-TOIX-00154 14:00:04(006) <Sequential_File_0,0> Import warning at record 1.
If i change the datatatype for Date fields as below:
Col Name Type Lenth Nullabale
CUSTOMER_ID integer 10 n
CUSTOMER_NAME varchar 10 n
TRANSACTION_DT varchar 10 n
STR_DT varchar 10 n
EMD_DT varchar 10 n
Now i can view the data in the sequential file. But i need to implement a logic in filter stage as below:
TRANSACTION_DT between STR_DT and EMD_DT
Here as i read the date fileds as varchar i am unable to implement the above Logic.
Please cna anyone help me on this
Help need for this to avoid the Warning Messages
Moderators: chulett, rschirm, roy
I think that using Date types to read the file, it expects them to be in exact default date format, which is different than the format in your file. Maybe you can read the dates as VarChar types then use a StringToDate function in a Transformer, to get them into a real Date column type.
Choose a job you love, and you will never have to work a day in your life. - Confucius
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
You seem to have a mix of delimiter characters in your data ("|" and ","). You may need to read the start date and end date as a single field and parse them subsequently. Also check that the correct delimiter (as per your metadata) terminates the transaction date field.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Hi,ray.wurlod wrote:You seem to have a mix of delimiter characters in your data ("|" and ","). You may need to read the start date and end date as a single field and parse them subsequently. Also check that the correct delimiter (as per your metadata) terminates the transaction date field.
Just one quick question .
How to read start date and end date as Single Filed.
Do i need to keep them in single quotes.
-
- Participant
- Posts: 51
- Joined: Sat Dec 09, 2006 3:32 am
Re: Help need for this to avoid the Warning Messages
Follow Eric's logic.