Class: CSVReader
CSV parser
Extends
Constructors
new CSVReader()
new CSVReader(
concatRows
?,colJoiner
?,rowJoiner
?,config
?):CSVReader
Constructs a new instance of the class.
Parameters
• concatRows?: boolean
Whether to concatenate all rows into one document.If set to False, a Document will be created for each row. True
by default.
• colJoiner?: string
Separator to use for joining cols per row. Set to ", " by default.
• rowJoiner?: string
Separator to use for joining each row.Only used when concat_rows=True
.Set to "\n" by default.
• config?: Options
Returns
Overrides
Defined in
packages/readers/csv/dist/index.d.ts:19
Properties
parse()
static
parse: (input
,options
?,callback
?) =>Parser
(input
,callback
?) =>Parser
(options
?,callback
?) =>Parser
(callback
?) =>Parser
Parameters
• input: string
| Buffer
• options?: Options
• callback?: Callback
Returns
Parser
Parameters
• input: string
| Buffer
• callback?: Callback
Returns
Parser
Parameters
• options?: Options
• callback?: Callback
Returns
Parser
Parameters
• callback?: Callback
Returns
Parser
Defined in
packages/readers/csv/dist/index.d.ts:8
Methods
loadData()
Parameters
• filePath: string
Returns
Inherited from
Defined in
packages/core/schema/dist/index.d.ts:188
loadDataAsContent()
loadDataAsContent(
fileContent
):Promise
<Document
<Metadata
>[]>
Loads data from csv files
Parameters
• fileContent: Uint8Array
The content of the file.
Returns
An array of Documents.
Overrides
Defined in
packages/readers/csv/dist/index.d.ts:25
addMetaData()
static
addMetaData(filePath
): (doc
,index
) =>void
Parameters
• filePath: string
Returns
Function
Parameters
• index: number
Returns
void
Inherited from
Defined in
packages/core/schema/dist/index.d.ts:189