Skip to content

Commit

Permalink
Added missing commands in data-registry-ingest.sh
Browse files Browse the repository at this point in the history
- remove double print(count)
  • Loading branch information
Kevin Ngai committed Jul 4, 2024
1 parent 7ad3e00 commit f97ce03
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 40 deletions.
84 changes: 45 additions & 39 deletions data-registry-ingest.sh
Original file line number Diff line number Diff line change
@@ -1,54 +1,60 @@
# The purpose of this script is to ingest all of the operational WOUDC Archive datasets and rename the generated ingest reports to avoid overwriting
# Inital setup and table initialization of WOUDC Data Registry is required to run this script
# Replace YYYY-MM-DD with today's date before proceeding

woudc-data-registry data ingest /path/to/TotalOzone_1.0_1 -y -r /path/to/operator/report
mv /path/to/operator/report/operator-report.csv /path/to/operator/report/TotalOzone_1.0_1.csv
mv /path/to/operator/report/run_report /path/to/operator/report/TotalOzone_1.0_1_run_report
woudc-data-registry data ingest /apps/data/web/woudc-archive/Archive-NewFormat/TotalOzone_1.0_1 -y -r /apps/data/wdr-ingest/YYYY-MM-DD
mv /apps/data/wdr-ingest/YYYY-MM-DD/operator-report.csv /apps/data/wdr-ingest/YYYY-MM-DD/TotalOzone_1.0_1.csv
mv /apps/data/wdr-ingest/YYYY-MM-DD/run_report /apps/data/wdr-ingest/YYYY-MM-DD/TotalOzone_1.0_1_run_report

woudc-data-registry data ingest /path/to/TotalOzone_2.0_1 -y -r /path/to/operator/report
mv /path/to/operator/report/operator-report.csv /path/to/operator/report/TotalOzone_2.0_1.csv
mv /path/to/operator/report/run_report /path/to/operator/report/TotalOzone_2.0_1_run_report
# woudc-data-registry data ingest /apps/data/web/woudc-archive/Archive-NewFormat/TotalOzone_2.0_1 -y -r /apps/data/wdr-ingest/YYYY-MM-DD
# mv /apps/data/wdr-ingest/YYYY-MM-DD/operator-report.csv /apps/data/wdr-ingest/YYYY-MM-DD/TotalOzone_2.0_1.csv
# mv /apps/data/wdr-ingest/YYYY-MM-DD/run_report /apps/data/wdr-ingest/YYYY-MM-DD/TotalOzone_2.0_1_run_report

woudc-data-registry data ingest /path/to/Broad-band_1.0_1 -y -r /path/to/operator/report
mv /path/to/operator/report/operator-report.csv /path/to/operator/report/Broad-band_1.0_1.csv
mv /path/to/operator/report/run_report /path/to/operator/report/Broad-band_1.0_1_run_report
# woudc-data-registry data ingest /apps/data/web/woudc-archive/Archive-NewFormat/Broad-band_1.0_1 -y -r /apps/data/wdr-ingest/YYYY-MM-DD
# mv /apps/data/wdr-ingest/YYYY-MM-DD/operator-report.csv /apps/data/wdr-ingest/YYYY-MM-DD/Broad-band_1.0_1.csv
# mv /apps/data/wdr-ingest/YYYY-MM-DD/run_report /apps/data/wdr-ingest/YYYY-MM-DD/Broad-band_1.0_1_run_report

woudc-data-registry data ingest /path/to/Broad-band_2.0_1 -y -r /path/to/operator/report
mv /path/to/operator/report/operator-report.csv /path/to/operator/report/Broad-band_2.0_1.csv
mv /path/to/operator/report/run_report /path/to/operator/report/Broad-band_2.0_1_run_report
woudc-data-registry data ingest /apps/data/web/woudc-archive/Archive-NewFormat/Broad-band_2.0_1 -y -r /apps/data/wdr-ingest/YYYY-MM-DD
mv /apps/data/wdr-ingest/YYYY-MM-DD/operator-report.csv /apps/data/wdr-ingest/YYYY-MM-DD/Broad-band_2.0_1.csv
mv /apps/data/wdr-ingest/YYYY-MM-DD/run_report /apps/data/wdr-ingest/YYYY-MM-DD/Broad-band_2.0_1_run_report

woudc-data-registry data ingest /path/to/Lidar_1.0_1 -y -r /path/to/operator/report
mv /path/to/operator/report/operator-report.csv /path/to/operator/report/Lidar_1.0_1.csv
mv /path/to/operator/report/run_report /path/to/operator/report/Lidar_1.0_1_run_report
woudc-data-registry data ingest /apps/data/web/woudc-archive/Archive-NewFormat/Lidar_1.0_1 -y -r /apps/data/wdr-ingest/YYYY-MM-DD
mv /apps/data/wdr-ingest/YYYY-MM-DD/operator-report.csv /apps/data/wdr-ingest/YYYY-MM-DD/Lidar_1.0_1.csv
mv /apps/data/wdr-ingest/YYYY-MM-DD/run_report /apps/data/wdr-ingest/YYYY-MM-DD/Lidar_1.0_1_run_report

woudc-data-registry data ingest /path/to/Multi-band_1.0_1 -y -r /path/to/operator/report
mv /path/to/operator/report/operator-report.csv /path/to/operator/report/Multi-band_1.0_1.csv
mv /path/to/operator/report/run_report /path/to/operator/report/Multi-band_1.0_1_run_report
# woudc-data-registry data ingest /apps/data/web/woudc-archive/Archive-NewFormat/Multi-band_1.0_1 -y -r /apps/data/wdr-ingest/YYYY-MM-DD
# mv /apps/data/wdr-ingest/YYYY-MM-DD/operator-report.csv /apps/data/wdr-ingest/YYYY-MM-DD/Multi-band_1.0_1.csv
# mv /apps/data/wdr-ingest/YYYY-MM-DD/run_report /apps/data/wdr-ingest/YYYY-MM-DD/Multi-band_1.0_1_run_report

woudc-data-registry data ingest /path/to/RocketSonde_1.0_1 -y -r /path/to/operator/report
mv /path/to/operator/report/operator-report.csv /path/to/operator/report/RocketSonde_1.0_1.csv
mv /path/to/operator/report/run_report /path/to/operator/report/RocketSonde_1.0_1_run_report
woudc-data-registry data ingest /apps/data/web/woudc-archive/Archive-NewFormat/RocketSonde_1.0_1 -y -r /apps/data/wdr-ingest/YYYY-MM-DD
mv /apps/data/wdr-ingest/YYYY-MM-DD/operator-report.csv /apps/data/wdr-ingest/YYYY-MM-DD/RocketSonde_1.0_1.csv
mv /apps/data/wdr-ingest/YYYY-MM-DD/run_report /apps/data/wdr-ingest/YYYY-MM-DD/RocketSonde_1.0_1_run_report

woudc-data-registry data ingest /path/to/OzoneSonde_1.0_1 -y -r /path/to/operator/report
mv /path/to/operator/report/operator-report.csv /path/to/operator/report/OzoneSonde_1.0_1.csv
mv /path/to/operator/report/run_report /path/to/operator/report/OzoneSonde_1.0_1_run_report
# woudc-data-registry data ingest /apps/data/web/woudc-archive/Archive-NewFormat/OzoneSonde_1.0_1 -y -r /apps/data/wdr-ingest/YYYY-MM-DD
# mv /apps/data/wdr-ingest/YYYY-MM-DD/operator-report.csv /apps/data/wdr-ingest/YYYY-MM-DD/OzoneSonde_1.0_1.csv
# mv /apps/data/wdr-ingest/YYYY-MM-DD/run_report /apps/data/wdr-ingest/YYYY-MM-DD/OzoneSonde_1.0_1_run_report

woudc-data-registry data ingest /path/to/TotalOzoneObs_1.0_1 -y -r /path/to/operator/report
mv /path/to/operator/report/operator-report.csv /path/to/operator/report/TotalOzoneObs_1.0_1.csv
mv /path/to/operator/report/run_report /path/to/operator/report/TotalOzoneObs_1.0_1_run_report
woudc-data-registry data ingest /apps/data/web/woudc-archive/Archive-NewFormat/TotalOzoneObs_1.0_1 -y -r /apps/data/wdr-ingest/YYYY-MM-DD
mv /apps/data/wdr-ingest/YYYY-MM-DD/operator-report.csv /apps/data/wdr-ingest/YYYY-MM-DD/TotalOzoneObs_1.0_1.csv
mv /apps/data/wdr-ingest/YYYY-MM-DD/run_report /apps/data/wdr-ingest/YYYY-MM-DD/TotalOzoneObs_1.0_1_run_report

woudc-data-registry data ingest /path/to/Spectral_1.0_1 -y -r /path/to/operator/report
mv /path/to/operator/report/operator-report.csv /path/to/operator/report/Spectral_1.0_1.csv
mv /path/to/operator/report/run_report /path/to/operator/report/Spectral_1.0_1_run_report
woudc-data-registry data ingest /apps/data/web/woudc-archive/Archive-NewFormat/Spectral_1.0_1 -y -r /apps/data/wdr-ingest/YYYY-MM-DD
mv /apps/data/wdr-ingest/YYYY-MM-DD/operator-report.csv /apps/data/wdr-ingest/YYYY-MM-DD/Spectral_1.0_1.csv
mv /apps/data/wdr-ingest/YYYY-MM-DD/run_report /apps/data/wdr-ingest/YYYY-MM-DD/Spectral_1.0_1_run_report

woudc-data-registry data ingest /path/to/Spectral_2.0_1 -y -r /path/to/operator/report
mv /path/to/operator/report/operator-report.csv /path/to/operator/report/Spectral_2.0_1.csv
mv /path/to/operator/report/run_report /path/to/operator/report/Spectral_2.0_1_run_report
woudc-data-registry data ingest /apps/data/web/woudc-archive/Archive-NewFormat/Spectral_2.0_1 -y -r /apps/data/wdr-ingest/YYYY-MM-DD
mv /apps/data/wdr-ingest/YYYY-MM-DD/operator-report.csv /apps/data/wdr-ingest/YYYY-MM-DD/Spectral_2.0_1.csv
mv /apps/data/wdr-ingest/YYYY-MM-DD/run_report /apps/data/wdr-ingest/YYYY-MM-DD/Spectral_2.0_1_run_report

woudc-data-registry data ingest /path/to/UmkehrN14_1.0_1 -y -r /path/to/operator/report
mv /path/to/operator/report/operator-report.csv /path/to/operator/report/UmkehrN14_1.0_1.csv
mv /path/to/operator/report/run_report /path/to/operator/report/UmkehrN14_1.0_1_run_report
woudc-data-registry data ingest /apps/data/web/woudc-archive/Archive-NewFormat/UmkehrN14_1.0_1 -y -r /apps/data/wdr-ingest/YYYY-MM-DD
mv /apps/data/wdr-ingest/YYYY-MM-DD/operator-report.csv /apps/data/wdr-ingest/YYYY-MM-DD/UmkehrN14_1.0_1.csv
mv /apps/data/wdr-ingest/YYYY-MM-DD/run_report /apps/data/wdr-ingest/YYYY-MM-DD/UmkehrN14_1.0_1_run_report

woudc-data-registry data ingest /path/to/UmkehrN14_2.0_1 -y -r /path/to/operator/report
mv /path/to/operator/report/operator-report.csv /path/to/operator/report/UmkehrN14_2.0_1.csv
mv /path/to/operator/report/run_report /path/to/operator/report/UmkehrN14_2.0_1_run_report
woudc-data-registry data ingest /apps/data/web/woudc-archive/Archive-NewFormat/UmkehrN14_2.0_1 -y -r /apps/data/wdr-ingest/YYYY-MM-DD
mv /apps/data/wdr-ingest/YYYY-MM-DD/operator-report.csv /apps/data/wdr-ingest/YYYY-MM-DD/UmkehrN14_2.0_1.csv
mv /apps/data/wdr-ingest/YYYY-MM-DD/run_report /apps/data/wdr-ingest/YYYY-MM-DD/UmkehrN14_2.0_1_run_report

## Table generation process into registry for totalozone, uv-index and ozonesonde
woudc-data-registry product totalozone generate -y /apps/data/web/woudc-archive/Archive-NewFormat/
woudc-data-registry product uv-index generate -y /apps/data/web/woudc-archive/Archive-NewFormat/
woudc-data-registry product ozonesonde generate -y /apps/data/web/woudc-archive/Archive-NewFormat/
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,6 @@ def execute(path, bypass):

LOGGER.debug('Done get_data().')
print(count)
print(count)


def conv(i):
Expand Down

0 comments on commit f97ce03

Please sign in to comment.