MicroStrategy ONE

Freeform SQL Editor: Mapping pane

In the Freeform SQL Editor, the lower part of the right pane is the Mapping pane, where you map the columns in the SQL statement to objects in the MicroStrategy environment. The Mapping pane is composed of the following:

  • Column: This column displays a number that serves as the index for each column in the SQL statement to which the MicroStrategy object is mapped. Columns are numbered sequentially.

  • Object: This column displays the name of the MicroStrategy object that is mapped to the column in the SQL statement. An icon preceding the object indicates the object type, whether it is an attribute image\ebx_469412619.gif or a metric image\ebx_966386261.gif.

  • Form: This column only applies to attributes. It displays a drop-down list of attribute forms, for example, ID and DESC.

    Every attribute must map a column for its ID form.

  • Type: This column indicates the form format type for an attribute form, such as Text and Number. If the attribute form is mapped to an existing one in the project, the Type inherits the format of the existing attribute form.

    • For a new attribute form ID, the Type is set to Number by default.

    • For a new attribute form DESC and other forms, the Type is set to Text by default.

    • For a metric, whether new or not, the Type is set to Number by default.

  • Data type: This column is displayed only when the Show Column Data Type option is selected from the View menu. You can use the drop-down list to change the data type, for example, Integer, VarChar, Double, Float, and so on.

  • Precision/Length: This column is displayed only when the Show Column Data Type option is selected from the View menu. Precision indicates the number of digits used to express the fractional part of a number.

  • Scale: This column is displayed only when the Show Column Data Type option is selected from the View menu. Scale designates the position of the decimal point in a fixed or floating point number.

  • When mapping the columns, it is important that you follow the same sequence of the columns as they appear in the SQL statement. Doing otherwise will cause the report to fail.

  • Make sure that the number of mappings is the same as the number of columns in the SQL statement. For example, if your SQL statement lists 10 columns from which to retrieve data, you should map for exactly these 10 objects (including attributes and metrics).

When you right-click in the Mapping pane or use options from the Edit and Mapping menus, you can perform the following functions. Click the links to get more information.

  • Add New Attribute Form: adds a new attribute form to the Mapping pane

  • Add New Metric: adds a new metric to the Mapping pane

  • Insert: adds an object to the Mapping pane

  • Replace: replaces an object in the Mapping pane with an existing object

  • Move up: moves the selected object up one row in the Mapping pane

  • Move down: moves the selected object down one row in the Mapping pane

  • Remove: deletes the row for the selected object from the Mapping pane

  • Rename: allows you to use a different name for the selected object in the Mapping pane