How do I get the outputs of my job?¶
Users may get the outputs of their job using the Jobs UI or the maap-py client library.
Jobs UI¶
- Open the Jobs UI from the
Jobs
menu then navigate to the Jobs UIView
tab.
- Select your job then under the
Job Details
table, click theOutputs
tab. TheProducts
field provides the path to the product directory within the workspace.
Navigating to the product directory for the selected job above shows the following:
(base) root@workspacelbx1uqgeyqdei83w:~/my-private-bucket/dps_output/run-dps-test_ubuntu/delay10/2023/05/10/15/13/27/250000# pwd
/projects/my-private-bucket/dps_output/run-dps-test_ubuntu/delay10/2023/05/10/15/13/27/250000
(base) root@workspacelbx1uqgeyqdei83w:~/my-private-bucket/dps_output/run-dps-test_ubuntu/delay10/2023/05/10/15/13/27/250000# ls
_stderr.txt _stdout.txt output-2023-05-10T15:13:27.250000.context.json output-2023-05-10T15:13:27.250000.dataset.json output-2023-05-10T15:13:27.250000.met.json write-output.txt
MAAP-py Library¶
- Open a Jupyter Notebook then click the
MAAP
button from the notebook toolbar. This will paste the code snippet below into your notebook.
- Provide the MAAP host. For DIT, this would be
api.dit.maap-project.org
from maap.maap import MAAP
maap = MAAP(maap_host='api.dit.maap-project.org')
- Use the
getJobResult
method and provide the job ID that was created upon job submission.
r = maap.getJobResult("86fbac52-24b0-4963-8b67-59d0fc09946a")
r.text
- Run the notebook to get the job result. The output should resemble the xml snippet below.
<wps:Result xmlns:ows="http://www.opengis.net/ows/2.0" xmlns:schemaLocation="http://schemas.opengis.net/wps/2.0/wps.xsd" xmlns:wps="http://www.opengis.net/wps/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><wps:JobID>86fbac52-24b0-4963-8b67-59d0fc09946a</wps:JobID><wps:Output id="output-2023-05-10T15:39:51.905070"><wps:Data>http://maap-dit-workspace.s3-website-us-west-2.amazonaws.com/anonymous/dps_output/run-dps-test_ubuntu/delay10/2023/05/10/15/39/51/905070</wps:Data><wps:Data>s3://s3-us-west-2.amazonaws.com:80/maap-dit-workspace/anonymous/dps_output/run-dps-test_ubuntu/delay10/2023/05/10/15/39/51/905070</wps:Data><wps:Data>https://s3.console.aws.amazon.com/s3/buckets/maap-dit-workspace/anonymous/dps_output/run-dps-test_ubuntu/delay10/2023/05/10/15/39/51/905070/?region=us-east-1&tab=overview</wps:Data></wps:Output></wps:Result>