BLOB (Binary Large OBject) support in ECL begins with the DATA value type. This type may contain any type of data, making it perfect for housing BLOB data.
There are essentially three issues around working with BLOB data:
1) How to get the data into the HPCC Systems cluster(spraying).
2) How to work with the data, once it is in the HPCC Systems cluster.
3) How to get the data back out of the HPCC Systems cluster (despraying).
In the HPCCClientTools.PDF there is a chapter devoted to the DFUplus.exe program. This is a command line tool with specific options that allow you to spray and despray files into BLOBs in the HPCC Systems cluster. In all the examples below, we'll assume you have a DFUPLUS.INI file in the same folder as the executable containing the standard content described in that section of the PDF.
The key to making a spray operation write to BLOBs is the use of the prefix=Filename,Filesize option. For example, the following command line sprays all the .JPG and .BMP files from the c:\import directory of the 10.150.51.26 machine into a single logical file named LE::imagedb:
C:\>dfuplus action=spray srcip=10.150.51.26 srcfile=c:\import\*.jpg,c:\import\*.bmp dstcluster=le_thor dstname=LE::imagedb overwrite=1 PREFIX=FILENAME,FILESIZE nosplit=1
When using the wildcard characters (* and ?) to spray multiple source files (srcfile) to a single dstname, you MUST use both the filename and filesize (FILENAME,FILESIZE) options if you need to be able to despray the contents of each record in the dstname back to the multiple source files they originally came from.