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?
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.
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
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.
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?
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
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 :)
Hi John,
Next Tuesday as in tomorrow or as in Next week?
Thanks,
Richard
next week not tomorrow
Ah ok, cool. Yes then you will definitely have it. Will you attend CG11 because the support team is in Copenhagen next week :)
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 :)
is cms import 2 available to do this today?
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
then move them to
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
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
is working on a reply...