This documentation page assumes that you already have a SeekTable account. Create your free account by signing up.

Unpivot CSV columns

In SeekTable, you can transform a set of CSV columns into attribute-value pairs and get 2 special dimensions (one for column names and another one for appropriate column values) where columns become rows.

For example, let's assume we have this table and unpivot is for columns C1, C2, C3:

C0 C1 C2 C3
V1 V2 V3 V4
V5 V6 V7 V8

C0 Columns Dimension Values Dimension
V1 C1 V2
V1 C2 V3
V1 C3 V4
V5 C1 V6
V5 C2 V7
V5 C3 V8

After this unpivot reports may use either Columns Dimension (it can be filtered) or Values Dimensions (it can be used in measures too) or both. At the same time, reports may use other dimensions (that are not unpivoted like C0) for grouping purposes. Note that since values of these columns are duplicated many times because of unpivot operation, it is a little sense to use measures over non-unpivoted columns in the same report where you use at least one of these special unpivoted dimensions.

Typical cases when you need an unpivot:

How to configure unpivot for CSV cube

  1. Go to CSV cube view and click on Edit cube configuration
  2. Open Unpivot section:
    CSV cube upivot settings
  3. In Unpivot Columns specify which CSV columns should be unpivoted; for the example from above they are C1, C2, C3. If this list contains multivalue columns and unpivot should 'expand' each value separately then multivalue_column (Split) should be specifed for the unpivot.
    It is possible to specify a set of columns using patterns like that:
    • 1*: include all columns that start with "1" (wildcard pattern with *)
    • /[0-9]{1,2}[.].*/: include all columns that start with 2-digits and then a dot (.NET regex pattern - should start and end with /).
  4. Then specify 2 special dimension names that should be used for (column name; column value) pairs.

Once unpivot operation is configured you may use these special dimensions in pivot reports. On-the-fly unpivot is performed only when at least one of these dimensions is used in the report.