Restricting columns in datasets based on SQL query

You can restrict which columns are included in a dataset by modifying the SQL query to select only the required fields.

To include only specific columns in a SQL-defined dataset, list them in the query’s SELECT clause. This limits the fields available for analysis.

  1. Switch to Data Model interface.
  2. Click Show Data to review the columns returned by the current query.
  3. Identify the columns you want to include in the dataset.
  4. Switch back to Dataset Detail interface, and update SQL query by editing the SELECT statement.
    For example:
    select cereal_name, calories from cereals

    In this example, only the cereal_name and calories fields are kept in the dataset.

  5. Click Save.
  6. Switch back to the Data Model interface, click Show Data, and verify that only the selected columns appear.

    In this example, the dataset only contains cereal_name and calories.