Column names with -

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
pratapsriram
Premium Member
Premium Member
Posts: 41
Joined: Tue Jan 24, 2006 3:43 pm
Location: United States
Contact:

Column names with -

Post by pratapsriram »

Hello DataStage'rs,

I have a requirement to name a column as HCFA-UPIN. I cannot do that as the Transformer stage wont allow that name and suggests that names cannot have special characters other than underscore(_). I can convey that to Business and they may probably agree, but wondering if there is a way to override that constraint in the Transformer. Like we use / in unix to tell the OS that the next character not be treated as an option but as a text. Similarly can we do something like that in DataStage for column names?

Thanks,
MS
Knowledge is Power
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

What's your target?
-craig

"You can never have too many knives" -- Logan Nine Fingers
probal
Participant
Posts: 24
Joined: Sun Oct 25, 2009 10:17 am
Location: kolkata

Post by probal »

I fear it can't be done.
datatage can't process column names having '-'.
In oracle u can do it. but even then datastage will not support that column
Probal
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

probal wrote:In oracle u can do it.
I happen to know that U is working in a DB2 shop at the moment.

The second person personal pronoun in English is spelled "you", not "u".
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 »

probal wrote:I fear it can't be done.
datatage can't process column names having '-'.
In oracle u can do it. but even then datastage will not support that column
Not quite true... and the answer depends entirely on the (currently unknown) target.
-craig

"You can never have too many knives" -- Logan Nine Fingers
probal
Participant
Posts: 24
Joined: Sun Oct 25, 2009 10:17 am
Location: kolkata

Post by probal »

@ray: can't get you properly what you have said about that 'DB2'.I'm sorry if I miss any topic related 'formalities of posting answers'.
I wonder If there is any syntactical checking is done on the answers posted here...less bothered about the 'second person personal pronoun in English' or that sort of thing. :)


@chulett :Can you please give 1 instance where datastage supports column name containg '-'.
Probal
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

We get extremely tired of people posting here like they're chatting on their cell phone. Not everyone here speaks English as their primary language so all of those SMS abbreviations that work so well from a phone when you're typing with your thumbs just look... unprofessional here.

Your transgression was minor: "In oracle u can do it". We have a poster here with a handle of "U" which is what Ray was referring to - they work in a DB2 shop so U cannot in fact "do it in Oracle". We've seen entire posts that almost look like code and draw far harsher responses, you got off easy. :wink:

You'll find me using some, but that would be the acronym style ones like IMHO, AFAIK, etc rather than "b4 u cn do tht u hv 2 c if the..." kind of crap.

On the column name issue, you are indeed correct that DataStage internally, in the job cannot support that kind of a column name. However, that's not what the poster is asking. I cannot imagine that anyone would require the internal column names to have the dash but we've seen some RIDONKULOUS requirements handed down here, so who knows. I'm assuming it's all about the target (and possibly the creation of it), otherwise the actual name of the column in the job isn't really 100% relevant. DataStage does in fact have ways to support it, source and target / relational and flat file, but again that depends on the "where" - something that was not specified. The devil is in the details and we are soft on the details so far.

Oh, and on the "syntax checking" AFAIK there's nothing built into the site other than the standard profanity filter. Those syntax checks are all handled by the wetware - you (ie: the author of the post) and Ray. :lol:
-craig

"You can never have too many knives" -- Logan Nine Fingers
probal
Participant
Posts: 24
Joined: Sun Oct 25, 2009 10:17 am
Location: kolkata

Post by probal »

@ray;@chulett :I am extremely sorry for my previous post. :oops:
Basically I misunderstood ray's post.Now I get the point.I'll obviously keep that in mind. :)



The main question in the post was that transformer is not supporting column name containing '-'.What I was trying to say was that in database we can manually create a column containing '-'.the metadata can be loaded in the database stage in datastage,but even though the transformer stage wouldn't support that in a transformer.
Probal
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

No it doesn't, but there's nothing to prevent you from mapping from the database name to a DataStage-legal name. For example, when selecting, use the database name in the Derivation column (the name may need to be in double-quotes).
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 »

probal wrote:The main question in the post was that transformer is not supporting column name containing '-'.
I've already explained the fact that that small piece is indeed correct, as has Ray. The original question goes beyond that. Ray started to discuss something I was (and still am) going to wait for the details before doing - how you manage to do that. Not in the mood to spell out all the variations based on what you are talking to.
-craig

"You can never have too many knives" -- Logan Nine Fingers
probal
Participant
Posts: 24
Joined: Sun Oct 25, 2009 10:17 am
Location: kolkata

Post by probal »

Please don't misunderstand me.I understood the 'u' part. and I'll keep that in mind.
Probal
pratapsriram
Premium Member
Premium Member
Posts: 41
Joined: Tue Jan 24, 2006 3:43 pm
Location: United States
Contact:

Post by pratapsriram »

The target is SQL Server 2005/2008. According to Ray's comments, if we give the column names in ""(Quotes), then it must work? Am I right?
Knowledge is Power
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Try it, let us know.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply