fredcli batch get-results

Retrieve the results created for a given batch.


fredcli batch get-results

Downloads the results associated with batch_id from S3.

Previously this command accepted a job_key rather than batch_id as argument. Passing job keys to retrieve complete result sets will continue to work for backwards compatibility, but is considered deprecated. Retrieval of a single file with the –file option only works with a batch_id.

fredcli batch get-results <options> BATCH_ID


-f, --file <file>

Path to a single file to download from the results for batch_id, relative to the root of the results directory. E.g. JOB/1/OUT/RUN1/CSV/infections.csv.

-p, --path <path>

Path to the target directory where the results should be saved, relative to the current directory.





Required argument


This command downloads the results generated for a batch.

By default, the entire results directory is downloaded. If the --file option is specified, then only the single file specified by the path given to this option is downloaded. The file given for this option must be relative to the results directory for the given batch.

Also by default, the results directory for the task associated with the given batch is downloaded to the current working directory If the --path option is specified, then the results are downloaded to the path specified by this option instead. The given path must be a valid directory. If either case, a directory matching the batch id is created, under which the results directory is placed.


Here is an example of downloading the full results for a batch. In this example, the entire results directory would be stored in a created subdirectory eef4b59153ac480084a7ece647d855a9.

$ fredcli batch get-results eef4b59153ac480084a7ece647d855a9
Results unzipped and available as: eef4b59153ac480084a7ece647d855a9

As another example, the following command would retrieve just the total exposed results for this same batch. Note how the file path starts with the JOB directory. This result is available in the path eef4b59153ac480084a7ece647d855a9/results/JOB/1/OUT/PLOT/DAILY/INFLUENZA.totExposed.csv.

$ fredcli batch get-results eef4b59153ac480084a7ece647d855a9 \
  --file JOB/1/OUT/PLOT/DAILY/INFLUENZA.totExposed.csv
Results unzipped and available as: eef4b59153ac480084a7ece647d855a9