Add: Insert constant fields

class txf.Add(source, outputs, values)

The Add transform adds one or more constant values to the record stream.

source: Transform

If one is not provided (None), Add will generate identical rows indefinitely.

outputs: tuple(str), str

The name(s) of the output fields. They cannot overwrite existing fields. Use Drop to remove unwanted fields.

values: tuple

The value(s) for the output fields. There must be the same number as outputs.

Usage

Add(p, 'InputFile', 'test.csv')
Add(p, 'Timestamp', datetime.datetime.now()

Example

Line

|| Q01_PARALLEL ||

Cold run…DONE

1/5…0.083052

2/5…0.079075

3/5…0.079176

4/5…0.078928

5/5…0.079142

Add(p, 'Branch', 'master')

Line

Branch

|| Q01_PARALLEL ||

master

Cold run…DONE

master

1/5…0.083052

master

2/5…0.079075

master

3/5…0.079176

master

4/5…0.078928

master

5/5…0.079142

master