Developer forum

Forum » Integration » Importing parent groups

Importing parent groups

Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Hi there,

I am trying to import the following group structure with a main group and two sub groups:

Name Parent
Main Group  
Sub 1 Main Group
Sub 2 Main Group

When I run an importer with Name mapped to GroupName and Parent mapped to ParentGroups, the groups are imported correctly as follows:

ID Language Name
ImportedGROUP1 LANG1 Main Group
ImportedGROUP2 LANG1 Sub 1
ImportedGROUP3 LANG1 Sub 2

However, the relationships are wrong. In EcomGroupRelations I have this:

Group ID Parent ID
ImportedGROUP2 Main Group
ImportedGROUP3 Main Group

 Notice how the Parent ID contains the name of the group, not its ID (ImportedGROUP1). How can I tell DW to use the ID of the parent group when creating this mapping?

I am using 9.2.14 with CSV as the source and EcomProvider as the target.

Thanks!

Imar


Replies

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

HI Imar,
you can add the mapping "Name" -> "GroupID" in your job, so the group ids will not be generated. Or add a new column in the CSV called "GroupID" and put the values same as group name for the parent groups and leave blank values for the sub groups, and add "GroupID"->"GroupID" mapping, then the ids for the subgroups will be generated but the main groups will have same ids as their names.
Regards, Dmitrij

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

That seems to be the reverse of what I want; names can contain spaces, & symbols and other risky characters making them unsuitable as IDs. Also, I may have duplicate names for sub groups which could cause issues.

Shouldn't the mapping from name to ID be handled internally? It does it for lots of other entities like products, variants and so on, right?

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

That feature is not yet implemented in the EcomProvider. It does this for products and variants by looking for already existing ids based on the source input, not like in this case(when all records are new). That kind of functionality is just present in the UserProvider.

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Imar,
I've made an item for that: TFS# 34501. It will be implemented in the EcomProvider package.
Regards, Dmitrij

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply
This post has been marked as an answer

Hi Imar,
it is available in Dynamicweb.DataIntegration.Providers.EcomProvider 1.0.19 package.
Regards, Dmitrij

Votes for this answer: 1
 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Cool, thanks, I'll give it a spin.

Imar

 

You must be logged in to post in the forum