SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Enthusiast
    Join Date
    Dec 2011
    Posts
    66
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Database dump as multiple .json files

    I'm looking at moving blog content from the MetroPublisher platform to WordPress.

    They have provided a dump of the database, but it is made up of multiple .json files - basically one .json file for every blog record.

    I didn't expect it to be plain sailing, but I did as least expect one big messy file, most likely .csv that could then be massaged before importing into WordPress.

    If anyone could give me me any pointers as to what to do with all these files, presumably to somehow combine them into one file with all the data, that would be much appreciated.

    Thanks.

  2. #2
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,635
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    They probably ran one of many wordpress import / export plugins, I'd ask them what they used.

  3. #3
    SitePoint Enthusiast
    Join Date
    Dec 2011
    Posts
    66
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks - they're not great at support unfortunately, but I'll see what I can find out.

    They originally posted a link to huge amounts of documentation for their API.

    Searching that for 'export' returned no results, so not much help.

    Is a database dump / export that amounts to an individual .json file for each record a common thing, that I wouldn't find a problem if I knew a bit more about databases, or is it a really odd way of doing things?

  4. #4
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,635
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Ok, I misread -- I thought you were coming from wordpress to wordpress. I've got zero familiarity with metropublisher but what it sounds like they did is did an export from their API which doesn't sound horribly odd, especially if they aren't running wordpress.

    What you've got to do here is make sense of their json export (probably documented in the docs they sent) and then write / find some code that will read the json and import it into wordpress. This isn't horribly difficult in general but the devil is in the details -- if the data doesn't "line up" so to speak it can get pretty tricky.

  5. #5
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2006
    Location
    Augusta, Georgia, United States
    Posts
    4,151
    Mentioned
    16 Post(s)
    Tagged
    3 Thread(s)
    Yep, sounds like they have used a RESTful API to provide you with data. I highly doubt that the data you have been provided maps one to one with their database structure. It is more likely an abstraction based on their business model. Once a tool is located to import data best bet is to massage the data to be compatible with that tool. That is the approach I would recommend. Though depending on the complexity it can become quite tedious and challenging. I've done my far share of third part integrations and it is never a walk in the park so to speak. I'm not very familiar with WP but if you have something that will import csv than you *just need to convert what they have given you to a csv file. Though again depending on complexity and programming knowledge that might be challenging. Also when doing bulk imports of data it is import to choose a tool that intelligently manages memory considering a large volume of imports could bomb the site based on how *well the importer was written.
    The only code I hate more than my own is everyone else's.

  6. #6
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2006
    Location
    Augusta, Georgia, United States
    Posts
    4,151
    Mentioned
    16 Post(s)
    Tagged
    3 Thread(s)
    Just as I had anticipated metro Publisher provides an RESTful API.

    https://api.metropublisher.com/doc/resources/index.html

    So the challenge is figuring out how exactly all that maps back to WordPress then programming script or plugin to migrate it to WP.
    The only code I hate more than my own is everyone else's.


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •