On this page | |
Since | 17.5 |
This node allows a CSV file to be created from work item attributes and result data. Data queries can be added to specify which data from the work item should get written to the outputted CSV file.
Normally one row will be written for each work item in the upstream item. For example, if the node generates from a single upstream item, there will only be one row in the CSV file. If the node generates from a partition which contains 10 work items, the CSV file will contain 10 rows. Setting Multiple Values per Query to Add Rows may result in multiple rows being generated for a given item.
The opposite of this node (create work items from rows of a CSV file) is the CSV Input node.
Parameters
Output
CSV File
Specifies the output path of the CSV file.
File Tag
Specifies the file tag for the result.
Write Header
Specifies whether the node should write a header to the CSV file. If this is enabled, a header row will be written to the CSV file where each header is the name of the attribute or the result data tag.
Quoting
Specifies how column values will be quoted. The CSV convention is that values can optionally be surrounded with quotes. Quoting is necessary if the value contains a quote, line separator or column separator character. However some software requires more or less quoting.
Minimal: Values will only be quoted if they contain quote, line separator or column separator characters.
Non Numeric: All non-numeric (string) values will be quoted. This is the default.
All: All values will be quoted.
None: No values will be quoted. However quotes, line separator and column separator characters will be escaped with a quote character.
Column Delimiter
When enabled, specify a character to use to delimit columns in the file. Typically this is a comma or tab character.
Error if Tag Match Fails
If this is enabled, the node will raise an error when no match is found for any of the data queries.
When Multiple Values
If there are multiple values found for the given query, how they should be written. For example if the query is "file/geo", there may be multiple results for a given item. Since
Add Rows
An extra row should be written for each value returned.
Add Columns
Each value will be written as a new column.
Attributes to Write
Selects how to specify the attributes to be written to the CSV file.
By Data Queries
Select this to specify work item attributes by the Data Queries multiparm. The order of the multiparm will be the order of the columns in the file.
By Attribute
Select this to specify an attribute from which to read the names of attributes to dump to CSV. The attribute should be a string array attribute which contains names of attributes on the workitems. The order of the names will be the order of the columns in the file.
Data Queries
This is a multi-parameter that contains all of the data queries that should be performed.
Attribute Name / Tag
This parameter is the actual query that will be performed on the upstream item. It can be either an attribute name or a file tag.
The position of this parameter within the multi-parameter list determines the column that the data will be written to.
Examples
WriteCSV Example for CSV Output TOP node
This example demonstrates how to create a csv file from pdg work item’s attributes.
See also |