Help need for this to avoid the Warning Messages

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
e1994264
Premium Member
Premium Member
Posts: 28
Joined: Mon Jul 18, 2011 5:12 pm

Help need for this to avoid the Warning Messages

Post by e1994264 »

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
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post by qt_ky »

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
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

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.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

I'll wager that's just a typo in the header record from hand-typing the source data example.
-craig

"You can never have too many knives" -- Logan Nine Fingers
e1994264
Premium Member
Premium Member
Posts: 28
Joined: Mon Jul 18, 2011 5:12 pm

Post by e1994264 »

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.
Hi,
Just one quick question .
How to read start date and end date as Single Filed.
Do i need to keep them in single quotes.
elias.shaik
Participant
Posts: 51
Joined: Sat Dec 09, 2006 3:32 am

Post by elias.shaik »

You can club start date and end date together in a transformer, after extracting from source.
------------
Elias
DLL_GDW
Premium Member
Premium Member
Posts: 1
Joined: Thu Sep 03, 2009 9:46 am

Re: Help need for this to avoid the Warning Messages

Post by DLL_GDW »

Follow Eric's logic.
Post Reply