Static table columns

The Columns step defines the fields of a Static table: their names, data types, key and flags, default values and the groups that can read them. It is the second step of the wizard, after General, and the table needs at least one of your own columns marked PK before it can be deployed.

The columns grid

The grid lists every column as a row. These are the cells you work with:

CellWhat it holds
NameThe column name.
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 while Data Domain is Custom.
PII DomainThe column's personal data tag.
PK / FK / M / CCThe flags, covered under Set the key and the flags.
Default ValueThe value used when none is given.
Permission GroupThe groups that can read this column.

For the rules shared by every Warehouse table, including locked cells and the full validation set, see The table columns grid and Define table columns. Data domains and PII have their own reference: Column data domains, defaults and PII.

Add and name a column

  1. Click Add new column. A row named New Column 1 appears, using the next free number.
  2. Click the name to edit it. A generated name clears itself so you can type straight away, and an empty cell shows Enter name....
  3. Press Enter or click away to keep the new name. Press Escape to drop the edit while the cell is still open.
  4. Watch for the red mark: a duplicate name (capital letters are ignored) or a name the system reserves fails the check, and hovering the mark shows Column name must be unique or This is a system reserved name.

Set the key and the flags

Four flag cells sit in the grid. Hover a header to see its full name.

FlagNameWhat it does
PKPrimary KeyWhether this column is part of the primary key.
FKForeign KeyReference to another table.
MMandatoryWhether this column is required.
CCComputed ColumnScript for calculated values.
Important

Plan the primary key before you save the step. Once you save a column with PK ticked, the flags freeze and no PK cell can be changed any more. To use a different key, drop the table first, then change the flags and deploy it again.

Set a default value

Describe a column

Give a column its permissions

Save the step

Questions, answered

Why is there a locked column named after my table?

Every static table starts with a generated key column named after the table, for example Countries Key. It is locked: you cannot rename or remove it. It is not the key you choose. Mark your own column or columns as PK for the table's primary key.

What do PK, FK, M and CC mean?

They are the four flags: PK Primary Key (whether this column is part of the primary key), FK Foreign Key (a reference to another table), M Mandatory (whether this column is required) and CC Computed Column (a script for calculated values). Hover a flag's header to see its full name.

How do I add a description to a column?

Click the message icon next to the column name, type into Column description and click Save. Clear removes an existing description. The icon shows on your own unlocked columns, and an empty description reads No description provided.

How do I write a default value for a column?

Wrap text values in single quotes, for example 'N/A'. Numbers and dates take raw values, and SQL expressions such as now64(3) are allowed. A text default is shown quoted in the grid while the text itself is stored.

What happens when I set a computed script on a column?

The column becomes a computed column, with its value produced by the script. Adding a script clears the row's FK, M and Default Value, those cells stay unavailable while the script exists, and the row cannot be marked PK.

What happens if a column name contains a dot?

A dot is allowed, but risky: SQL reads a name such as a.b as a table and column pair. When you commit the name, the warning Dot in column name appears with the text "Dots are risky in column names - Consider renaming. SQL reads them as table.column." The warning is advisory and never blocks the save. If the dotted name is saved, the confirmation carries the note that it is tricky and usually better avoided, and the saved name can no longer be renamed back.

How do I undo a column change I just made?

While a name is still open for editing, press Escape to drop it. For anything already committed to the grid, click Revert in the footer: it drops every change made since the last save and reports Changes Reverted and "All changes in the columns tab have been reset." After a save, edit the cell again to set the value back.

Is there a limit on how many permission groups a column can have?

Yes, a column takes up to 100 permission groups. You do not add the admin group: it always has full access to all columns.