Mass creation of Attachments from an oracle "BLOB" table

447
4
02-13-2013 07:01 AM
MikeHo
by
New Contributor
Hi,

Please forgive me with my newbie question. I am still learning my way around ArcGIS 10.1 and python

Is this possible to write a python script to perform batch loading attachments from a blob column of an oracle table ? In this case, I have a featureclass with MATCHID field (say PIC_ID). I also have a "detail" oracle table that has coresponding PIC_ID column and the image is stored in a blob column.

I went through the add attachments example of ArcGIS 10.1 using matching table to generate attachment by loading image from file folders using "arcpy":

http://resources.arcgis.com/en/help/...0000014v000000

The above example loads images from an o/s folder.  Is this feasible to use a similar python script with arcpy & cx_oracle to add attachment using data from a blob column in an oracle table ? or is there other tool in Arcgis to perform this task in batch ?

Thank you in advance for any pointers.

Michael
0 Kudos
4 Replies
RussellBrennan
Esri Contributor
0 Kudos
MikeHo
by
New Contributor

Thanks Russel. The sample script really pointed me to the right direction. I originally hope that there is someway to do this directly at the database level (ie: grab blob directly instead of saving it to file system then generate the attachment) due to large volume of data and storage constraints. Again, Thank you for your help.
Michael
0 Kudos
BruceHarold
Esri Regular Contributor
Hi

Unless your database has a field for the file size you'll still need to bounce your blob data through the filesystem to pick up the attachment size in bytes.

The attached Data Interoperability ETL tool might be useful too, it could be edited to read Oracle blobs.

Regards
0 Kudos
MichaelVolz
Esteemed Contributor
Will the attachments created from an Oracle BLOB field be able to be viewed in a FlexViewer application?  This is the business need that I am looking for as a 3rd party GIS based program stores images in an Oracle BLOB field that certain endusers would like to view from an associated file that is exposed via a FlexViewer application.

I am looking to be able to perform this function without having to convert the BLOB data to another format as it seems that is creating redundant data.
0 Kudos