ChangeCsvDelimiter¶
ID: Miscellaneous/ChangeCsvDelimiter
Change the CSV delimiter of incoming CSV recordings of the trace analysis.
This trace step template changes the delimiters of all CSV files contained in recordingInfos and saves the resulting files with a new name (“prefix_OldName_postfix.csv”). The delimiter in the original CSV file is set with the parameter “originalDelimiter” and is “;” by default. It only needs to be changed if the original CSV-recording is saved with another delimiter so that the function recognizes the correct delimiter within the CSV.
If no CSVs are found the trace step template throws an error. If you want to use tabs as delimiters set the parameter to “TAB” (”t” works as well). If “pathToSaveCsv” is empty (or None) the new CSVs will be saved next to the orignal ones. If “pathToSaveCsv” is not empty (and not None) the parameter has to contain an existing path (e.g. “C:Temp”).
(!) Warning (!) The trace step template only changes the delimiter (aka column separator). In this version of the trace step template the thousands and the decimal separators are ignored. Please consider the problems that might occur if the column separator is changed to one of the other separators (e.g. if the CSV is changed from “1,2 ; 1,3 ; 1,4” to “1,2 , 1,3 , 1,4”).
Parameters¶
NewDelimiter¶
CSV Delimiter as string (“TAB” for tabs).
Direction: IN
Type: STRING
OriginalDelimiter¶
Original delimiter in CSV file. The default value is “;”.
Direction: IN
Type: STRING
PathToSaveCsv¶
Empty: File saved with original file name in report folder. Absolute: File is saved in path (e.g. “C:Temp”).
Direction: IN
Type: STRING
Postfix¶
Postfix of new file name.
Direction: IN
Type: STRING
Prefix¶
Prefix of new file name.
Direction: IN
Type: STRING