creating mdx and rsql queries

Upload: priyanka-garg

Post on 03-Apr-2018

229 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/29/2019 Creating MDX and RSQL Queries

    1/13

    Creating MDX and RSQL Queries

    Purpose

    This tutorial covers how to create and test MDX and RSQL queries.

    Time to Complete

    Approximately 30 minutes.

    Overview

    MDX (Multidimensional Expressions) queries use standard MDX and Integrated Operational Planning extensions toquery multidimensional cubes. MDX queries return subsets of the base data or scenario data in the IntegratedOperational Planning database.

    RSQL (Rowsource Structured Query Language) queries use SQL to return row source data. Row source data istransactional, component-level data (for example, sales order details) that is loaded into relational database tables.

    After creating a query, you can preview it to confirm that it returns the expected results. A syntax check is performedand errors are reported. You preview query results against base data in Integrated Operational Planning or scenariodata.

    Scenario

    In this example, you create and test a MDX query to view actual and planned demand unit numbers. You also createand test an RSQL query to view the Product row source for product family pricing.

    Software and Hardware Requirements

    The following is a list of software requirements:

    Integrated Operational Planning 4.0.1

    Java Development Kit JDK 1.6.0_12 or later

    Microsoft Internet Explorer 6.x or 7.x

    Oracle 10.2.0.4 or 11.1.0.7 database

    Prerequisites

    Before starting this tutorial, you should:

    . Load the Integrated Operational Planning model.

    . Start the Integrated Operational Planning server.

    . Define Integrated Operational Planning dimensions, row sources, and cubes.

    Creating and Testing MDX Queries

    To create and test a query, perform the following steps:

    1. Log on to Integrated Operational Planning as the administrator.

  • 7/29/2019 Creating MDX and RSQL Queries

    2/13

    2. From Planning Workbench, click the Administration Workbench link.

    3. Select the Model Designer tab.

  • 7/29/2019 Creating MDX and RSQL Queries

    3/13

    4. Select the Queries tab.

    5. Click Add to display the Create Query page.

    6. In the Name box, enter the name of the query. In this example, enter named units_report_query.

    7. From the Type drop-down list, select MDX.

  • 7/29/2019 Creating MDX and RSQL Queries

    4/13

    8. From the Owner drop-down list, select admin. In this example, the query is owned by the administrator.

    9. In Description, enter a description to identify the query. In this example, you use this query to view actual and planned demnumbers.

  • 7/29/2019 Creating MDX and RSQL Queries

    5/13

    10. In the Definition box, enter the syntax for the query.

    When you write MDX queries, keep the following in mind:

    A comma is required after an ON COLUMNS statement only if it is followed by an ON ROWS statement.

    You can place line breaks between keywords; however, do not place line breaks inside dimension member names.

    A Parameter(...) statement is required in an MDX query for each filter menu in a report worksheet.

    11. Click Preview and from the drop-down list, select Preview against Base Data to display the browser preview page. If no equery runs and a table of results is displayed.

  • 7/29/2019 Creating MDX and RSQL Queries

    6/13

    When you preview MDX queries, keep the following in mind:

    Depending on the query, it may take time to retrieve results from the Integrated Operational Planning database. Keep thewindow open until the query finishes running.

    MDX queries pause during preview whenever a Parameter(...) statement is encountered in the query definition. A dialog prompting you to enter a value for the parameter. Enter a value and click OK.

    Note: If you select Preview against Scenario and no scenarios appear in the drop-down list, no scenarios exist in the "In "Submitted" states.

    The browser preview page is displayed. In this example, the expected results are returned and there are no errors.

  • 7/29/2019 Creating MDX and RSQL Queries

    7/13

    12. Return to the Create Query page, and click OK.

    The MDX query is saved to the model.

    Note: Be sure to republish the model before allowing your end users to work with it.

    Creating and Testing RSQL Queries

    To create and test a RSQL query, perform the following steps:

    1. Log on to Integrated Operational Planning as the administrator

  • 7/29/2019 Creating MDX and RSQL Queries

    8/13

    2. From Planning Workbench, click the Administration Workbench link.

    3. Select the Model Designer tab.

  • 7/29/2019 Creating MDX and RSQL Queries

    9/13

    4. Select the Queries tab.

    5. Click Add to display the Create Query page.

    6. In the Name box, enter the name of the query.

    7. From the Type drop-down list, select RSQL.

  • 7/29/2019 Creating MDX and RSQL Queries

    10/13

    8. From the Owner drop-down list, select a query owner. In this example, select admin because the query is owned by the

    administrator.

    9. Enter a description to identify the query. In this example, you use this query to view product pricing details.

  • 7/29/2019 Creating MDX and RSQL Queries

    11/13

    10. In Definition, enter the syntax for the query.

    When you write RSQL queries, keep the following guidelines in mind:

    A comma is required after an ON COLUMNS statement only if it is followed by an ON ROWS statement.

    You can place line breaks between keywords; however, do not place line breaks inside dimension member names.

    The row source name is case sensitive.

    11. Click Preview and from the drop-down list, select Preview against Base Data to display the browser preview page. If noerrors exist, the query runs and a table of results is displayed.

    When you preview RSQL queries, keep the following guidelines in mind:

    Depending on the query, it may take time to retrieve results from the Integrated Operational Planning database. Keepthe preview window open until the query finishes running.

    RSQL queries pause during preview each time the variable ? is encountered in the query definition. You are prompted

  • 7/29/2019 Creating MDX and RSQL Queries

    12/13

    to enter a value to substitute for the ? variable. Enter a value and click OK.

    Note: If you select Preview against Scenario and no scenarios are displayed in the drop-down list, no scenarios exist inthe In Progress or Submitted states.

    The browser preview page is displayed. In this example, the expected results are returned and there are no errors.

    12. Return to the Create Query page, and click OK.

  • 7/29/2019 Creating MDX and RSQL Queries

    13/13

    The RSQL query is saved to the model.

    Note: Be sure to republish the model before allowing your end users to work with it.

    Summary

    In this tutorial, you learned how to create and test MDX and RSQL queries.