-
Notifications
You must be signed in to change notification settings - Fork 193
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
Add ballerina by examples for CSV data module #5524
Conversation
Quality Gate passedIssues Measures |
@@ -0,0 +1,9 @@ | |||
# CSV to record conversion with projection | |||
|
|||
The `data.csv` library provides multiple APIs to selectively convert required fields from CSV data in the form of a `string`, `byte[]`, `byte-block-stream`, `record-array` and `anydata-array-of-array` to a Ballerina anydata array of array. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In here it is better to explain more about projection.
examples/csv-to-anydata-array-with-projection/csv_to_anydata_array_with_projection.bal
Show resolved
Hide resolved
1984,George Orwell,1949,Secker & Warburg`; | ||
|
||
public function main() returns error? { | ||
// Convert the CSV value of type record array into a string array of array with projection. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is it correct to say that this is a CSV value
because the value is actually a array of records.
@@ -0,0 +1,2 @@ | |||
description: This BBE illustrates how to selectively convert fields from a CSV source, which can be provided as a string, byte array, byte block stream, record array or anydata array of array into a anydata array of array in Ballerina. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we update the types described here as in this file csv_to_anydata_array_with_projection.md
. WDYT?
This PR has been open for more than 15 days with no activity. This will be closed in 3 days unless the |
This PR will draft until ballerina-platform/module-ballerina-data.csv#4 get merge |
This PR will be reopen after ballerina-platform/module-ballerina-data.csv#4 |
Add ballerina by examples for CSV data module
Fixes ballerina-platform/ballerina-dev-website#9299