|
1 | | -# Add input granules task |
2 | | -## Purpose |
3 | | -This task will add the `input_granules` field to the cumulus output message. It uses the execution |
4 | | -lists (running, failed, completed) in the payload to gather the granules |
| 1 | +# @cumulus/add-input-granules |
| 2 | + |
| 3 | +This task adds a list of granules processed by child ingest executions to its output message. It uses the [Cumulus Python API](https://github.com/nasa/Cumulus-API-Python) to fetch granule information. |
| 4 | + |
| 5 | +## Usage |
| 6 | +This task is intended to be used as part of PDR workflows. It is run after all ingest workflows are completed and prior to granule cleanup tasks to which it provides input granules. |
| 7 | + |
| 8 | +### Input |
| 9 | + |
| 10 | +| field name | type | default | required | values | description |
| 11 | +| ---------- | ---- | ------- | -------- | ------ | ----------- |
| 12 | +| pdr | object | N/A | yes | N/A | Product Delivery Record |
| 13 | +| pdr.name | string | N/A | yes | N/A | PDR filename |
| 14 | +| pdr.path | string | N/A | yes | N/A | PDR location |
| 15 | +| pdr.archivePath | string | N/A | yes | N/A | Archived PDR location |
| 16 | +| running | array[string] | N/A | yes | N/A | List of queued and running workflow execution ARNS |
| 17 | +| completed | array[string] | N/A | yes | N/A | List of completed workflow execution ARNs |
| 18 | +| failed | array[object] | N/A | yes | N/A | List of failed workflow ARNs and reason for failure |
| 19 | +| failed[].arn | string | N/A | yes | N/A | Failed execution ARN |
| 20 | +| failed[].reason | string | N/A | yes | N/A | Reason for workflow failure |
| 21 | + |
| 22 | +### Output |
| 23 | + |
| 24 | +| field name | type | default | required | values | description |
| 25 | +| ---------- | ---- | ------- | -------- | ------ | ----------- |
| 26 | +| pdr | object | N/A | yes | N/A | Product Delivery Record |
| 27 | +| pdr.name | string | N/A | yes | N/A | PDR filename |
| 28 | +| pdr.path | string | N/A | yes | N/A | PDR location |
| 29 | +| pdr.archivePath | string | N/A | yes | N/A | Archived PDR location |
| 30 | +| running | array[string] | N/A | yes | N/A | List of queued and running workflow execution ARNS |
| 31 | +| completed | array[string] | N/A | yes | N/A | List of completed workflow execution ARNs |
| 32 | +| failed | array[object] | N/A | yes | N/A | List of failed workflow ARNs and reason for failure |
| 33 | +| failed[].arn | string | N/A | yes | N/A | Failed execution ARN |
| 34 | +| failed[].reason | string | N/A | yes | N/A | Reason for workflow failure |
| 35 | +| granules | array[object] | N/A | yes | N/A | List of granules |
| 36 | +| granules[].granuleId | string | N/A | yes | N/A | Granule ID |
| 37 | +| granules[].files | array[object] | N/A | yes | N/A | List of files associated with granule |
| 38 | +| granules[].files[].bucket | string | N/A | yes | N/A | Bucket where file is archived in S3 |
| 39 | +| granules[].files[].checksum | string | N/A | no | N/A | Checksum value for file |
| 40 | +| granules[].files[].fileName | string | N/A | no | N/A | Name of file (e.g. file.txt) |
| 41 | +| granules[].files[].key | string | N/A | yes | N/A | S3 Key for archived file |
| 42 | +| granules[].files[].size | integer | N/A | no | N/A | Size of file (in bytes) |
| 43 | +| granules[].files[].source | string | N/A | no | N/A | Source URI of the file from origin system (e.g. S3, FTP, HTTP) |
| 44 | +| granules[].files[].type | string | N/A | no | N/A | Type of file (e.g. data, metadata, browse) |
| 45 | + |
| 46 | +### Example workflow configuration and use |
| 47 | + |
| 48 | + |
| 49 | +### Internal Dependencies |
| 50 | + |
| 51 | +This task uses the Cumulus Private API Lambda via the Cumulus Python API and requires the `PRIVATE_API_LAMBDA_ARN` environment variable to be set. |
| 52 | + |
| 53 | +### External Dependencies |
| 54 | + |
| 55 | + - https://github.com/nasa/Cumulus-API-Python |
| 56 | + - https://github.com/nasa/cumulus-message-adapter |
| 57 | + - https://github.com/nasa/cumulus-message-adapter-python |
| 58 | + |
| 59 | +## Contributing |
| 60 | + |
| 61 | +To make a contribution, please [see our Cumulus contributing guidelines](https://github.com/nasa/cumulus/blob/master/CONTRIBUTING.md) and our documentation on [adding a task](https://nasa.github.io/cumulus/docs/adding-a-task) |
| 62 | + |
| 63 | +## About Cumulus |
| 64 | + |
| 65 | +Cumulus is a cloud-based data ingest, archive, distribution and management prototype for NASA's future Earth science data streams. |
| 66 | + |
| 67 | +[Cumulus Documentation](https://nasa.github.io/cumulus) |
0 commit comments