Specifying fields and conditions for a visual query

In the Fields section of the Query Builder editor, you can select the columns that you want to include in the query result set and specify the sort and row conditions for the query results.

About this task

To specify table fields in the Query Builder editor:


  1. Expand the Fields section on the Build tab.
    Note: All columns of all the tables that are selected for the query are automatically included in the query results column table. The <All columns> entry displays when all table columns are included in the query.
    • To display particular columns in the query results, you can select or clear the corresponding check boxes.
    • To add individual columns to the query results, drag a column from one of the tables in the Tables section to a particular row in the query results table in the Fields section.
  2. To specify particular columns to a query, see the Specifying columns for query results topic.
  3. For each column that you included in the column table, you can apply sort and row conditions in the corresponding table fields. Click one of the cells in the column to specify a value for one or more of the following columns:
    Table 1. Columns and available actions
    Column Name Action
    Table The column specifies the name of the table that includes the current column.
    Column Name The column specifies the name of the current column.
    Tip: Double-click the Column Name cell, and then click the down arrow. All column names from the current tables are listed. You can select another column name to replace the current column or remove it.
    Column Type The column displays the type of data that the current column contains.
    Display Name The column specifies the name that is used as the column header in the query results.
    Aggregation The column specifies the type of aggregation that is applied to the column. Double-click the Aggregation cell, and click the down arrow.
    Sort Order The column specifies whether this column is used to sort the rows in the query results. Double-click the Sort Order cell, click the down arrow, and select the sorting.
    Sort Sequence The column specifies the sort order sequence for the column. The column with the lowest number is sorted first.
    Conditions The column specifies a condition that must be met for a row of data to be included in the query results. The condition that you specify in this column applies to the column value. For example, if you had a column that is called Number and you entered a row condition of > 10, the only rows of data that are included in the query results are those rows that have a value greater than 10 in the Number column. Type the row conditions that you want to apply to each column.
  4. To specify whether to add duplicate rows to the query results, select the Include duplicate rows check box.
  5. To view the index information of the tables added to the Tables section, click Show Indexes.
    Index information of the of the tables added to the Tables section is displayed. To hide the index information, click the Hide Indexes button.
    Note: For the Hive and Spark data sources, the Show Indexes button is not displayed in the Query Builder editor because these data sources do not support indexes.