Once a day you need to import a CSV with several million rows into the database through an existing JPA layer. How would you design the import so it doesn't run out of memory and finishes in time?
~10 min by voice
How to approach it
This checks whether the candidate understands how JPA/Hibernate behaves at large volumes: memory (the persistence context, loading the file), speed (JDBC batching, ID generation, bypassing the ORM) and reliability (batches, bad data, restarting after a failure).
The interviewer will ask this question and listen. Think out loud and ask for a hint if you need one. When you're done, pause or tap “That's my answer”. In about a minute, your score and the points you covered show up here.