Skip to content

Searching for a Better Way to Handle Bulk Inserts #4629

Discussion options

You must be logged in to vote

Do a two-stage insert to your DB.

  1. Create a db table to the effect of raw_hr_data whose only columns are your JSON data and maybe some timestamps to show when the data was inserted
  2. Write SQL SELECTS which reads the JSON data in a table format. The reference below says "Transform arrays of JSON objects into table format.". Do this on the bench to see that you're SELECTing out the correct information.
  3. INSERT the results of step 2 to your actual tables.
  4. Package steps 2 and 3 such that they can be called by MC. It can run the raw SQL but a stored procedure might be reasonable here too.
  5. The outcome is that you have your JSON data in tables but the DB did all the heavy lifting in the DB and not…

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@michaeljeffreycollins
Comment options

Comment options

You must be logged in to vote
1 reply
@michaeljeffreycollins
Comment options

Comment options

You must be logged in to vote
1 reply
@michaeljeffreycollins
Comment options

Answer selected by michaeljeffreycollins
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants