Finance data from SQL Server into ObjectDB daily

#1

Hello -

 

I think ObjectDB might be just the solution for our current project but I would like some feedback from the community to see if I'm thinking about it right.

 

We have a finance data mart that is appended to daily via an SSIS package. I would like to pull the data from SQL, add it to a bean and store it in the ObjectDB. This would all happen in an automated fashion. Does this make sense? Is there a way to map the structure of the table directly into ObjectDB from SQL Server?

 

Thanks.

#2

You cannot map RDBMS tables directly to ObjectDB but you can use other JPA implementations to retrieve data from RDBMS tables and then use the same JPA entity classes to store the data in ObjectDB.

ObjectDB Support
#3

Hi -

 

Thanks for getting back to me. I'm unfamiliar with JPA and I'm wondering if you might be able to point me to something on the RDBMS mapping.

Thanks.

 

#4

Quote:

 

"You cannot map RDBMS tables directly to ObjectDB but you can use other JPA implementations to retrieve data from RDBMS tables and then use the same JPA entity classes to store the data in ObjectDB."

 

I am doing this exactly. Here is the quick code I whipped up to carry this out. Just make sure you have all dependencies in classpath and make sure to have the javaagent for objectdb enabled (as eclipselink uses reflection to access your entity fields).

Code is straight forward, and attached - it was written in about 3 minutes so please disregard the 'in line' nature. Customise as required!

 

EDIT: Code assumes that your PK is 'id' and is of type long. I am using this code to migrate to PostgreSQL for some testing purposes. You may also have some issues with regards to deep-nested objects

 

 

 

 

Reply