-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
R. S. Doiel
committed
Feb 12, 2025
1 parent
832d727
commit 725c2de
Showing
2 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
if [ -d /Sites/cold ]; then cd /Sites/cold; fi | ||
cat <<SQL >division_people_rpt.sql | ||
select | ||
json_object( | ||
'division', src->'division', | ||
'clpid', src->'clpid', | ||
'orcid', src->'orcid', | ||
'family_name', src->'family_name', | ||
'given_name', src->'given_name' | ||
) as src | ||
from people | ||
where src->'division' is not null | ||
and src->>'division' <> '' | ||
order by src->>'division', src->>'family_name', src->>'given_name' | ||
SQL | ||
|
||
dsquery \ | ||
-csv "division,clpid,orcid,family_name,given_name" \ | ||
-sql division_people_rpt.sql \ | ||
people.ds \ | ||
>division_people.csv | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
# | ||
dsquery \ | ||
-csv "division,clpid,orcid,family_name,given_name" \ | ||
-sql division_people_rpt.sql \ | ||
people.ds |