OpenSource database automation toolkit

User Tools

Site Tools


Export binary fields

This script exports binary column named BlobData from table Genre. For each row is created separate file names genre${GenreId}.txt , where ${GenreId} is replaced with value of GenreId column.

DbShell Script

<?xml version="1.0" encoding="utf-8" ?>
ForEach(source = Query("SELECT GenreId, BlobData FROM Genre")) {
    SaveToFile(file = "genre${GenreId}.txt", Expression = "BlobData");


    "$type": "Foreach",
    "source": {
        "type": "Query",
        "text": "SELECT GenreId, BlobData FROM Genre"
    "command": {
        "type": "SaveToFile",
        "expression": "BlobData",
        "file": "genre${GenreId}.txt"
samples/export_binary_fields.txt · Last modified: 2018/04/21 19:13 by admin