How are the column names determined in merged rows?

How are the column names determined in merged rows?

book

Article ID: KB0076494

calendar_today

Updated On:

Products Versions
Spotfire Statistica 13.5 and above

Description

The "Merge Cases" node can be used to merge two data inputs by rows. When columns of Text type carry different names but reside in the same position/index among those data inputs, the column with longer variable length will be chosen as the final column name in the merged data (under the default setting). 

Issue/Introduction

This article explains how the column names are determined when merging rows with different names.

Resolution

Here is an example for this use-case:
In the example workspace, there are three data inputs and each of them has two variables. Among those three data inputs:
The first variable has the value of person names but is named differently with different variable length. The variable type is Text.
The second variable "Age" has the same type and length. 

User-added image

The data "LengthBig" has a first variable "Name" with a length equal to 30.
The data "lengthSmall" has a first variable "FirstName" with a length equal to 10.
The data "lengthMiddle" has a first variable "GivenName" with a length equal to 18.

When merging the data "LengthBig" and "LengthSmall" by rows (use "merge Cases" node with the default setting), the variable "Name" that has a larger length between those two, will be selected as the final column name in the merged data.  

User-added image


User-added image

User-added image

In contrast, when merging the data "LengthSmall" and "LengthMiddle" by rows,  the variable "GivenName" that has a larger length between those two, will be selected as the final column name in the merged data.  

User-added image