View columns

A view's columns come from its query. The Columns step of the view popup is where you review the list the query returns and set each column's domain, type, key flags, permissions and description. It is the third of the five view steps, after General and Query; for the whole flow, see Views.

Review the column list

  1. Open the view from the Warehouse tree. It opens in its own popup window.
  2. Open the Columns step.
  3. Check every column the query returns. The grid lists one row per column.
  4. Adjust what you need (see below), then click Apply in the popup footer.

There is no add or remove action on this step: the list follows the view's query. To change which columns a view returns, change the query on the Query step. A view with no columns yet shows "No columns defined."

The columns grid

CellWhat it holds
NameThe column name, as the query returns it. It is locked: a view does not rename its columns.
CommentThe column description. It is hidden by default; show it from the grid's column menu.
Data DomainThe business type. Choosing one sets Data Type; choose Custom to pick the type yourself.
Data TypeThe storage type. Editable only while Data Domain is Custom and the row is unlocked.
PII SourceThe source column the column's personal data comes from. The picker searches source columns with a PII domain; the default is None.
Permission GroupThe groups that can read this column. The admin group is always included and hidden.
MMandatory: whether this column is required.
PKPrimary Key: whether this column is part of the primary key.
PCPartition Column: whether this column is used for partitioning. It stays read-only.

The domain catalogue and the PII options are shared with table columns; see Define table columns.

Adjust a column

  1. Data Domain and Data Type. Open Data Domain and choose the business type; Data Type follows the domain. Choose Custom to clear Data Type and set the storage type yourself.
  2. PII Source. Choose the source column the column's personal data comes from, or leave None. The picker's search reads "Search PII source columns…".
  3. Permissions. In Permission Group, choose the groups that can read the column. The admin group stays in the list and cannot be removed, and a column takes up to 100 groups. See Warehouse permissions and row-level security.
  4. Description. On a user-defined column, click the message icon next to its name. The Column description popover opens (a column with no description opens straight in edit mode); type the description and click Save. Clear removes an existing description, and an empty one reads "No description provided." The description shows in the Comment column, hidden by default.

Save your column changes

Recalculate column types

The columns toolbar has one action, Recalculate Column Types. It reports Column Types Updated: "Column data types have been recalculated based on the current query."

Questions, answered

Why can't I rename a column in a view?

Column names are locked on the Columns step: a view does not rename its columns. To use other names, change the query on the Query step; the names follow the query.

Why can't I change a column's Data Type?

Data Type is editable only while Data Domain is Custom: pick a domain and its type follows, or choose Custom to set the type yourself. A locked row stays read-only whatever its domain.

Can I add or remove columns on this step?

No. The list follows the view's query, so the step has no add or remove actions. Change the query on the Query step to change which columns the view returns.

What does "Columns not validated" mean?

The view's query changed after it was last validated, so the step refuses to save your column changes with Columns not validated. Validate the query on the Query step, then apply your changes.

Why can't I edit some cells?

Some rows are locked. Hover the lock icon next to the row for the reason: "System columns cannot be edited." on a system column, "This row is locked and cannot be edited." on a locked row. On a locked row the editable cells go read-only; PC is read-only on every row.

Does the columns grid remember my layout?

No. Column order, width and visibility changes are not kept: the grid opens the same way each time, with the Comment column hidden by default.

What does Recalculate Column Types do?

It reports Column Types Updated: "Column data types have been recalculated based on the current query." If a type still looks wrong, check the Query step: the column list and its types follow the view's query.

What do M, PK and PC mean?

They are the three flag cells: M Mandatory (whether this column is required), PK Primary Key (whether this column is part of the primary key) and PC Partition Column (whether this column is used for partitioning). M and PK can be changed on an unlocked row; PC is read-only. The flags appear on Refreshing and Appending views; Standard and Parametrized views show the shorter grid without them.

Why can't I remove the admin group from a column?

You can't: the admin group has full access to every column by default. It stays in each column's permission list and is hidden from the picker. The rule is on the Permission Group header tooltip: "The admin group has full access to all columns by default."