Publish / file · All operations
Write binary objects or images
A variant of Write another file format
Write the binary content or image held in each row to its own file.
Status
- In arcform
Runs as a SQL step
arcform carries it as a
sql:step today.
The DuckDB step
Write the binary content of each row to its own file
CREATE TEMP TABLE blobs AS SELECT * FROM (VALUES ('one', 'first file'::BLOB), ('two', 'second file'::BLOB), ('three', '\x00\x01\xff'::BLOB)) t(name, content);
COPY (SELECT name, content FROM blobs) TO '<your_scratch_dir>/blobs' (FORMAT blob, PARTITION_BY (name));
CREATE TEMP TABLE result AS
SELECT regexp_extract(filename, 'name=([^/]+)/', 1) AS name, content FROM read_blob('<your_scratch_dir>/blobs/*/*');
SELECT name, octet_length(content) AS size FROM result ORDER BY name;
SELECT CASE WHEN ((SELECT count(*) = 3 FROM result) AND (SELECT count(*) FROM result r JOIN blobs b USING (name) WHERE r.content = b.content) = 3) THEN 'as expected' ELSE error('the three rows were not written to three files holding exactly their bytes') END AS verdict;Replace <your_scratch_dir> with a directory of your own that you can write to before running the statement.
- It reads this from
<your_scratch_dir>, which you supply:blobs: An empty directory.
- It needs nothing installed beyond DuckDB itself.
- The statement checks its own result and raises an error when it is wrong: “the three rows were not written to three files holding exactly their bytes”.
- It passed on DuckDB
v2.0.0 (Cyanoptera) d54cbbe3df.
What other tools call it
Meridian's classification; an independent blind rating agreed on 95.7% of 324 rows (variant, version 3).
Alteryx Designer (2)
Blob Outputread 2026-09-27Write each record's binary object to its own file
Image Outputread 2026-09-27Save image files to a chosen location
Apache Hop (1)
Binary File Outputread 2026-09-27Write a binary field to a file whose name comes from each row
Azure Data Factory (1)
Binary format (sink)read 2026-09-27Write Binary files in copy activity
KNIME Analytics Platform (2)
Image Writer (Port)read 2026-09-27Write an image port object to a file
Image Writer (Table)read 2026-09-27Write every image in a column to files in a directory
RapidMiner Studio (2)
Write Fileread 2026-09-27Write a file object to disk or to the repository as a blob
Write Imageread 2026-09-27Write an image to disk
VisiData (1)
png (saver)read 2026-09-23Save as PNG image (from a PNG source)
Background
In Apache Hop, the Binary File Output transform writes raw binary content from a field to a file.[1] Apache Hop's Binary File Output reads the target file name from an input field, so every row can be written to a different file.[1] In Alteryx, the Blob Output tool writes each record into its own file, taking the bytes from a field of binary large object (BLOB) data.[2]
When to use it
Apache Hop's Binary File Output is for a byte-for-byte write of BLOB or binary data, such as exporting a database BLOB column to individual files.[1] In Apache Hop, Text File Output applies text encoding and formatting and can corrupt raw bytes, so Binary File Output is preferred for binary data.[1] In Apache Hop's Binary File Output, null binary content fails the row, while an empty binary value of 0 bytes writes an empty file.[1]
In Azure Data Factory, a Binary dataset's file content is not parsed but treated as-is, and a copy activity can only copy from a Binary dataset to a Binary dataset.[3] KNIME's Image Writer (Table) node can fail, overwrite or ignore when an output file already exists.[4] Build file names from a column that is unique for each row, and choose what happens when a file already exists rather than leave it to the default. (Meridian's view)
The method
In Apache Hop's Binary File Output, no character encoding is applied: bytes are written exactly as stored in the field.[1] In DuckDB, the BLOB format of COPY ... TO writes a single column, cast to the BLOB data type, into a .blob file.[5] In DuckDB, the BLOB format's COMPRESSION option can be none, gzip or zstd, and by default is detected from the file extension.[5]
KNIME's Image Writer (Table) node writes each image in a column as a separate file in a directory, taking file names from a column or generating them from a pattern with a counter.[4] KNIME's Image Writer (Table) node determines the file extension automatically, so it should not be included in the file names.[4] In Alteryx's Blob Output tool, a field's value can be appended or prepended to the file name, replace the file name, or replace the entire path.[2]
Sources
- [1]Binary File Output | Apache Hopdocumentation
- [2]Blob Output Tooldocumentation
- [3]Binary format - Azure Data Factory & Azure Synapse | Microsoft Learndocumentation
- [4]Image Writer (Table)documentation
- [5]COPY Statement – DuckDBdocumentation