MicroStrategy ONE

Mapping geo attributes

The ESRI configuration file, mapConfig.xml, contains the information used to map ESRI geo attributes to the corresponding attributes in the MicroStrategy metadata. Mapping is required only if you want to display areas on your map on a local server.

ESRI attributes such as latitude and longitude, zip code, state, city, province, and district are referred to as geo attributes. ESRI geo attributes are mapped to related attributes in the MicroStrategy metadata. The report grid the ESRI Map visualization is applied to must contain at least one ESRI geo attribute mapped to a MicroStrategy attribute. It can contain any number of other MicroStrategy attributes that are not mapped to ESRI geo attributes, including attributes that are not geographically based. You can also fetch additional ESRI fields that are not directly used for mapping and display them in a custom Information Window. ESRI uses the information in the mapConfig.xmlfile to construct SQL statements to query the ESRI database and retrieve a map.

For each geo attribute you map, you must provide the following information in mapConfig.xml in your plug-in.

All of the information is specified in elements nested under the <pjs> element in mapConfig.xml, as described below.

MicroStrategy project containing the MicroStrategy attribute to be mapped

Specify a valid GUID for the parent MicroStrategy project containing the attribute that will be mapped to the ESRI geo attribute. Use this GUID as the value of the id attribute of the <pj> element.

For example: <pj "id=B19DEDCC11D4E0EFC000EB9495D0F44"> 

Identifier for the MicroStrategy attribute to be mapped

This value identifies the MicroStrategy attribute that will be used in the WHERE clause (to the right of the equal sign) in the SQL statement that fetches data from the ESRI database.

  • Specify a valid GUID for the MicroStrategy attribute (in the parent MicroStrategy project) that will be mapped to the ESRI geo attribute. Use this GUID as the value of the id attribute of the <at> element.

    For example: <at "id=54BABC8311D59D57C000B28A4CC5F24F">

  • This GUID is used to obtain the value of the MicroStrategy attribute that will be used in the WHERE clause (to the right of the equal sign) in the SQL statement that fetches data from the ESRI database, as shown in the sample below:

    WHERE STATE_NAME =CUSTOMER_STATE

ESRI map layer containing the ESRI geo attributes

This value is used to construct the FROM clause in the SQL statement that fetches data from the ESRI database.

  • Specify a valid URL path to a specific map layer of the ESRI base map that will provide data to the ESRI Map visualization. Use this as the value of the <ml> element. For example, the URL for the map service in the default configuration file looks like the sample below:

    <ml> http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/5 </ml>

    The URL for a map service on a local ArcGIS Server might look like the following:

    <ml> http://arcgis.myCompany.com/ArcGIS/rest/services/simple/MapServer/0 </ml>

  • This value is used to construct the FROM clause in the SQL statement that fetches data from the ESRI database, as shown in the sample below.

    FROM http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/5

Fields (ESRI geo attributes) in the ESRI map layer

These values are used to construct the SELECT clause in the SQL statement that fetches data from the ESRI database.

Specify one or more valid field names/geo attributes (the entire list of field names enclosed in brackets, with each individual field name enclosed in single quotes and separated by commas) in the ESRI database table specified by the <ml> element. Use these as the values of the <qf> element.

For example <qf>['STATE_NAME','POP2008'] </qf>

These values are used to construct the SELECT clause in the SQL statement that fetches data from the ESRI database, as shown in the sample below.

SELECT STATE_NAME,POP2008

Specific field (ESRI geo attribute) to be mapped

This value is used to construct the WHERE clause (the value following WHERE and to the left of the equal sign) in the SQL statement that fetches data from the ESRI database, as shown in the sample below.

WHERE STATE_NAME = CUSTOMER_STATE

Specify a single valid field name/geo attribute (enclosed in single quotes) in the ESRI database table specified by the <ml> element. Use this as the value of the <ea> element.

For example: <ea> STATE_NAME </ea>

For example, if you want to map a zip code attribute in the MicroStrategy metadata to a zip code map layer in the ESRI server and fetch data for 2012, add code similar to the code shown in bold below.

 

<ec>

<bms>

<bm key="default">http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer</bm>

</bms>

<pjs>

<pj id="B19DEDCC11D4E0EFC000EB9495D0F44F">

...

<at id="54BABD9E11D59D57C000B28A4CC5F24F">

<ml>http://arcgis.myCompany.com/ArcGIS/rest/services/simple/MapServer/0</ml>

<qf>['ZIP','POP2012']</qf>

<ea>ZIP</ea>

</at>

</pj>

</pjs>

<apps>

</apps>

<webmaps>

<webmap id="5fac74d8e7924e169afdc01105235324" default="false" />

</webmaps>

</ec>

Assuming that a MicroStrategy geo attribute called CUSTOMER_ZIP was mapped to an ESRI geo attribute called ZIP, the modified configuration file shown above produces the following SQL statement:

SELECT ZIP,POP2012

FROM http://arcgis.myCompany.com/ArcGIS/rest/services/simple/MapServer/0

WHERE ZIP = CUSTOMER_ZIP

See ESRI Configuration File for a description of the elements and attributes in mapConfig.xml file.