whitespace between two words
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 37
- Joined: Fri Oct 21, 2005 4:09 am
whitespace between two words
HI,
I am getting extra white space between 2 words - address column
from oracle and inserting it into teradata.
exmple
cold ice land
cold ice land ( extra space)
my requirement is to insert the row with extra space as it is. while inserting the in to teradata I am applyin function trim(colname,'B')
Also I have 3 transformer stage in my job.
For some reason the these extra space are getting removed automatically before applyin trim function.
datatype of the column is varchar,
Please help how can I insert this text as it is.
I am getting extra white space between 2 words - address column
from oracle and inserting it into teradata.
exmple
cold ice land
cold ice land ( extra space)
my requirement is to insert the row with extra space as it is. while inserting the in to teradata I am applyin function trim(colname,'B')
Also I have 3 transformer stage in my job.
For some reason the these extra space are getting removed automatically before applyin trim function.
datatype of the column is varchar,
Please help how can I insert this text as it is.
Thanks and Regards
Abha
Abha
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
FYI - a "trick" I use - you need to start a 'reply with quote' session to take a proper look at the example. Without code tags, all extra spaces are always removed by the forum software. Then you'll see it's not about trailing spaces but rather internal spaces.
Code: Select all
cold ice land
cold ice land ( extra space)
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 37
- Joined: Fri Oct 21, 2005 4:09 am
This is not happening. I have added a flat file with the teraApi stage and passing the output in both the stages. In the flat file derivation, there is no trim function .chulett wrote:It will go into the target intact unless you explicitly remove them. How are you certain that they are gone before you send them to Teradata? Have you added a logging link (or three) to check? ...
example
lkname.columnname.
upon viewing the output- both the address lines are coming as
ice cold land
ice cold land
However it should be
ice cold land
Code: Select all
ice cold land
Please suggest
Thanks and Regards
Abha
Abha
-
- Participant
- Posts: 37
- Joined: Fri Oct 21, 2005 4:09 am
This is a server job . Sorry for confusion. I am not sure how to change it now.miwinter wrote:Is this a server or PX job? You cite server in your post yet it is posted in the PX forum...
Does the varchar field concerned have a length defined?
There are two field which has same issue. the datatype and the length are:
1. varchar 100
2. varchar 60
Thanks and Regards
Abha
Abha
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
-
- Participant
- Posts: 37
- Joined: Fri Oct 21, 2005 4:09 am
I have added a flat file in very first transformer and without any function on the derivation( linkname.colname) . In that flat file the data is coming intactSainath.Srinivasan wrote:What if you get the link from very first transformer without any derivation ? ...
i.e I can see the extraspace. But when the data reach to the final transformer the spaces are gone.
Thanks and Regards
Abha
Abha
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
-
- Participant
- Posts: 37
- Joined: Fri Oct 21, 2005 4:09 am
A.Transformer 1:Sainath.Srinivasan wrote:Can you list the derivation of the target column tracing from its source. Something like Craig asked. ...
linkname.columnname varchar 50
B.transformer 2:
linkname.columnname varchar 50
C.Transformer 3: to teraApi
Trim(linkname.columnname,'B') varchar 100( for teraApi)
D.Transformer 3: to flatfile
linkname.columnname varchar 50
Both C and D are resuting in same values.
Thanks and Regards
Abha
Abha
Definitely some change going on in the subsequent transforms I'd suspect. I've happily gone from char to varchar and back to char in a DB2 target from a flat file, retaining space in between three words as you have shown you require. That or some quirk in Teradata.
Mark Winter
<i>Nothing appeases a troubled mind more than <b>good</b> music</i>
<i>Nothing appeases a troubled mind more than <b>good</b> music</i>
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
Furthemore, you stated:
... so I'm wondering why you have those transformers in place at all? It's superfluous overhead and clearly seems to be the basis of the 'fault'.I am using orace function Upper in the select query for this field and I not applying any function to any of the previous transformer
Mark Winter
<i>Nothing appeases a troubled mind more than <b>good</b> music</i>
<i>Nothing appeases a troubled mind more than <b>good</b> music</i>