Importing Binary Data

When importing CSV files, you can use two ways to import data to binary columns. The first way is to specify the data in a hexadecimal format in the CSV file. However, it may be inconvenient to place the data for such columns to a CSV file. For example, if you want to import a number of pictures to Salesforce attachments, it definitely won’t be convenient to convert them to the hexadecimal format and place the result into a CSV file.

The second way is to import a set of binary files to a binary field, uploading them compressed to a zip archive. You just need to upload a zip archive with these files together with the CSV file with other data. The CSV file must specify which attachment file to import for each data row. The easiest way to specify this information is to add a column with the attachment file names to use to the CSV file. However, you may use more complex ways since Skyvia allows specifying the corresponding file names using Expressions.

Field/Column Types

The following field/column types require either hexadecimal format of CSV column values or Zip File mapping:

  • Salesforce: base64
  • Salesforce Marketing Cloud: ByteA
  • SQL Server: image, binary, varbinary
  • MySQL: binary, varbinary, blob
  • PostgreSQL: bytea
  • Oracle: raw, blob, long raw, bfile
  • SQL Azure Data Warehouse: binary, varbinary
  • Google BigQuery: bytes

Note that importing zip archives is not supported for Zoho CRM.

How to Import Binary Data

To import binary files, upload the zip archive together with the CSV file on the Source Definition page of the Task Editor.

If you are importing local file(s) from your computer, drag your file to the drop here your file, or browse area or click the browse link and upload the CSV file to import.

Add zip with binary data box

When the CSV file is uploaded, select the Add zip with binary data check box under Source CSV and drag your ZIP file to the drop here your file, or browse area or click the browse link.

The maximum size of a ZIP file that can be uploaded is 400 Mb.

Selected box for Add zip with binary data

If you are importing files from FTP or a file storage service, select the file in the CSV Path drop-down list. Then, select the Add zip with binary data check box and find the ZIP file you want to upload in the ZIP Path drop-down list. This drop-down list displays folders and files from the specified source connections. You can open and close folders by clicking them.

Folders list

Then, when mapping a binary field use a special Zip File mapping and specify an expression, returning the name of the attachment file to import for the current data row.

Zip File mapping

To find a more detailed information about binary data import with a zip archive, see the How to Import Accounts with Binary Attachments tutorial.