'Is there a difference in inserting a txt/csv file or an image into a BLOB column in Oracle?
I'm writing a Python script with CX_ORACLE which will take about 20K files and upload them into a BLOB column.
They are PDFs,CSVs,TXTs, and JPGs.
I'm just not understanding how I can both put these text and binary files all into the BLOB column.
Solution 1:[1]
Remember - all files are 'binary' files. A text file is just a binary file with an encoding that allows it to be represented as text. An ASCII or UTF encoded file is still a binary file under the hood.
A BLOB column holds an arbitrary binary sequence, with no assumptions about encoding. So you can pass any binary sequence in as input.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Nick Bailey |