0

I have a use case where we need to seed Drupal content with content from another database.

The only access to this database I have is via a Rest API.

The official Drupal.org docs have a link to this article by Lullabot which seems promising:

https://www.lullabot.com/articles/pull-content-from-a-remote-drupal-8-site-using-migrate-and-json-api

Is using Migrate a reliable solution to having never-ending one-way "content sync"? There are about 120,000 items to do an initial import of, and we need to import/update items that were changed in the previous 24 hours (daily).

I figured Migrate should be able to do this, given that it has a lot of fail safes and extension points built in (some data will need to be modified a little on fetch, for example).

edit: Not literally the JSONAPI in Drupal, but the source content is fetched via a JSON API that returns a JSON object response.

  • Not sure what you mean by never-ending. Nevertheless, I do know that the D8 Feeds module plans on using/leveraging the migrate API. So I like to think that you will be fine. – No Sssweat Feb 9 at 16:06
  • I can’t wait for feeds. Never ending as in, the source database is being fed daily with content and I’m pulling it in (sync). It’s being this or me coding it with the Queue/Job API and I’m not sure if migrate would save me a lot of time or not. – Kevin Feb 9 at 17:32
  • I guess if feeds is being reworked to use Migrate anyway then I suppose Migrate is already capable, just wondering if it’s a good tool for that. I have yet to use it in 8.x. – Kevin Feb 9 at 18:24
  • @Kevin How about complex of your content? How many node types? How many fields on a node? Do you have paragraph field type, file, image field type? I think 120k is a big number, but 24 hours is enough to sync it. If your content is complex, you have to change your API, Split your sync content to two API: insert new and update exit with condition time create or time update bigger last time run migrate. And I thing migrate is enough to sync your content don't need to wait for feed module. – MrD Feb 10 at 15:22
  • A case study using migration to sync content. – MrD Feb 10 at 15:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.