
Node Details
- Name: csvFile
- Type: Document
- Version: 2.0
- Category: Document Loaders
Input Parameters
-
Csv File (required)
- Type: file
- File Type: .csv
- Description: The CSV file to be processed
-
Text Splitter (optional)
- Type: TextSplitter
- Description: A text splitter to break down large documents
-
Single Column Extraction (optional)
- Type: string
- Description: Name of a specific column to extract from the CSV
- Placeholder: Enter column name
-
Additional Metadata (optional)
- Type: json
- Description: Additional metadata to be added to the extracted documents
-
Omit Metadata Keys (optional)
- Type: string
- Description: List of metadata keys to omit from the output, separated by commas
- Special value: Use ”*” to omit all metadata keys except those specified in Additional Metadata
Outputs
-
Document
- Description: Array of document objects containing metadata and pageContent
- Base Classes: Document, json
-
Text
- Description: Concatenated string from pageContent of documents
- Base Classes: string, json
Functionality
-
File Loading:
- Supports loading CSV files from base64-encoded strings or file storage
- Can process single files or multiple files (when provided as a JSON array)
-
Data Extraction:
- Extracts data from CSV files using the CSVLoader from langchain
- Optionally focuses on a single column if specified
-
Text Splitting:
- If a text splitter is provided, it splits the loaded documents
-
Metadata Handling:
- Adds custom metadata to documents if provided
- Can selectively omit default metadata fields
-
Output Formatting:
- Can output as an array of document objects or as concatenated text
Use Cases
- Loading and processing CSV data for natural language processing tasks
- Extracting specific columns from CSV files for analysis
- Preparing CSV data for use in language models or other AI applications
- Combining CSV data with custom metadata for enriched document processing
Notes
- The node handles escape characters in the output text
- It’s designed to work within a larger system, likely a workflow or pipeline for document processing