Blob image export from firebird?
March 24, 2021 7:48 AM   Subscribe

I need to automate extracting thousands of images (saved as blobs!?) from a firebird database and given them filenames that will allow me to link them up for the next stage of reimporting them into a new file system. Can anyone help me with how I'd go about this?! Bit lost.... Details about my IT abilities are below the bar.... If someone had time to do a bit of hand holding that would be amazing.... Thank you!!

I'm a bit of a n00b with databases really but I'd say I'm good with computers otherwise. I dabble in NodeRed, C++, Asterisk, ESP32, unix, home automation that kind of stuff. I'm just trying to give you an idea about my abilities generally. Not an IT clutz but just no need hitherto to interact with databases beyond Microsoft Access at high school and a bit of cPanel/MySQL/PHP stuff back in the 2003 era!
posted by dance to Computers & Internet (1 answer total)
Looks like BLOBDUMP may be your answer.

If you have more questions (e.g. about SQL syntax, if that's new for you) after you read that link, you can post them in another question. But roughly speaking, you can generate a script from the output of a SQL query that you run on your blob table, using || (double pipe) as a concatenation operator to glue the various component substrings of each BLOBDUMP command together

Kinda like:

SELECT 'BLOBDUMP ' || blob_id || ' ' || blob_name || '.jpg' FROM my_blob_table

then spool the output to a file & run it as a batch script - which will have as many lines as there are rows that are returned from your query - add a WHERE clause if you want to restrict your results to some subset
posted by rd45 at 9:16 AM on March 24, 2021 [1 favorite]

« Older What happens after a positive covid test in NYC?   |   Is working from home going to give me lung cancer? Newer »
This thread is closed to new comments.