mapstruct-examples icon indicating copy to clipboard operation
mapstruct-examples copied to clipboard

Convert Spark Dataframe to Dataset with MapStruct

Open almogtavor opened this issue 4 years ago • 0 comments

When using Apache Spark with Java there is a pretty common use case of converting Spark's Dataframes to POJO-based Datasets. The thing is that many times your Dataframe is imported from a database in which the column namings and types are different from your POJO.

Example for this can be found on the following Stackoverflow question (which has been solved programmatically with a map and rename functions). I was wondering if that example could be solved with MapStruct (and maybe would be added to this examples repo).

almogtavor avatar Nov 05 '21 14:11 almogtavor