Selecting fields to output - Data360_Analyze - Latest

Data360 Analyze Server Help

Product type
Software
Portfolio
Verify
Product family
Data360
Product
Data360 Analyze
Version
Latest
Language
English
Product name
Data360 Analyze
Title
Data360 Analyze Server Help
Copyright
2024
First publish date
2016
Last updated
2024-11-28
Published on
2024-11-28T15:26:57.181000

Output all fields

BRAINscript:

emit *

Python:

ConfigureFields

outputs[0] += inputs[0]

ProcessRecords

outputs[0] += inputs[0]

Specify fields to output

BRAINscript:

emit ‘color’,’type’

Python:

ConfigureFields

outputs[0] += inputs[0]['color']outputs[0] += inputs[0]['type']

ProcessRecords

outputs[0] += inputs[0]

Exclude fields

BRAINscript:

emit*exclude color, type

Python:

ConfigureFields

outputs[0] += inputs[0]outputs[0] -= inputs[0]['color']outputs[0] -= inputs[0]['type']

ProcessRecords

outputs[0] += inputs[0]

Rename a field

BRAINscript:

emit*

rename color as newFieldName

Python:

ConfigureFields

outputs[0] += inputs[0]outputs[0] -= inputs[0]['color']outputs[0]['newFieldName'] = inputs[0]['color']

ProcessRecords

outputs[0] += inputs[0]

Note: You must write the exclude statement first, prior to inserting new field metadata that references the excluded input field, i.e. in this example, outputs[0] -= inputs[0]['color'] must be written before outputs[0]['newFieldName'] = inputs[0]['color']Reversing the order of these statements will produce an incorrect result. In this case, the exclude statement will not only exclude the original field metadata, but will also remove any output field that is mapped from the excluded input field.

Create a new field

BRAINscript:

emit*newField1 = field3.toUpperemit newField1

Python:

ConfigureFields

outputs[0] += inputs[0]outputs[0]['newField1'] = unicode

ProcessRecords

outputs[0] += inputs[0]

outputs[0]['newField1'] = fn.upper(inputs[0]['field3'])