cancel
Showing results for 
Search instead for 
Did you mean: 

Convert Base64 to HEX

ADORAISWAMY
New Contributor II

I am working on a Snaplogic pipeline to copy data from Oracle to Snowflake. A few tables at source have BLOB column which needs to be copied. Snaplogic sees them as “Base64 encoded data” but Snowflake needs the data in HEX format. I would like to know if its possible to convert the data as required and load into Snowflake tables. I’ve attached a sample pipeline.
TEST_2021_06_18.slp (7.1 KB)

17 REPLIES 17

ADORAISWAMY
New Contributor II

Thanks for clearing that, Peter. From your experience, how does Snaplogic handle copying binary data into Snowflake from any kind of source RDBMS - Oracle BLOB specifically? If Snaplogic can’t handle binary data, then I have to find a way to run snowflake commands from either Snaplogic or ditch snaplogic completely and go another route. snowflake has command to encode/decode data but I am not sure how to run those command from Snaplogic GUI. There isn’t enough documentation on the internet on either Snaplogic and/or Snowflake for me to make a clear determination.

If you can suggest some workarounds/pointers, that will be much appreciated.

Anand

(minor correction: my name is Patrick, not Peter)

I’m afraid I’m completely unfamiliar with our Snowflake snaps, so I’ll ask one of our devs who’s familiar with Snowflake to respond.

BTW, which Snowflake snap(s) are you trying to use? Insert? Bulk Load? other?

ADORAISWAMY
New Contributor II

Sorry for misstating your name, Patrick. I am using “SNOWFLAKE - BULK UPSERT” snap.

No worries. The doc for that snap suggests you can use the File format option property for this. I think you’d set it to BINARY_FORMAT=BASE64. You would need to ensure your binary content is Base64 encoded using Base64.encode($CONTENT), etc.