getting import error for date field

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
deesh
Participant
Posts: 193
Joined: Mon Oct 08, 2007 2:57 am

getting import error for date field

Post by deesh »

Hi,
I have getting below two warnings.

1.summary_file,0: Bad trailing quote character at field "Date"; looking for '34' but found 'r', at offset: 11

2.getting import error for the below field, for the field data type is date,size is 10 and using pipe delimeter as field delimeter.

date format :: 20121101

Please could any one help in this case

MYDAS,0: Field "BaseLine_Date" has import error and no default value; data: {2 0 1 2 1 1 0 1 | V}, at offset: 74
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Post some input records and detail for us the settings you are using in the Sequential File stage.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Your default date format is ten characters (YYYY-MM-DD) but the dates in your data contain only eight characters (YYYYYMMDD). You need to adjust your metadata, specifically the format for that date column.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
deesh
Participant
Posts: 193
Joined: Mon Oct 08, 2007 2:57 am

Post by deesh »

Hi,

Input record format in sequencial file

Data type :: Date
Length ::10
record ex :: 20110101, 20120606 YYYYMMDD

field delimeter is ::: pipeline

I need to pass same value into output
pran.praveen
Premium Member
Premium Member
Posts: 20
Joined: Tue Jun 22, 2010 9:02 am

Post by pran.praveen »

Why don't you read it as char and transform it later in transformer.
Praveen
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

deesh wrote:record ex :: 20110101, 20120606 YYYYMMDD
This is a complete and accurate example of a record from your file? It actually includes the "YYYYMMDD" part? You've also said the field delimiter is a 'pipeline' by which I assume you mean pipe or '|' and yet there is not such character in your example and it doesn't match either error.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You still have to set the date format string in your metadata to "%yyyy%mm%dd" - you have provided no evidence that you have done so.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply