groovy - grails: approaches to importing data from an external schema -
groovy - grails: approaches to importing data from an external schema -
need periodically read ~20k records external database (schema not under control), , update/create respective instances in local schema (grails' main datasource
). target single domain class.
i've mapped external database datasource. i'm thinking utilize groovy.sql.sql
+ raw sql bring-in records, , generate domain instances as-required. reasonable path? should alternatively model-out external schema, , utilize gorm end-to-end?
assuming first approach, considering testing: there useful tools should setting-up test info (i.e. equivalent of build-test-data/fixtures non-domain data)?
thanks
yes. think reasonable given info size , how going this. dont forget execute sql batch save on resources.
grails groovy gorm
Comments
Post a Comment