Quantcast
Channel: SCN : Unanswered Discussions - Data Services and Data Quality
Viewing all articles
Browse latest Browse all 3719

usage of base64_decode function on BLOB data

$
0
0

Hi,

 

I have a DS4.1 dataflow that reads base64-encoded word docs from a source.

The encoded word docs are stored in a varchar(200000) field and look e.g. like this:

 

0M8R4KGxGuEAAAAAAAAAAAAAAAAAAAAAPgADAP7/CQAGAAAAAAAAAAAAAAABAAAAUwAAAAAAAAA [...]

 

I'd like to decode the field and store it in a BLOB/ST_MEMORY_LOB column in SAP HANA but I'm struggling with base64_decode() in DS.

 

apporach 1:

base64_decode( <encoded_doc>, 'UTF-8')  seems only to work if <encoded_doc> is an encoded UTF-8 string which is not the case here - the word

docs are encoded binary data.

 

approach 2:

step 1: apply varchar_to_long(<encoded_doc>) and map it to a BLOB field in DS

step 2: in a downstream query: call base64_decode( <encoded_doc_as_BLOB> ) and map the output to a LONG field which
becomes a BLOB/ST_MEMORY_LOB in my SAP HANA table.

 

When I do this, I'm getting wrong data in the SAP HANA BLOB that has nothing to do with the original word doc (?)

 

Does anyone has experience with base64_encode/decode on binary data stored in blobs?.

Thanks for your response!

 

Regards, Martin

 

PS: I can write the the encoded data into SAP HANA if i map the varchar_to_long(<encoded_doc>) output to a LONG field in DS and map it to SAP HANA BLOB field. But I don't have a base64-decode function in SAP HANA.


Viewing all articles
Browse latest Browse all 3719

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>