EducationSoftwareStrategy.com
StrategyCommunity

Knowledge Base

Product

Community

Knowledge Base

TopicsBrowse ArticlesDeveloper Zone

Product

Download SoftwareProduct DocumentationSecurity Hub

Education

Tutorial VideosSolution GalleryEducation courses

Community

GuidelinesGrandmastersEvents
x_social-icon_white.svglinkedin_social-icon_white.svg
Strategy logoCommunity

© Strategy Inc. All Rights Reserved.

LegalTerms of UsePrivacy Policy
  1. Home
  2. Topics

KB483483: How to use SAP HANA spatial functions in MicroStrategy


Community Admin

• Strategy


This article details how to use SAP HANA spatial functions in MicroStrategy.

Currently, Strategy does not provide spatial functions; however, you can use spatial functions supported by SAP HANA by adding them to your Warehouse Catalog and modeling them in Architect.
When you add these tables, each column in the SAP HANA table will have a corresponding attribute created.

ka04W000001IwzDQAS_0EM2R000000lK0y.jpeg

SAP HANA spatial functions can be divided into two groups, those supported by Strategy, and those that are not.
 

  • Supported Strategy data types: Functions that return intEger, DOUBLE, or VARCHAR. After modeling tables in Architect, any created attributes can be used in reports or called using freeform SQL.

For example, you want to display Region Name and Area on a report using the following table: 

ka04W000001IwzDQAS_0EM2R000000lK1D.jpeg

These attributes can be used in a report or used to create a freeform SQL report using the following statement: 

ka04W000001IwzDQAS_0EM2R000000lK1I.jpeg

 

  • Unsupported Strategy data types: Functions that return the SL_Geospatial data type. This data type is identified as Reserved. These functions can be called form SAP HANA using freeform SQL or by creating custom metrics and filters using the Apply() function.
ka04W000001IwzDQAS_0EM2R000000lK1h.jpeg

For example, you want to display Region Name and Area on a report using the following table: 

ka04W000001IwzDQAS_0EM2R000000lK1w.jpeg

The Regions table contains Region Name and Region Shape. Region Area can be calculated from the Region Shape by applying the ST_AREA spatial function. You can do this in one of two ways: 

  • Create a freeform SQL report using the following statement:
ka04W000001IwzDQAS_0EM2R000000lK2G.jpeg
  • Create a metric using the ApplySimple() function, where you can insert database specific functions and simple operators into the SQL.
ka04W000001IwzDQAS_0EM2R000000lK2Q.jpeg


Another example would be if you want to display Region Name and Area for the regions in which Region Shape and Region Shape 2 are equal on a report using the following table: 

ka04W000001IwzDQAS_0EM2R000000lK2k.jpeg

Region Shape and Region Shape 2 are ST_Geospatial objects, so they are not supported; however, you can use them in a filter. The computations are performed on the SAP HANA side. 

ka04W000001IwzDQAS_0EM2R000000lK2p.jpeg

 


Comment

0 comments

Details

Knowledge Article

Published:

July 11, 2019

Last Updated:

September 22, 2022