Details on Select Key Columns


This dialog is used to define key columns for a data table in an analysis. It looks slightly different depending on from where you open it, but the functionality is the same.

Key columns are used when you need to uniquely identify all rows in the data table. You should specify key columns if you want to be able to reapply markings in unaggregated visualizations that were active when saving the file, if you want any specified tags or bookmarks to be able to be reapplied when reopening the analysis file, or, if you want to be able to replace specific values in a data table. However, there is no guarantee that a selection always can be reapplied even if key columns are specified because a selection of a visualization item might include references to other columns than the key columns.

To reach the Select Key Columns dialog from Data table properties:

  1. On the menu bar, select Data > Data table properties.

  2. On the General tab, click to select the data table of interest.

  3. Click Edit, next to the Key columns for linked data field.

To reach the Select Key Columns dialog from the data canvas:

  1. On the authoring bar, click Data canvas .

  2. Make sure the data table of interest is selected.

    Comment: This step is only applicable if you have two or more data tables in the analysis.

  3. On the data canvas toolbar, click Key columns.

Option

Description

Limit available columns to

From this drop-down list you can limit the available columns to choose from. Options are:

Recommended columns

Lists columns with Integer/LongInteger or String data types that have unique values for all rows. It is likely that these columns are good choices for determining a unique identifier for each row, but you may have a data table where other columns are more suitable.

Columns of appropriate data types

This option only shows columns of data type Integer/LongInteger or String, because these are more likely to provide unique identifiers.

Even if a column does not have unique values of all rows, a combination of several columns (e.g., 'First name' and 'Last name') may be sufficient to provide a unique identification.

All columns

This option shows all columns in the data table.

You may have a data table where you can uniquely identify your rows using other type of columns (for example, a Date column).

Hide columns that are not valid for Replace Value

[This option is always selected if you reach the dialog from the Replace Value popover.]

Some columns that are valid key columns for keeping markings, tags and bookmarks are not valid when using the 'Replace Specific Value'-transformation directly from a table. This applies to any column that has been modified using a column conversion from the column view in the expanded data in analysis flyout (that is, when the column modification was done on the final data table).

When this check box is selected, all columns that would result in invalid keys for Replace Value will be hidden.

Available columns

Select which columns to use when identifying keys for the rows.

Each row must be determined by a unique combination of values in the specified columns.

As an example, for each row with a tag or a marking in your current analysis, the values for the specified columns are noted in the saved analysis file, and when the analysis file is opened again, rows matching those criteria will be tagged or marked again.

This means that if a new row has been added to the data table that also matches a criterion for a tag or a marking, the tag or marking is not unique and therefore invalid. Neither the new row nor the original row that was tagged or marked, will receive any tag or marking when reopening the analysis.

However, a 'Replace specific value'-operation will replace the value for all matching rows, even if key columns no longer are unique. Unless the transformation has been configured to ignore warnings, you will be informed about the non-unique keys in the data canvas.

Selected columns

These are the columns that will be used when identifying keys for the affected rows.

Add >

Select a column from the Available columns list and click Add > to move it to the Selected columns list.

< Remove

Select a column from the Selected columns list and click < Remove to move it to the Available columns list.

Remove All

Removes all columns from the Selected columns list.

Move Up

Moves the selected column up one step in the list.

Move Down

Moves the selected column down one step in the list.

See also:

How to Edit Data Table Properties

Data Table Properties - General

Saving an Analysis File

Saving an Analysis File in the Library

Specifying Key Columns for a Data Table