Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Robert 30 posts 149 karma points
    Mar 22, 2018 @ 09:53
    Robert
    0

    Import data directly into umbraco db

    What would be the recommended way to import data for our document types directly into the umbraco db? (The data we need to import is in another sql instance).

    Does anyone have a recommend script or guidelines as to how to achieve this?

    Is it risky to bypass the umbraco backend and hit the db directly?

    We are interested in doing this as we have hundreds of thousands records and a normal import via the cms site is slow.

  • Alex Skrypnyk 4732 posts 16909 karma points MVP 2x admin c-trib
    Mar 22, 2018 @ 10:34
    Alex Skrypnyk
    0

    Hi Robert

    There 2 ways of doing it:

    1. Use "CMSImport" package - http://our.umbraco.org/projects/developer-tools/cmsimport

    2. Write custom code using ContentService - https://our.umbraco.org/documentation/reference/management/services/contentservice

    I would not recommend using sql queries

    Thanks.

    Alex

  • Robert 30 posts 149 karma points
    Mar 22, 2018 @ 10:40
    Robert
    0

    Hi Alex - we are already using CMS import but it doesn't work well with hundreds of thousands of records.

    I want to use sql queries to import directly into umbraco from another sql db.

    Can you recommend what tables to insert the data into and in what order?

  • Alex Skrypnyk 4732 posts 16909 karma points MVP 2x admin c-trib
    Mar 22, 2018 @ 10:41
    Alex Skrypnyk
    0

    What about docTypes, are they the same between databases?

  • Robert 30 posts 149 karma points
    Mar 22, 2018 @ 10:44
    Robert
    0

    The other sql db (where we have our data) is not an umbraco db but data can be retrieved from there that matches the doc types we have in umbraco db.

    I am looking for guidelines on inserting this data straight into the umbraco tables.

  • gkirthiv 8 posts 79 karma points
    Mar 27, 2018 @ 11:56
    gkirthiv
    1

    Hi Robert,

    it is always better to use Umbraco content Service.(Alex's #2)

    so you can do testing by inserting 2-3 records initially for testing then insert bulk record if the testing is passed.

    also by using custom code, we can log the errors if may occured.

    I am using Content service for bulk upload when I used to use umbraco v7.

    Thanks

  • Justin Liu 4 posts 73 karma points
    1 week ago
    Justin Liu
    0

    Robert,

    Did you import your content from directly from SQL successfully in the end?

    Im in the same situation now, 30+ records - CMSImport is painfully slow on my server.

    Regards

Please Sign in or register to post replies

Write your reply to:

Draft