Skip to content

Commit

Permalink
fixed columns in rpt for people and groups
Browse files Browse the repository at this point in the history
  • Loading branch information
rsdoiel committed Oct 15, 2024
1 parent 8cda960 commit 8ff7a12
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ cdh.yaml
cold_directory_sync.yaml
logs/*
groups_rpt.sql
*_final.csv
6 changes: 2 additions & 4 deletions rpt_groups_csv.bash
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash

cd /Sites/cold
# {
# "Scope": "",
# "activity": "active",
Expand Down Expand Up @@ -57,6 +57,4 @@ from groups
order by src->'name'
SQL
dsquery -csv "key,name,alternative,email,date,description,start,approx_start,activity,end,approx_end,website,pi,parent,prefix,grid,isni,ringold,viaf,ror,updated,Scope" -sql groups_rpt.sql groups.ds
#>groups.csv
dsquery -csv "key,name,alternative,email,date,description,start,approx_start,activity,end,approx_end,website,pi,parent,prefix,grid,isni,ringold,viaf,ror,updated,Scope" -sql groups_rpt.sql groups.ds >groups.csv
4 changes: 2 additions & 2 deletions rpt_people_csv.bash
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash

dsquery -csv "family_name,given_name,cl_people_id,thesis_id,advisor_id,authors_id,archivesspace_id,directory_id,viaf_id,lcnaf,isni,wikidata,orcid,image,educated_at,caltech,jpl,faculty,alumn,status,directory_person_type,title,bio,division,authors_count,thesis_count,data_count,advisor_count,editor_count,updated,is_in_feeds" people.ds "select json_object( 'family_name', src->'family_name', 'given_name', src->'given_name', 'cl_people_id', src->'clpid', 'thesis_id', src->'thesis_id', 'advisor_id', src->'advisor_id', 'authors_id', src->'authors_id', 'archivesspace_id', src->'archivesspace_id', 'directory_id', src->'directory_user_id', 'viaf_id', src->'viaf', 'lcnaf', src->'lcnaf', 'isni', src->'isni', 'wikidata', src->'wikidata', 'orcid', src->'orcid', 'image', '', 'educated_at', src->'educated_at', 'caltech', src->'caltech', 'jpl', src->'jpl', 'faculty', src->'faculty', 'alumn', src->'alumn', 'status', src->'status', 'directory_person_type', src->'directory_person_type', 'title', src->'title', 'bio', src->'bio', 'division', src->'division', 'authors_count', '', 'thesis_count', '', 'data_count', '', 'advisor_count', '', 'editor_count', '', 'updated', '', 'include_in_feeds', src->'include_in_feeds') as src from people order by src->'family_name', src->'given_name'" >people.csv
cd /Sites/cold
dsquery -csv "family_name,given_name,cl_people_id,thesis_id,advisor_id,authors_id,archivesspace_id,directory_id,viaf_id,lcnaf,isni,wikidata,snac,orcid,image,educated_at,caltech,jpl,faculty,alumn,status,directory_person_type,title,bio,division,authors_count,thesis_count,data_count,advisor_count,editor_count,updated,include_in_feeds" people.ds "select json_object( 'family_name', src->'family_name', 'given_name', src->'given_name', 'cl_people_id', src->'clpid', 'thesis_id', src->'thesis_id', 'advisor_id', src->'advisor_id', 'authors_id', src->'authors_id', 'archivesspace_id', src->'archivesspace_id', 'directory_id', src->'directory_user_id', 'viaf_id', src->'viaf', 'lcnaf', src->'lcnaf', 'isni', src->'isni', 'wikidata', src->'wikidata', 'snac', src->'snac', 'orcid', src->'orcid', 'image', '', 'educated_at', src->'educated_at', 'caltech', src->'caltech', 'jpl', src->'jpl', 'faculty', src->'faculty', 'alumn', src->'alumn', 'status', src->'status', 'directory_person_type', src->'directory_person_type', 'title', src->'title', 'bio', src->'bio', 'division', src->'division', 'authors_count', '', 'thesis_count', '', 'data_count', '', 'advisor_count', '', 'editor_count', '', 'updated', '', 'include_in_feeds', src->'include_in_feeds') as src from people order by src->'family_name', src->'given_name'" >people.csv

0 comments on commit 8ff7a12

Please sign in to comment.