|On this page|
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.
Determines when this node will generate work items. You should generally leave this set to “Automatic” unless you know the node requires a specific generation mode, or that the work items need to be generated dynamically.
All Upstream Items are Generated
This node will generate work items once all of the input nodes have generated their work items.
All Upstream Items are Cooked
This node will generate work items once all of the input nodes have cooked their work items.
Each Upstream Item is Cooked
This node will generate work items each time a work item in an input node is cooked.
The generation mode is selected based on the generation mode of the input nodes. If any of the input nodes are generating work items when their inputs cook, this node will be set to Each Upstream Item is Cooked. Otherwise, it will be set to All Upstream Items are Generated.
Specifies the output path of the CSV file.
Specifies the file tag for the result.
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.
When enabled, specify a character to use to delimit columns in the file. Typically this is a comma or tab character.
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.
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 Column 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.
By Attribute Pattern
Select this to specify work item attributes using an Attribute Pattern.
Determines how the node should handled missing attributes on work items.
Missing attributes are ignored
Missing attributes cause the node to report an error, and fail to generate work items
Missing attributes cause the node to report a warning, and continue generating work items
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
An extra row should be written for each value returned.
Each value will be written as a new column.
When Attributes to Write is set to By Column Attribute, this parameter specifies the name of the work item attribute that contains the list of attributes to write to the CSV file.
When Attributes to Write is set to By Attribute Pattern, this parameter species the Attribute Pattern used to determine which attributes are written to the CSV file.
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.
WriteCSV Example for CSV Output TOP node
This example demonstrates how to create a csv file from pdg work item’s attributes.