mergeheader

Combine a defined number of rows into the table header.

This guide explains how to configure the mergeheader instruction. To learn about another instruction, go back to the Available custom script instructions overview.

Introduction

Use the mergeheader instruction to combine a defined number of rows into the table header. The default merge direction is up, meaning the rows directly beneath the header are merged into the header.

Creating a custom script transformation using the mergeheader instruction

To create and configure a custom script using the mergeheader instruction, follow these steps:

  1. Create a custom script transformation.

  2. In the Instructions step, select the mergeheader instruction.

  3. To configure the custom script instruction, fill in the following fields. Required fields are marked with an asterisk (*).

Nrows*

Enter the number of rows below the header to merge into the header.

Fillright

This option defines how to handle empty rows. If left unselected, the header value remains unchanged as there are no values to add to the header. If selected, the values to the left of the empty column are added to header value (see example 2 for an example of this feature).

Joinchar

Enter the character to use as a joining character.

Example 1

Transformation configuration

Nrows*

2

Fillright

Leave this checkbox unselected.

Joinchar

_

Data table before transformation

Campaign

Ad Group

Campaign Name

Clicks

Brand

media

7

Brand

ecommerce

3

Dashboard

media

18

Brand

ecommerce

4

Dashboard

media|social

5

Dashboard

media

11

Data table after transformation

Campaign_Brand_Brand

Ad Group_media_ecommerce

Campaign Name

Clicks_7_3

Dashboard

media

18

Brand

ecommerce

4

Dashboard

media|social

5

Dashboard

media

11

Example 2

Transformation configuration

Nrows*

2

Fillright

Select this checkbox.

Joinchar

_

Data table before transformation

Campaign

Ad Group

Campaign Name

Clicks

Brand

media

7

Brand

ecommerce

3

Dashboard

media

18

Brand

ecommerce

4

Dashboard

media|social

5

Dashboard

media

11

Data table after transformation

Campaign_Brand_Brand

Ad Group_media_ecommerce

Campaign Name_media_ecommerce

Clicks_7_3

Dashboard

media

18

Brand

ecommerce

4

Dashboard

media|social

5

Dashboard

media

11