Copied to clipboard

Flag this post as spam?

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


  • John C Scott 473 posts 1183 karma points
    Jun 01, 2011 @ 13:54
    John C Scott
    0

    Variable Parents

    Most of the times I have imported content recently it has not all been in the same node but has a different parent depending on the data imported. I've been approaching this by using a "saved import" and running the same import each time with a slightly different SQL statement.

    Is there any way to write an adaptor that changes the parent based on some data - so that this could be run by someone who didn't understand the SQL or also so that it could be run from CSV that can't support a where clause?

  • Richard Soeteman 4045 posts 12898 karma points MVP 2x
    Jun 01, 2011 @ 21:07
    Richard Soeteman
    0

    Hi John,

    Do you mean a parent child structure as in Product Categories as a parent and you want to import Products for eac different category? if so I have good news, Next week I will release CMSImport 2.0 which will support this. If not please take a look at the sample described in section 8.6 of the manual which moves a document to a different parent based on a datasource value.

    Thanks,

    Richard

  • John C Scott 473 posts 1183 karma points
    Jun 06, 2011 @ 16:39
    John C Scott
    0

    thank you for this Richard this sounds perfect

    i'll have a look at what you suggest

    we're going to run this next tuesday so hope we can use 2.0 then :)

  • Richard Soeteman 4045 posts 12898 karma points MVP 2x
    Jun 06, 2011 @ 16:45
    Richard Soeteman
    0

    Hi John,

    Next Tuesday  as in tomorrow or as in Next week?

    Thanks,

    Richard

  • John C Scott 473 posts 1183 karma points
    Jun 06, 2011 @ 16:49
    John C Scott
    0

    next week not tomorrow

  • Richard Soeteman 4045 posts 12898 karma points MVP 2x
    Jun 06, 2011 @ 16:51
    Richard Soeteman
    1

    Ah ok, cool. Yes then you will definitely have it. Will you attend CG11 because the support team is in Copenhagen next week :)

  • John C Scott 473 posts 1183 karma points
    Jun 06, 2011 @ 17:02
    John C Scott
    0

    the question of if i will attend CG11 has become entirely one of how well this import goes! but i do have a ticket yes :)

  • John C Scott 473 posts 1183 karma points
    Jun 14, 2011 @ 17:33
    John C Scott
    0

    is cms import 2 available to do this today?

  • John C Scott 473 posts 1183 karma points
    Jun 14, 2011 @ 20:41
    John C Scott
    0

    also one other question 

    if i have changed the parent... (using the 8.6 method) is it still possible to use CMS import to update where I have a key? 

    in this case the moved documents will still be the children of the same parent node - they will be moved to child nodes

    IE we import

    FMT >
      1234 Adam   45
      1238 Bob     33
      1240 Charlie 78
      1247 Dave   48

    then move them to

    FMT > 
      Alpha >
        1234 Adam   45
        1238 Bob   33
      Omega >
        1240 Charlie 78
        1247 Dave   48 

    Then I had a new file to import that updated the numbers but the key was the same 

    is it still going to be possible to use "Update" although the data has moved to new parent nodes that are children of the original?

    IE I import a new file that looks like

    1234, Adam, 11
    1238, Bob, 13
    1240, Charlie, 17
    1247, Dave, 19
    and I want it to update to, where FMT is a node and Alpha/Omega are nodes beneath FMT and my imported nodes are stored beneath these and that first number is a unique primary key in the data source.
    FMT > 
      Alpha >
        1234 Adam   11
        1238 Bob   13
      Omega >
        1240 Charlie 17
        1247 Dave   19 
  • Richard Soeteman 4045 posts 12898 karma points MVP 2x
    Jun 15, 2011 @ 06:22
    Richard Soeteman
    0

    Hi John.

    Yes should still be possible. When you move an item, manually or via API I update the parent info in the relation table so CMSImport always knows about the news structure and then the update should still work.

    Cheers,

    Richard

Please Sign in or register to post replies

Write your reply to:

Draft