Skip to main content
Question

How to export raster to Oracle as BLOB

  • November 10, 2014
  • 7 replies
  • 26 views

Hi everyone, i have two raster files (.GRC, .GRD formats). I need to export these files to Oracle as BLOB. Can anyone please explain how to do this. Thanks in advance.

7 replies

fmelizard
Contributor
Forum|alt.badge.img+17
  • Contributor
  • November 10, 2014
Hi,

 

Have a look at the following link:

 

http://fmepedia.safe.com/articles/How_To/How-to-read-the-contents-of-a-file-into-a-database-BLOB-attribute

  • Author
  • November 10, 2014
Hi Itay,

 

 

Thanks for the reply. I have created and executed the work bench as mentioned in the link specified by you. But getting the following error.

 

Execution of statement `CREATE TABLE "GRD" ("TEST" BLOB,"RAST" MDSYS.SDO_GEORASTER)' did not succeed; error was `ORA-00902: invalid datatype'. (serverType=`ORACLE8I', serverName=`DEVVERDB', userName=`CONGOB', password=`***', dbname=`')

 

 

Oracle Writer: Translation aborted -- rerun specifying "ORACLERASTER_1_START_TRANSACTION 0"

fmelizard
Contributor
Forum|alt.badge.img+17
  • Contributor
  • November 10, 2014
which writer are you using?

  • Author
  • November 10, 2014
Hi Itay,

 

 

It's the problem with the oracle schema. Now i can able to import some of files to Oracle successfully. Thank you. For some files i'm getting the follwoing error in work bench. I'm using the writer "Oracle Spatial GeoRaster".

 

Oracle writer: This format cannot support multiple palettes. Consider splitting the raster's bands into several bands with one palette each, or several single band rasters with one palette each. Alternatively, remove all but one palette

Forum|alt.badge.img+5
  • December 17, 2015
bobby wrote:
Hi Itay,

 

 

It's the problem with the oracle schema. Now i can able to import some of files to Oracle successfully. Thank you. For some files i'm getting the follwoing error in work bench. I'm using the writer "Oracle Spatial GeoRaster".

 

Oracle writer: This format cannot support multiple palettes. Consider splitting the raster's bands into several bands with one palette each, or several single band rasters with one palette each. Alternatively, remove all but one palette

What is your writer ?


mark2atsafe
Safer
Forum|alt.badge.img+43
  • Safer
  • December 17, 2015

If you want to actually write the data as raster (ie to Oracle Spatial GeoRaster) then just set up the translation directly to that format. No transformers necessary.

The example provided is only needed if you want to write the raster to a blob file in an Oracle non-spatial database (or non-raster Oracle Spatial)


erik_jan
Contributor
Forum|alt.badge.img+17
  • Contributor
  • December 17, 2015

To write raster to an Oracle database your database needs to have SDO_GEORASTER installed (part of Oracle Spatial). To check this use the command "desc MDSYS.SDO_GEORASTER" in SQL*Plus. It should respond with a description of the SDO_GEORASTER object definition:

Name Null? Type

----------------------------------------- -------- ----------------------------

RASTERTYPE NUMBER

SPATIALEXTENT MDSYS.SDO_GEOMETRY

RASTERDATATABLE VARCHAR2(32)

RASTERID NUMBER

METADATA SYS.XMLTYPE


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings