Re: Custom type for env.readCsvFile

2021-07-11 Thread Caizhi Weng
Hi! If your custom type is a POJO then readCsvFile should work, otherwise as far as I know there is no way to let the parser directly parse a custom type for you. You can of course implement your own csv input format by extending GenericCsvInputFormat but I think it would be better to just read th

Custom type for env.readCsvFile

2021-07-11 Thread Mason Chan
Hi, I am using the scala api and I want to deserialize a column in a CSV to a custom object type. Is this possible? Here's a code snippet of something I want to do: val rows = env.readCsvFile[(String, CustomType)]("./test.csv", includedFields = Array(0, 1), ignoreFirstLine = true) When I do this