- The live HANA system must be at least on SPS11 on 112.07 or higher or SPS12 on 122.03 or higher.
- Your HANA system must be licensed for SAP HANA Spatial.
- The HANA system must be configured with a valid Spatial Reference Identifier (SRID) used by SAP Analytics Cloud.
To add Spatial Reference Identifier (SRID) 3857:
In the SAP HANA Studio console, run the following query:
Prepare Location Data from HANA Studio:
1. Identify the fact table that contains your latitude and longitude data. Open your calculation view in HANA Studio and check the name of the table under Aggregation.
2. Select a column that will be the unique identifier for each distinct location. This identifier will be referred to as Location Identifier in SAP Analytics Cloud. In this example, the Location Identifier is Country. Set Country as a key column in the calculation view.
3. Create a Location Data table. This table should contain two columns:
- Location Data identifier: ID column values from the Location Identifier column of your calculation view.
- Spatial data column: containing spatial data (for example ST_GEOMETRY) generated from your latitude and longitude data with SRID 3857.
Once the table is created set the Location Data identifier column as a primary key.
4. Install and configure the Spatial Data Delivery Unit for SAP Analytics Cloud (see the SAP Note 2395407)
- Create a specific package (SAP_BOC_SPATIAL) to create your Calculation View containing location information.
5. Create a calculation view of type Dimension based on the Location Data. This view is referred to as Location Data view and should be created under Content > SAP_BOC_SPATIAL
6. Once the calculation view is created, drag the Location Data table to the Projection
7. Project the columns from the Location Data table to the Location Data view and set the Location Data Identifier column as a key column. In this example, it is Country_LD.
8. Select the Projection node, then double-click each column in the Details pane to make it display in the Output Select the Location Identifier column, then set the Key to True in the Properties pane.
9. Save and activate the calculation view.
10. Right click on the Calculation View and select Data Preview.
Now we have created Location Dimension in HANA. In the next blog series, we will see how to consume these dimensions in SAP Analytics Cloud.