Wednesday, 29 June 2016

How to use Geokettle to load shapefiles into oracle spatial


I'm looking for an example how to load a shapefile from the file system into an oracle spatial database.



What I have so far is:



  • I load the shapefile with the 'Shapefile File input' step

  • I use the calculator step to transform the WKT from the shapefile into a Geometry

  • I use the Table output to write the data into the database.


I get an error from the Table output step which says 'Error setting value #6 [GEOM Geometry] on prepared statement (Geometry), java.sql.SQLException: invalid datatype


The target column is of type SDO_GEOMETRY.


Thanks D3



Answer




To load a shapefile into an oracle database just a 'Shapefile input' and an 'Table output' is required, Geokettle handles everything internally


In the shapefile input You define the shapefile and in the output You map the geometry of the shape file (GeoKettle identifies the geometry for You) to the corresponding db-column.


To see an example You may copy the following XML and paste it into the graphical area of a transformation.






Shapefile File Input
GISFileInput


Y
1

none


D:\GIS\data\Admin Deutschland\DEU_adm3.shp
N

0

N


N



186
263
Y





Table output
TableOutput

Y
1


none


local oracle

SHAPES

1000
N
N
Y

N
N

N
Y
N

Y
N




GEOM
the_geom


ID
ID_3





383
261
Y






Shapefile File InputTable outputY




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...