Page 1 of 1

LONG RAW issue

Posted: Wed Jan 11, 2012 11:33 pm
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.

Posted: Wed Jan 11, 2012 11:57 pm
by ray.wurlod
Conversion raw to ustring has to be specified as an explicit conversion function RawToString()?

Posted: Thu Jan 12, 2012 4:47 am
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)

Posted: Thu Jan 12, 2012 3:11 pm
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.

Posted: Thu Jan 12, 2012 11:00 pm
by qt_ky
"DATA"... What a great column name! :idea:

Posted: Thu Jan 12, 2012 11:15 pm
by ray.wurlod
Not every thought about column names is printable either.

Posted: Wed Jan 18, 2012 2:53 am
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.

Posted: Wed Jan 18, 2012 3:04 am
by ray.wurlod
Make your VarChar larger in the job metadata.

Posted: Wed Jan 18, 2012 3:10 am
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.

Posted: Wed Jan 18, 2012 8:09 am
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.