Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Div
idProductTOC

On this page

Table of Contents
maxLevel1
excludeOn this page
typeflat
separatorpipe

Overview

Augments provide the ability to augment the data found in the CSV table with additional columns derived from other information available. The CLI support for this is similar to the support provided by the CSV Macro and the JSON Table Macro - see Augments for more information. The list of supported replacements follows later.

Why would you use augments? In some cases, you may have little control over how the data is produced or you may want to format the data for subsequent use like for sending the data to Slack or Confluence.  

Parameters

Table plus
sortIcontrue


Parameter
Default
Macro Browser Label
Description
augments
Augments to data row values

Comma separated list of augments to the data, one for each column.

headingAugments
Augments to heading row values

Comma separated list of augments to the data, one for each column.

footingAugments
Augments to footing row values

CLI does not support footing augments at this time.

columns
Columns to showComma separated list of column names or numbers in any order. Defaults to all columns in existing order. Columns are enumerated starting at 1. For augment support, use * to represent an augmented column to be added.


Anchor
replacement
replacement

Replacement Keys

Replacement keys enclosed in % will have replacements as indicated below. Example:  %#% will be replaced by the current row number.

Table plus
sortIcontrue


KeyReplacementDifference if heading row?
*original value
emptyoriginal value
blankblank
#row number (starting at 1 for the first data row)blank
numbervalue of the column identified by column number (1 based)
namevalue of the column identified by column name lookup if valid
!| (may be needed when using wiki markup)
[{ (may be needed when using wiki markup)
]} (may be needed when using wiki markup)


Examples

Add a Row Number with Augments

Code Block
-a run -i "examplegear -a getSpaceList -f @temp" \
       -i "csv -a copyCsv --sourceFile @temp --headingAugments # --augments %#% --columns 1,2,5 -f @temp" \
       -i "csv -a convertCsv --sourceFile @temp --outputType text"
...
Converted data
 #  Name                 Home Page              
 1  Test                 Test                   
 2  Demonstration Space  Welcome to Confluence

Additional References