|Data Access / Supported Data Sources|
Spectrum Spatial supports SAP HANA as a read-write data source.
The SAP HANA data source data provider follows the same rules as the JDBC data source provider when mapping a non-spatial JDBC type to Spectrum Spatial’s type system.
The SAP HANA data types ST_GEOMETRY and ST_POINT are the spatial data equivalent to Spectrum Spatial's supported data types: Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon, and GeometryCollection.
Determining the spatial metadata is done in several steps. The first step looks at the MAPINFO_MAPCATALOG table in the MAPINFO schema and if an entry exists identifies the geometry column in the table. If the table is identified as being an X/Y table then the two columns identified as the X and Y columns will be “fused” together into a geometry column in the Spatial table with the coordinate system specified in the MAPINFO_MAPCATALOG. If the MAPINFO_MAPCATALOG does not exists or the table to be opened does not have an entry then the USER_SDO_GEOM_METADATA is consulted for the name of the spatial column and its SRID.
Data upload for SAP HANA is done through native HANA functionality, such as an IMPORT statement. Typically, you use the import statement with a CSV, and use the OGC Well-Known Text representation of the geometry.
To create a table in SAP HANA with a spatial column, follow this example:
create column table "MySchema"."MyTable" ( "MyColumn1" VARCHAR(50), "MyColumn2" INTEGER, "GEOM" ST_GEOMETRY(4326))
The parameter to the ST_GEOMETRY column is the SRID of the coordinate system for the spatial column. See Coordinate System Support for more information.
To access SAP HANA data from Spectrum Spatial, create a named connection using Spatial Manager. The SAP HANA JDBC driver is provided. Follow this syntax:
The port should be 3<instance number>15, for example, 30015, if the instance is 00.
For example jdbc:sap://hanaServer:30015
Once the named connection is created, you can create named tables that use it. You use SAP HANA named tables as you would any other data provider named tables.
Spectrum Spatial does not require a MAPINFO_MapCatalog for SAP HANA data access, except in the case of a view. Spectrum Spatial reads the coordinate system information for the view from the MAPINFO_MapCatalog. This is not necessary for regular tables.
Spectrum Spatial follows the same rules as the JDBC data source provider in determining whether a column is read-only. It marks auto-increment columns as read-only as well.
SAP HANA supports the same non-spatial functions and operators as the JDBC data source provider data source provider.
SAP HANA does not support all functions when the data is in round earth coordinate systems. We recommend that the data be stored in SAP HANA as WGS84 Planar (SRID 1000004326). This maximizes the amount of queries Spectrum Spatial can push to SAP HANA. Geometry join supports only the following functions when data is in round earth coordinate systems:
For more information see the appendix Delegation to Data Source Providers.
For SAP HANA, volatility is any change to the table's schema, such as adding or dropping a column or changing an index on a column. If it has changed, Spectrum Spatial will flush the metadata about the table from the cache and reload it before proceeding with the data access operation. See Data Source Volatility for more information.
SAP HANA tables can be accessed as XY tables. See XY Table Support.
SAP HANA supports three spatial reference systems out of the box:
To add other spatial reference systems, see section 4.1: Create Spatial Reference System Statement in the SAP HANA Spatial Reference.