[turba] Fwd: RE: Address book import question
Jan Schneider
jan at horde.org
Mon Aug 3 14:32:34 UTC 2009
----- Weitergeleitete Nachricht von aria at bsc.gwu.edu -----
Datum: Mon, 3 Aug 2009 09:17:58 -0400
Von: Aria Bamdad <aria at bsc.gwu.edu>
Betreff: RE: [turba] Address book import question
An: 'Jan Schneider' <jan at horde.org>
> -----Original Message-----
> From: turba-bounces at lists.horde.org [mailto:turba-
> bounces at lists.horde.org] On Behalf Of Jan Schneider
> Sent: Monday, August 03, 2009 4:46 AM
> To: turba at lists.horde.org
> Subject: Re: [turba] Address book import question
>
> Zitat von Aria Bamdad <aria at bsc.gwu.edu>:
>
> > Hi,
> >
> > I export data from a database, a list of company employees and other
> > information into a CSV file and then import into a public shared read
> only
> > address book that is available to all IMP users. I import the CSV
> into
> > Turba using the Import/Export web interface and select 'Replace
> exiting
> > address book with the imported one' so that employees who have left
> are
> > automatically removed.
> >
> > This works fine as long as you just reference the address book from
> IMP
> > accounts. However, the bad side effect of doing a delete before the
> import
> > is that if any IMP user were to create a personal 'Contact List' or
> > distribution list and then include any member from the 'public'
> shared
> > address book, then the next time the public address book is purged
> and new
> > records are imported into it, all the Contact Lists that used entries
> from
> > the public address book will lose those individuals who were from the
> public
> > list.
> >
> > I understand the technical reasons why this is happening. Now for
> the
> > questions:
> >
> > 1-Does anyone have a script that can import and replace existing
> records AND
> > remove any records that do not exist in the source CSV file from the
> Turba
> > database?
> >
> > 2-Would it make more sense for the Turba import interface to allow
> you to do
> > an intelligent import where the above problem can be avoided?
> Replace
> > records that match based on a specific field and delete all others
> that had
> > no match from the database. This could be another option in addition
> to the
> > one that deletes all records first.
>
> Since import is in 99% of the cases a one-time action, it's not really
> worth to spend so much time on solving all the issues and problems
> that arise from such a solution. How exactly do you identify
> duplicates, how to deal with conflicts? To only name two of those.
>
> Jan.
>
Totally agree but it doesn't have to be that sophisticated. If we assume
the new import is a complete list of records, and ask which field is used to
identify the records for comparison then if a record in the import file
matches a record in the database, we replace the database record with the
new one leaving the key that is used to point to user address books alone.
If the record doesn't match, we add the record. At the end of import, we
delete all records that were not touched.
This comes in handy when your contact information comes from an existing
company database. I guess I could write an external script to do this but
was wondering if anyone had already.
Thanks.
----- Ende der weitergeleiteten Nachricht -----
Jan.
--
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digitale PGP-Unterschrift
URL: <http://lists.horde.org/archives/turba/attachments/20090803/b5273171/attachment.bin>
More information about the turba
mailing list