LONG RAW issue

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
srivalli_b
Participant
Posts: 32
Joined: Tue Dec 20, 2011 8:03 am

LONG RAW issue

Post by srivalli_b »

Hi,

My job :
oracle connector stage-> transformer -> teradata connector stage

in source DDL there is a column as data. datatype is LONG RAW. while imporing into oracle connector stage it is takeing as longvarbinary.
my target column data type is varchar(4000).

but while I am compileing my job I am getting compilation error in transformer. I did not use any conversion function for this column.
error:
Error in output column derivation expression for column DATA in link out_CSPRO_OPP_EMF. Invalid conversion requested from a raw to a ustring.

Please help me.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Conversion raw to ustring has to be specified as an explicit conversion function RawToString()?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
srivalli_b
Participant
Posts: 32
Joined: Tue Dec 20, 2011 8:03 am

Post by srivalli_b »

Thanks ray . that compilation error is gone.

But I ran the job. in the target table(teradata) i did not get any value for this column. it is stored some junk characaters. I am unable to see the proper value.In the transformer I have used below code.

RawToString(in_RawToString(in_OPP_BRS.DATA)
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You are too hasty in using the term "junk". This raw string contains your client's real data - not rubbish. Not every character in a raw string is necessarily printable. This does not preclude valid data being stored.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post by qt_ky »

"DATA"... What a great column name! :idea:
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 »

Not every thought about column names is printable either.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
srivalli_b
Participant
Posts: 32
Joined: Tue Dec 20, 2011 8:03 am

Post by srivalli_b »

we asked the sample data for the long raw column. But sample data contains more than 4000 characters. If I am trying insert into long raw column it is throwing error.it is allowing me up to 4000 characates.

sample data:
0400060000001200000026020B0000004561726C79204461746573080000004163746976697479170000004B53435F4E6F6E5F437269745F4E6F6E5F4D535F464C5400000000080005000300D20F26020B0000004561726C7920446174657308000000437269746963616C120000004B53435F437269745F4E6F5F4D535F464C5400000000080002000300D20F26020A00000053756270726F6A6563740B00000053756D6D617279204261720A00000053756270726F6A65637402001500170006000700D60F26020800000050726F67726573730800000050726F67726573731A0000004B53435F4E6F745F506C616E6E65645F4E6F6E5F4D535F464C5400000000000006000700D60F26020A000000546578745F4461746573000000000E0000004B5

I have to insert sample data. please help me.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Make your VarChar larger in the job metadata.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
srivalli_b
Participant
Posts: 32
Joined: Tue Dec 20, 2011 8:03 am

Post by srivalli_b »

My job :
oracle connector stage-> transformer -> teradata connector stage
we asked client for sample data for long raw column. They provided
above data. I tried insert(manually) into the oracle database.
But I could not.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Why would you think you could insert 'sample data' that is > 4000 into a field with a precision of 4000? :?

Of course, you could trucate the string to 4000 and load it. You may also run into an issue with BYTE semantics - your target column may hold 4000 bytes which does not always equal 4000 characters.
-craig

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