Git Product home page Git Product logo

frends.csv's People

Contributors

akankainen avatar ekih avatar helvertti avatar jefim avatar jvuoti avatar mhfff79 avatar nickeeex avatar rikuvirtanen avatar skelendal avatar svenskapojkarna avatar ttossavainen avatar villevuorela avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

frends.csv's Issues

It should be possible to create CSV from XML

Converting XML to CSV is common integration scenario and this is also promised at project description: "...as well as creating CSV and fixed-width files from JSON and XML inputs."

JSON input has multiple problems

Issues:

  • JSON input fails with properties that have null as value
  • JSON input removes decimals from double 0.0 (0.0 --> 0)
  • string values with whitespaces are inside quotes in result.
  • Date time fields are changed to US type dd/MM/yyyy ((02/05/2019 00:00:00)
    example:
    [{
    "double":0.0,
    "thisFails": null,
    "iGetDoubleQuotes" : " i am claustrophobic "
    "DateTime" : "2018-11-22T10:30:55"
    }]
    CSV result (when null value removed):
    double;iGetDoubleQuotes;DateTime
    0;" i am claustrophobic ";11/22/2018 00:00:00

Csv.Parse - Add handling for missing field values

When dealing with malformed CSV (see example below), where some rows are not complete currently the task throws an exception about missing field values. This is easily recoverable problem and our underlying library has a config option for dealing with this - MissingFieldFound delegate for handling this case.

To be done: add a boolean option to CSV Parse task called TreatMissingFieldsAsNulls and property configure the parser. In output we should produce all the missing fields as null values.

NB! Default value should remain false to keep the backwards compatibility!

header1,    header2,    header3
value1,     value2,    value3
value1,     value2,    value3
value1,     value2,    value3
value1,     value2,    value3
value1,     value2,    value3
value1,     value2,    value3
value1,     value2
value1,     value2,    value3
value1,     value2,    value3

ToXml() without headers generates invalid xml.

Numbers Are used in column names if source csv does not have headers which gives errors like:
Name cannot begin with the '0' character, hexadecimal value 0x30

Columns could be named for example Column1,Column2 etc instead of 0,1,2

Quotation mark in column value

I have this csv I need to parse and it has a single quotation mark in single value on one row like this:
value;foobar 5x5";value

I get this error
image

Is is possible to add a option to the task to ignore quotes?

Option ReplaceHeaderWhiteSpaceWith doesn't work with all whitespace characters

headers = csvReader.Context.HeaderRecord.Select(x => x.Replace(" ", option.ReplaceHeaderWhitespaceWith)).ToList();

String.Replace( ) method here only identifies headers containing space characters. There could be plenty of other whitespace characters, which go unidentified now.

What about header column containing zero characters? It might be handy to replace those, too.

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.