What am I doing wrong?

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
SettValleyConsulting
Premium Member
Premium Member
Posts: 72
Joined: Thu Sep 04, 2003 5:01 am
Location: UK & Europe

What am I doing wrong?

Post by SettValleyConsulting »

So I have a sequential file with dates in the form 2012-11-25. On the format tab of the sequential file I set the format string for dates to be %yyyy-%mm-%dd.

The help text for this property is
'The string format of a date. By default, the format of the date string is %yyyy-%mm-%dd.
reinforced by the online help:
When you specify a date format string, prefix each component with the percent symbol (%) and separate the string's components with a suitable literal character.

The default date_format is %yyyy-%mm-%dd.
so I should be pretty safe, no? Well the job throws this warning
sq_StatsFiles: When validating import schema: Unrecognized top level format property: date_format="%yyyy-%mm-%dd"
This has been asked before but the thread fizzled out without a resolution, anyone seen this behaviour? What's wrong with my format string?

TIA
Phil Clarke
satishmailbox
Participant
Posts: 3
Joined: Thu May 17, 2007 4:47 pm

Re: What am I doing wrong?

Post by satishmailbox »

may be try specifying at column level (double click next to column name) not at stage level
SURA
Premium Member
Premium Member
Posts: 1229
Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney

Re: What am I doing wrong?

Post by SURA »

I will read it as Varchar.
Thanks
Ram
----------------------------------
Revealing your ignorance is fine, because you get a chance to learn.
abhijain
Participant
Posts: 88
Joined: Wed Jun 13, 2007 1:10 pm
Location: India

Post by abhijain »

It would be good, if read it as VARCHAR first and then convert into Date format using Datastage function using

StringToDate(InputString,"%yyyy-%mm-%dd")
Rgrds,
Abhi
Post Reply