mapstruct / mapstruct-examples

Examples for using MapStruct
Other
1.28k stars 511 forks source link

Convert Spark Dataframe to Dataset with MapStruct #128

Open almogtavor opened 2 years ago

almogtavor commented 2 years ago

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).