Giter VIP home page Giter VIP logo

Comments (3)

liefke avatar liefke commented on July 24, 2024

You are right, AbstractCsvDataProvider was developed with files in mind and is neglected since then. In our projects we use a custom DataProvider for CSV files from resources.

This change won't be as easy as it seems, because the AbstractCsvDataProvider should still provide the ability to read all CSV files from a whole directory.

I guess I will split the functionality into two parts:

  1. A DataProvider where I can map columns to properties.
  2. A ColumnReader with different implementations.

That way I can either read the columns from a single CSV file (from an URL), from a directory, or even from an Excel file without having to change the DataProvider.

from org.fastnate.

liefke avatar liefke commented on July 24, 2024

This is still work in progress, so I decided to push it to version 1.5.0

from org.fastnate.

liefke avatar liefke commented on July 24, 2024

It took some while, but there is now an API to parse files from the class path or even from other URLs. The CSV support has moved to the fastnate-csv module. Check OrganisationData.java from the fastnate-examples project for the usage of the new API.

If you still need to read the file from an URL, you can use importer.importFile(new UrlDataFile(url)).

from org.fastnate.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.