Creating virtual columns (Watson Knowledge Catalog)

A virtual column is the concatenation of data from one or more columns in one column. After you create a virtual column, you can run analysis of this column.

Creating virtual columns is beneficial in the following cases:

For example, you can combine a First Name column and a Surname column into one column called Name. You can then analyze this concatenated column, which contains the data in both the First Name column and the Surname column.

When you run a column analysis job, a frequency distribution is generated for the virtual column. The results from a column analysis job using virtual columns is similar to the results of a column analysis job for a single column except that no inferences are made about data classes for virtual columns. However, publishing those analysis results is not supported.

Required project roles: To create, edit and remove a virtual column, you must have the Business Analyst or Data Operator project role in the data quality project where you want to work with virtual columns.

  1. Go to Governance > Data quality > project name > Data assets > data asset name.

  2. Click Create virtual column.

  3. Specify the name, and optionally add a description.

  4. In the Available columns table, select the columns that you want to add to your virtual column. Click Add. The columns are added to the Selected columns table.

  5. Specify other optional parameters:

    • Field separator - this field specifies the character that separates the selected columns.
    • Replace null values with - when a column has empty values, they are replaced by the character that you specify in this field.
    • Fixed width - when you select this option, you are able to specify custom width for each selected column.
    • Padding character - this field is valid only when the Fixed width option is selected. It specifies the character that is used when the column value is shorter than the specified width. For example, the padding character is #, the custom column width is 10, and the column value has 5 characters. The example value in the virtual column is 25485#####.
    • Enclose values with - this field specifies the character that is used to enclose column values.
  6. To save the changes, click Create.

After you create a virtual column, run a column analysis. For more information, see the Running a column analysis topic.

To edit a virtual column, find the column in a data asset, select it, and click Edit virtual column.

To delete a virtual column, find the column in a data asset, select it, and click Delete virtual columns.

Parent topic: Working with projects and data assets