Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] improve CsvLoader & clean code #3830

Merged
merged 3 commits into from
Jan 14, 2025

Conversation

JJK801
Copy link
Contributor

@JJK801 JJK801 commented Jan 8, 2025

Hi Flowise,

Here is a PR which aims to improve CSV Data loading, th key points are:

  • Improve CSV Handling by using a custom loader with Papaparse (auto detect separator, auto detect headers, streaming capability, direct local file load capabilities, remote file load capability, ...) which is more memory friendly and efficient
  • Clean some code (create methods to make code more readable, extract some utils functions, ...)
  • Cleanup S3 Loaders (File & Directory) & use custom CSVLoader in it.

This also opens some opportunities:

  • Improve memory management by directly loading CSV Files into the parser
  • Stream responses instead of getting fat raw data
  • Load CSV files from a remote URL

@JJK801 JJK801 force-pushed the feat/improve-csv-loader-clean-code branch from fb3c0f1 to d4002a2 Compare January 9, 2025 16:30
@HenryHengZJ
Copy link
Contributor

thanks @JJK801, tested and works like a charm!

I've added ability to use built in loaders for S3 File

@HenryHengZJ
Copy link
Contributor

can you pull the latest changes and update the pnpm lock file?

@JJK801 JJK801 force-pushed the feat/improve-csv-loader-clean-code branch from 2840198 to 0a862f7 Compare January 14, 2025 11:21
@JJK801
Copy link
Contributor Author

JJK801 commented Jan 14, 2025

@HenryHengZJ done

@HenryHengZJ
Copy link
Contributor

Note: we can use the refractor util function for every other doc loaders in future

@HenryHengZJ HenryHengZJ merged commit 24eb437 into FlowiseAI:main Jan 14, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants