Skip to Content
Technical Articles
Author's profile photo Prathibha Vadugu

Input parameters in Data Warehouse Cloud

Here is the summary of what is covered in this article:

  • What is input parameter and how to define it in SAP Data Warehouse Cloud.
  • Create a view with input parameter in SAP Data Warehouse Cloud.
  • Consume the view with input parameter in SAP Analytics Cloud.
  • How to use view with input parameter in another view of SAP Data Warehouse Cloud.

What is input parameter?

Input parameter is a run time parameter to generalize a model and customize the result of the model.

In SAP Data Warehouse Cloud View, input parameter can be created. This input parameter can be used in Filters, Calculations or Aggregations. This view with input parameter can be consumed in SAP Analytics Cloud Story.

Create a view with input parameter in SAP Data Warehouse Cloud

In graphical view, input parameter can be created with below steps.

  • Login to SAP Data Warehouse Cloud.
  • Navigate to Data Builder.
  • Create a new Graphical View of type Analytical Dataset.
  • Add table(s)/view(s). I have added a view with Product Class and corresponding Sales Data.

                            

  • In the View Properties, select input parameters. Add input parameter and specify the name and data type. In our example, an input parameter for Sales is created.

                         

  • Result data of our model can be customized using the input parameter created. In our example, a filter is added for the view with the above input parameter.

                 

  • To verify the impact of input parameter on the view, check the preview of the view. Enter the input parameter value when prompted.

                               

  • Data preview of the view shows the filtered data as per the user input. In this case, preview shows all data where Sales > 43000.00 .

                                 

  • Deploy the view.

Similarly input parameter can be created in SQL View and SQL Script View.

 

Consume the view with input parameter in SAP Analytics Cloud

  • To consume this view in story, navigate to Story builder.
  • Create a new Story with the above view.
  • Enter the value for input parameter when prompted. The chart data is shown as per the user input parameter.

                             

  • The input parameter can be set only for the chart or for the entire story by clicking on { } in the top left corner of the chart.

                         

How to use view with input parameter in another view of SAP Data Warehouse Cloud

  • In Graphical View, when a view with input parameters (source view) is used in another view (target view), a prompt is shown to user. User can choose one of the below options.
  • Set the value of parameter. The value of the parameter is set to this value and no parameter is added to the target view.
  • Map the value to a parameter. If this option is chosen, then automatically a new input parameter is added to the target view.

                         

  • In case of SQL View, user needs to manually add the input parameters in the target view. Here is an example query. In this example CATEGORY_IP is the input parameter.
SELECT "Category","City","Country","SAles Revenue","Year" FROM "BRCRetail" WHERE "Category" = :CATEGORY_IP

 

  • In case of SQL Script View, user needs to manually add the input parameters in the target view. Here is an example script. In this example CATEGORY_IP is the input parameter mapped to input parameter PARAM_1.
return SELECT "Category", "City", "Sales Revenue" from "BRCRetail"(CATEGORY_IP=>:PARAM_1);

 

Now that you know about input parameters in SAP Data Warehouse Cloud and using it in SAP Analytics Cloud Story, how about discovering more about SAP Data Warehouse Cloud? Explore our community topic page to learn more.

 

Assigned tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.