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.