From 8ff7a12f4b36de02ee914355532a64efee03d7c0 Mon Sep 17 00:00:00 2001 From: Robert Doiel Date: Tue, 15 Oct 2024 09:36:34 -0700 Subject: [PATCH] fixed columns in rpt for people and groups --- .gitignore | 1 + rpt_groups_csv.bash | 6 ++---- rpt_people_csv.bash | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index b8e9b2e..4dae208 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ cdh.yaml cold_directory_sync.yaml logs/* groups_rpt.sql +*_final.csv diff --git a/rpt_groups_csv.bash b/rpt_groups_csv.bash index e8688d0..8202b7b 100755 --- a/rpt_groups_csv.bash +++ b/rpt_groups_csv.bash @@ -1,5 +1,5 @@ #!/bin/bash - +cd /Sites/cold # { # "Scope": "", # "activity": "active", @@ -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 diff --git a/rpt_people_csv.bash b/rpt_people_csv.bash index dc760a9..a852647 100755 --- a/rpt_people_csv.bash +++ b/rpt_people_csv.bash @@ -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