CSVReader
Defined in: .build/typescript/packages/readers/src/csv/base.ts:7
CSV parser
Extends
Section titled “Extends”FileReader<Document>
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new CSVReader(
concatRows,colJoiner,rowJoiner,config?):CSVReader
Defined in: .build/typescript/packages/readers/src/csv/base.ts:21
Constructs a new instance of the class.
Parameters
Section titled “Parameters”concatRows
Section titled “concatRows”boolean = true
Whether to concatenate all rows into one document.If set to False, a Document will be created for each row. True by default.
colJoiner
Section titled “colJoiner”string = ", "
Separator to use for joining cols per row. Set to ”, ” by default.
rowJoiner
Section titled “rowJoiner”string = “\n”
Separator to use for joining each row.Only used when concat_rows=True.Set to “\n” by default.
config?
Section titled “config?”Options
Returns
Section titled “Returns”CSVReader
Overrides
Section titled “Overrides”FileReader<Document>.constructor
Properties
Section titled “Properties”parse()
Section titled “parse()”
staticparse: {(input,options?,callback?):Parser; (input,callback?):Parser; (options?,callback?):Parser; (callback?):Parser; }
Defined in: .build/typescript/packages/readers/src/csv/base.ts:8
Call Signature
Section titled “Call Signature”(
input,options?,callback?):Parser
Parameters
Section titled “Parameters”string | Buffer<ArrayBufferLike>
options?
Section titled “options?”Options
callback?
Section titled “callback?”Callback
Returns
Section titled “Returns”Parser
Call Signature
Section titled “Call Signature”(
input,callback?):Parser
Parameters
Section titled “Parameters”string | Buffer<ArrayBufferLike>
callback?
Section titled “callback?”Callback
Returns
Section titled “Returns”Parser
Call Signature
Section titled “Call Signature”(
options?,callback?):Parser
Parameters
Section titled “Parameters”options?
Section titled “options?”Options
callback?
Section titled “callback?”Callback
Returns
Section titled “Returns”Parser
Call Signature
Section titled “Call Signature”(
callback?):Parser
Parameters
Section titled “Parameters”callback?
Section titled “callback?”Callback
Returns
Section titled “Returns”Parser
Methods
Section titled “Methods”loadDataAsContent()
Section titled “loadDataAsContent()”loadDataAsContent(
fileContent):Promise<Document<Metadata>[]>
Defined in: .build/typescript/packages/readers/src/csv/base.ts:39
Loads data from csv files
Parameters
Section titled “Parameters”fileContent
Section titled “fileContent”Uint8Array
The content of the file.
Returns
Section titled “Returns”Promise<Document<Metadata>[]>
An array of Documents.
Overrides
Section titled “Overrides”FileReader.loadDataAsContent