Can you map multiple fields to multiple records?
We're trying to map an incoming text document into database tables. Our client provides us with an input file which is difficult to match. There is a parent record, and one to many child records. It is structured like so, with a parent record "USER", along with two child records "ADDR" and "CLUBS":
USER | John Smith | 0001
ADDR| 1234 Fawn Drive | Albany | NY
CLUBS| NRA | ACLU | Toastmasters
USER | Barry Sonnen | 0002
ADDR | 305 Jello Way | Taunton | MA
CLUBS | BSA | Society of Engineers | Cthulu
......
The difficulty is the "CLUBS" record. They want a resulting record for each value. So for each person there would be one User record, lined to one Address record, and linked to one or more "CLUBS" records.
I can't figure out how to map a one-to-many transformation.
-
I wasn't able to determine a way to do this, so I created a custom plugin using the beanio library. It has methods for parsing repeating values.
0
Please sign in to leave a comment.
Comments
1 comment