-
Notifications
You must be signed in to change notification settings - Fork 2
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
support streaming #14
Comments
So the result of reading a CSV input is an array of objects (unless you specified
Unfortunately there's not way to stream and transform input at the moment. It's somewhat possible from sjsonnet implementation, but haven't dug in enough into implementating it. |
Ah, ok so it sounds like this would not be suitable for transforming a large stream of data since the entire stream/file is loaded into memory. Is that correct? |
Correct. |
Is there any interest in the streaming use case? Would open up lots of uses cases for integration. |
Definitely. It's something I plan to tackle at some point, but can't offer any ETA at the moment. Mostly because of lack of free time, but also haven't thought through the architecture of a solution. |
I still haven't been able to get a basic map working. e.g.: // body is List<Map<String, Object>>
.transform(xtrasonnet("""
{
Name: payload.Name
}
""", String.class)
.bodyMediaType(MediaTypes.APPLICATION_JAVA)
.outputMediaType(MediaTypes.TEXT_CSV)) results in
I've also tried:
But I get the same result. What am I doing wrong? |
Your payload is an array, so you have to do something like
|
I'm having a little trouble determining what syntax to use for transforming CSV files of undetermined length. I'm trying this:
But I get the error:
It looks like xtrasonnet is loading all rows into memory and then expecting the transformation to specify a row index. What I'd like to do is stream through the input CSV file and have it apply the above transformation to each row. Is this possible?
The text was updated successfully, but these errors were encountered: