Project

General

Profile

« Previous | Next » 

Revision 7296

update creator and publisher using LDAP dump. unfortunately LDAP has shifted over the years and not all identities are still active in LDAP...but we did get quite a few creator names updated!
https://redmine.dataone.org/issues/2815

View differences:

src/doi_registration.sql
374 374
where resourceMapId is not null;
375 375

  
376 376
--update creator usinig LDAP lookup
377
CREATE TABLE ecoinfo_dn (dn text, givenName text, sn text);
378
COPY ecoinfo_dn FROM '/tmp/ecoinfo_dn.csv' WITH CSV HEADER;
377 379

  
380
update doi_registration
381
set creator = givenName|| ' ' || sn
382
from ecoinfo_dn
383
where creator = dn;
384

  
385
update doi_registration
386
set publisher = givenName|| ' ' || sn
387
from ecoinfo_dn
388
where publisher = dn;
389

  
390
select creator, count(*) as cnt
391
from doi_registration
392
where creator like 'uid=%'
393
group by creator
394
order by cnt desc;
395

  
378 396
-- copy to the external file
379 397
COPY 
380 398
(select ezid_account, 
......
392 410
resourceMapLocation,
393 411
access
394 412
from doi_registration 
395
order by doi) 
413
order by dc_identifier) 
396 414
TO '/tmp/doi_registration.csv'
397 415
WITH CSV HEADER;
398 416
--164548
399 417

  
400 418
--drop table doi_registration;
401 419
--drop table ecogrid_docids;
420
--drop table ecoinfo_dn;
402 421

  

Also available in: Unified diff