This example pipeline demonstrates how to encode binary data
(such as employee biodata) and update the corresponding employee records in the
Snowflake database using the Snowflake - Update Snap.
-
Configure the File Reader Snap to read the employee data file from the SnapLogic database.
-
Configure the Binary to Document Snap to encode binary fields and the Snowflake - Select Snap to fetch existing records.
In the Binary to Document Snap, select ENCODE_BASE64 in the Encode or Decode field to enable base64 encoding of binary data.
-
Configure the Join Snap to join both document streams.
Use the Outer Join type to merge encoded and selected records from upstream Snaps.
-
Configure the Mapper Snap to prepare input data for the Snowflake - Update Snap.
Ensure that the BIO
and TEXT
fields match the binary and varbinary format requirements of the Snowflake schema.
-
Configure the Snowflake - Update Snap to update employee records in the Snowflake database.
Use the following update condition to convert the base64-encoded binary into a binary format and update the BIO
field:
BIO = to_binary( '"+$BIO+"','base64')
After validation, the Snap updates the employee records in the Snowflake
table with the encoded binary data.
-
Format and write the output using JSON Formatter and File Writer Snaps.