ballerina-platform / ballerina-library

The Ballerina Library
https://ballerina.io/learn/api-docs/ballerina/
Apache License 2.0
136 stars 64 forks source link

Generate/Consume 'table' values from CSV Reader/Writer #408

Open lafernando opened 4 years ago

lafernando commented 4 years ago

$subject. Currently CSV works with just string[], it would be better if we have enhanced functionality where it works with 'table' types, and allows it to be conveniently used with queries.

daneshk commented 3 years ago

New high-level CSV APIs provide support to read CSV content as streams[1]. Please check whether satisfies the requirement.

  1. https://dev.ballerina.io/learn/by-example/csv-io.html
lafernando commented 3 years ago

New high-level CSV APIs provide support to read CSV content as streams[1]. Please check whether satisfies the requirement.

  1. https://dev.ballerina.io/learn/by-example/csv-io.html

Not really; the main requirement is to get a data structure that has columns named so we can query them easily, e.g. in language -integrated queries. So still a string[] stream does not solve this, it's still similar to the earlier available functionality. So the most natural data structure I see for this requirement is to use a table.