[ 
https://issues.apache.org/jira/browse/FLINK-1388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14311329#comment-14311329
 ] 

Adnan Khan commented on FLINK-1388:
-----------------------------------

Hey Fabian, 

I've been digging through those two classes you mentioned, but I'm still not 
clear on how to use the {{PojoTypeInfo}}. So given a custom POJO, how to create 
a {{PojoTypeInfo}} instance. Specifically because it takes in a 
{{List<PojoField>}} as a constructor parameter as seen here {{public 
PojoTypeInfo(Class<T> typeClass, List<PojoField> fields)}}

However looking at the example output in the ticket description above, I can 
generate a CSV string using Java's reflect library. I feel I've missed 
something.

> POJO support for writeAsCsv
> ---------------------------
>
>                 Key: FLINK-1388
>                 URL: https://issues.apache.org/jira/browse/FLINK-1388
>             Project: Flink
>          Issue Type: New Feature
>          Components: Java API
>            Reporter: Timo Walther
>            Assignee: Adnan Khan
>            Priority: Minor
>
> It would be great if one could simply write out POJOs in CSV format.
> {code}
> public class MyPojo {
>    String a;
>    int b;
> }
> {code}
> to:
> {code}
> # CSV file of org.apache.flink.MyPojo: String a, int b
> "Hello World", 42
> "Hello World 2", 47
> ...
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to