Skip to main content
Pentaho Documentation

Create Queries With Metadata Query Editor

You must be in the Metadata Data Source Editor window to follow this process. You should also have established and tested a metadata data source connection.

Follow this process to design a metadata query:

  1. With all of your metadata data source options properly typed in, click the pencil icon above the upper right corner of the Query field. The Query Editor window opens. If the pencil icon is greyed out, then your data source is misconfigured.
  2. Select a data set from the Business Models drop-down box in the upper left. The list of available tables and columns will update appropriately.
  3. Double-click a table to display its columns.
  4. Click on a column that you want to select, then click the arrow next to the Selected Columns box. You can select multiple columns by holding down the Ctrl key while clicking on columns.
    Note:
    To define a parameter, use curly brackets as in, {Parameter Name}, to specify the parameter name. The parameter name must reference the parameter you created in your report. The Default value column is used to preview data in the Metadata Data Source Editor, only. To specify, multiple values for a parameter use a "|" (pipe) between your values as shown in the example below.

    File:/rd_parameters_in_query_editor.png

  5. Repeat this process for the columns you want to create conditions for by moving a column over to the Conditions box. Condition values must be in double quotes in order to validate in Metadata Query Editor.
  6. Repeat the above process for the column you want to order your results by by moving a column into the Order By box.
  7. Click OK to finalize the query. You will return to the data source configuration window. Your newly formed query should appear in the Query field. This field is editable, so you can modify the query before continuing.
  8. Click OK to close the Metadata Data Source Editor.
You now have a data source and at least one query that will return a data set that you can use for reporting.