Tasks
Parse Data File
Parses a data file into the stub data. The file must be uploaded to Stubber using a file field or another supported method before it can be parsed. Only .csv and .json files are supported.
Basic usage
Parameters
fileuuid required string
The UUID of the file to be parsed.
fieldname required string
The data path where the parsed contents will be saved.
options optional object
Additional parsing options to pass to the parser.
CSV Options
- delimiter: The delimiter used in the CSV file. Default:
,. - quote: The quote character used in the CSV file. Default:
". - trim: If
true, trims whitespace from values. Default:true. - ignoreEmpty: If
true, ignores empty lines. Default:false. - noheader: If
true, treats the first row as data instead of a header. Default:false.
Properties
fieldname string
The data path where the parsed file contents were saved.
Examples
Parse to a nested data path
Parses a file and saves the results to stub.data.results.json.