Skip to Content

Spatial Join, cardinality error

Hello All,

I'm on SAP HANA SPS09 and I want to make a simple Spatial Join. To do so I followed this tutorial :SAP HANA Academy - Modeling: Geospatial Joins [SPS09] - YouTube

When I want to activate I got this error :

Got unknown attribute 'cardinality'(cubeSchema -> calculationScenario (dummy.******/geo_location) -> calculationViews -> spatialJoin (Join_1))

In fact when I want to create this SpatialJoin, the cardinality is mandatory, however, in the video (around 5 minutes), the cardinality is blank !

Here is my CalculationView :

<?xml version="1.0" encoding="utf-8"?>
<cubeSchema defaultLanguage="EN" defaultSchema="_SYS_BIC" operation="createCalculationScenario" version="3">
    <calculationScenario name="dummy.******/geo_location" externalScenarioName="dummy.******::geo_location" schema="_SYS_BIC">
        <dataSources>
            <tableDataSource name="GEO_CURRENT_LOCATION" schema="ZGEO" table="GEO_CURRENT_LOCATION">
                <attributes>
                    <allAttribute />
                </attributes>
            </tableDataSource>
            <tableDataSource name="GEO_LOCALISATION" schema="ZGEO" table="GEO_LOCALISATION">
                <attributes>
                    <allAttribute />
                </attributes>
            </tableDataSource>
        </dataSources>
        <calculationViews>
            <spatialJoin name="Join_1" cardinality="1:1">
                <debugInfo nodeName="Join_1" />
                <viewAttributes>
                    <viewAttribute ignoreFromInputsFlag="false" isVisible="true" name="SHAPE" />
                    <viewAttribute ignoreFromInputsFlag="false" isVisible="true" name="CITY" />
                    <viewAttribute ignoreFromInputsFlag="false" isVisible="true" name="JOIN$SHAPE$POINT" />
                </viewAttributes>
                <inputs>
                    <input name="GEO_CURRENT_LOCATION">
                        <mapping source="SHAPE" target="SHAPE" />
                        <mapping source="SHAPE" target="JOIN$SHAPE$POINT" />
                    </input>
                    <input name="GEO_LOCALISATION">
                        <mapping source="CITY" target="CITY" />
                        <mapping source="POINT" target="JOIN$SHAPE$POINT" />
                    </input>
                </inputs>
                <joinAttributes>
                    <joinAttribute name="JOIN$SHAPE$POINT" predicate="CONTAINS" evaluatesTo="true" />
                </joinAttributes>
            </spatialJoin>
            <projection name="finalProjection" defaultViewFlag="true">
                <debugInfo nodeName="Projection" />
                <inputs>
                    <input name="Join_1">
                        <mapping source="CITY" target="CITY" />
                    </input>
                </inputs>
                <viewAttributes>
                    <viewAttribute name="CITY" />
                </viewAttributes>
            </projection>
        </calculationViews>
        <variables>
            <variable name="$$language$$" typeMask="512" isGlobal="true" usage="optional" />
            <variable name="$$client$$" typeMask="512" isGlobal="true" usage="optional" />
        </variables>
    </calculationScenario>
</cubeSchema>

I tried to delete the cardinality attribute, but Eclipse do not want me to activate (No authorization !).

What is the problem, I believe that I do the right thing... but obviously I miss something !

Kind Regards,

Joseph

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Best Answer
    Apr 01, 2016 at 08:54 AM

    I found a Woraround.

    1. Edit the view with the text editor

    2. detele the attribute cardinality=""

    3. Grand role to _SYS_ to be able to activate the view.

    And it works 😊

    But after each modification on the view, you should modify the cardinality attribute.

    Regards

    Add comment
    10|10000 characters needed characters exceeded