Developer forum

Forum » Development » Import/Export - delete existing users which are not beeing imported?

Import/Export - delete existing users which are not beeing imported?

Jacob Jensen
Reply
Hi' I've got this client where I need to import 2500 extranet users from a csv file generated from their membership management software. The "bumb on the road" for me is getting the system to whipe the user destination group clean, before importing the updated user records.
Any ideas on how to do this?
PS. I've got no skills in developing modules or any special features... So please be as specific as possible :-)


Replies

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply
Hi Jacob,

Do you have SQL skills to work with the database directly? Because the easiest way to get rid of the users is to delete them from the AccessUser table. E.g.:
DELETE FROM AccessUser WHERE AccessUserGroups = '@3@'

where @3@ could be different in your case, depending on the actual group you're trying to clear.

Cheers,

Imar
 
Jacob Jensen
Reply
Hi Imar, I just forgot to mention a vital part in my question... This should be a part of the import procedure, which my client should be able to trigger when he uploads a new csv-file... or in best case a scheduled pipeline, which it self executed the SQL command and then did the import... :-)
 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply
In that case, I am not sure what to do. I don't think there's an automated way to delete specific records from the AccessUser table, but I could be wrong.

Maybe someone else knows the answer?
 

Imar

 
Kevin Steffer
Reply
Hi Jacob and Imar,
We (Co3) have made a "SQL Source" activity for the import/export module which originally is designed to select rows from a table as xml like "SELECT * FROM AccessUser FOR XML AUTO, ELEMENTS" which then can be processed via XSLT.

The activity is today used in various ways because you can feed it with any SQL command :)
And since it has XML output contraint is matches perfect as the start of any pipeline.

Jacob, tell me if you could be interested in this activity, I'm sure we'll make a decent price for you.

 
Morten Snedker
Reply
 I don't really see any other way than to make your own activity that will do the job. So either you'll have to code this activity yourself (pretty simple), but if you have no coding skills at all, I'd advice you to do the bargain of the century with Kevin.  :-)

Regards /Snedker
 
Kevin Steffer
Reply
Have just sent the DLL to Jacob with the SQL Source activity.

 

You must be logged in to post in the forum