Downloads the data for jobs that have an associated file, such as a query's results. Called on Jobs
that are the results of a project forecast or truth queries via submit_query()
. NB: It is a 404 Not Found
error if this is called on a Job that has no underlying S3 data file, which can happen b/c: 1) 24 hours has
passed (the expiration time) or 2) the Job is not complete and therefore has not saved the data file. For
the latter you may use busy_poll_job()
to ensure the job is done.
job_data(zoltar_connection, job_url, query_type)
A ZoltarConnection
object as returned by new_connection()
URL of a valid job in zoltar_connection that has a data file associated with it
A character indicating the type of query to run. Must be one of: "forecasts" or "truth".
A data.frame
of Job's data. The columns depend on query_type - see
https://docs.zoltardata.com/fileformats/#truth-data-format-csv and
https://docs.zoltardata.com/fileformats/#forecast-data-format-csv.
if (FALSE) {
the_job_data <- job_data(conn, "http://example.com/api/job/2/")
}