Welcome Guest, Not a member yet? Register   Sign In
Where does a data-import map go?
#1

Hello,
I'm writing an application that will need to import a complex dataset in JSON format (via file upload) to a database. A human will have to perform a step of mapping JSON keys to DB fields because the data structure is variable. 
What is the best approach for organizing the code for these operations? I have already a controller that manages the upload; where should it go from there? Before being passed to a model for db saving, where should the pre and post human processing take place? A library? A service? Private methods of the upload controller?
Thanks,
Evan
Reply
#2

Create a Library Class for the methods and a service to load the Library Class.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#3

Just what I was looking for, thank you!
Reply




Theme © iAndrew 2016 - Forum software by © MyBB