example1.cwl

  1#!/usr/bin/env cwl-runner
  2
  3cwlVersion: v1.2
  4class: Workflow
  5
  6requirements:
  7  SubworkflowFeatureRequirement: {}
  8  StepInputExpressionRequirement: {}
  9  InlineJavascriptRequirement: {}
 10  ScatterFeatureRequirement: {}
 11  MultipleInputFeatureRequirement: {}
 12  NetworkAccess:
 13    networkAccess: True
 14inputs:
 15  band:
 16    type: string
 17  date:
 18    type: string
 19  geography:
 20    type: string
 21  database:
 22    type: File
 23    default:
 24      class: File
 25      location: https://raw.githubusercontent.com/ForomePlatform/dorieh/refs/heads/main/examples/with-postgres/database.ini
 26  connection_name:
 27    type: string
 28    default: "localhost"
 29
 30steps:
 31  extract_year:
 32    run: https://raw.githubusercontent.com/ForomePlatform/dorieh/main/src/cwl/parse_date.cwl
 33    in:
 34      date: date
 35    out:
 36      - year
 37
 38  download:
 39    run: https://raw.githubusercontent.com/ForomePlatform/dorieh/main/src/cwl/download.cwl
 40    in:
 41      year: extract_year/year
 42      band: band
 43    out:
 44      - log
 45      - data
 46      - errors
 47
 48  get_shapes:
 49    run: https://raw.githubusercontent.com/ForomePlatform/dorieh/main/src/cwl/get_shapes.cwl
 50    in:
 51      geo: geography
 52      year: extract_year/year
 53    out:
 54      - shape_files
 55
 56  aggregate:
 57    run: https://raw.githubusercontent.com/ForomePlatform/dorieh/main/src/cwl/aggregate_daily.cwl
 58    in:
 59      geography: geography
 60      year: extract_year/year
 61      dates: date
 62      band: band
 63      input: download/data
 64      shape_files: get_shapes/shape_files
 65      strategy:
 66        valueFrom: default
 67    out:
 68      - log
 69      - data
 70      - errors
 71
 72  initdb:
 73    run: https://raw.githubusercontent.com/ForomePlatform/dorieh/main/src/cwl/initcoredb.cwl
 74    in:
 75      database: database
 76      connection_name: connection_name
 77    out:
 78      - log
 79      - err
 80
 81  ingest:
 82    run: https://raw.githubusercontent.com/ForomePlatform/dorieh/main/src/cwl/ingest.cwl
 83    in:
 84      depends_on: initdb/log
 85      registry:
 86        default:
 87          class: File
 88          location: "https://raw.githubusercontent.com/ForomePlatform/dorieh/main/doc/tutorial/climate/example1_model.yml"
 89      domain:
 90        valueFrom: "tutorial"
 91      table:
 92        valueFrom: "bronze_temperature"
 93      input: aggregate/data
 94      database: database
 95      connection_name: connection_name
 96    out:
 97      - log
 98      - errors
 99
100  build_silver:
101    run: https://raw.githubusercontent.com/ForomePlatform/dorieh/main/src/cwl/create.cwl
102    in:
103      depends_on: ingest/log
104      registry:
105        default:
106          class: File
107          location: "https://raw.githubusercontent.com/ForomePlatform/dorieh/main/doc/tutorial/climate/example1_model.yml"
108      domain:
109        valueFrom: "tutorial"
110      table:
111        valueFrom: "silver_temperature"
112      database: database
113      connection_name: connection_name
114    out:
115      - log
116      - errors
117
118  build_gold:
119    run: https://raw.githubusercontent.com/ForomePlatform/dorieh/main/src/cwl/create.cwl
120    in:
121      depends_on: build_silver/log
122      registry:
123        default:
124          class: File
125          location: "https://raw.githubusercontent.com/ForomePlatform/dorieh/main/doc/tutorial/climate/example1_model.yml"
126      domain:
127        valueFrom: "tutorial"
128      table:
129        valueFrom: "gold_temperature_by_state"
130      database: database
131      connection_name: connection_name
132    out:
133      - log
134      - errors
135
136
137outputs:
138  ## Generated by dorieh.platform.util.cwl_collect_outputs from download.cwl:
139  download_log:
140    type: File?
141    outputSource: download/log
142  download_data:
143    type: File?
144    outputSource: download/data
145  download_errors:
146    type: File
147    outputSource: download/errors
148  ## Generated by dorieh.platform.util.cwl_collect_outputs from get_shapes.cwl:
149  get_shapes_shape_files:
150    type: File[]
151    outputSource: get_shapes/shape_files
152  ## Generated by dorieh.platform.util.cwl_collect_outputs from aggregate_daily.cwl:
153  aggregate_log:
154    type: File?
155    outputSource: aggregate/log
156  aggregate_data:
157    type: File?
158    outputSource: aggregate/data
159  aggregate_errors:
160    type: File
161    outputSource: aggregate/errors
162
163  initdb_log:
164    type: File
165    outputSource: initdb/log
166  initdb_err:
167    type: File
168    outputSource: initdb/err
169
170  ingest_log:
171    type: File
172    outputSource: ingest/log
173  ingest_err:
174    type: File
175    outputSource: ingest/errors
176
177  build_silver_log:
178    type: File
179    outputSource: build_silver/log
180  build_silver_err:
181    type: File
182    outputSource: build_silver/errors
183
184  build_gold_log:
185    type: File
186    outputSource: build_gold/log
187  build_gold_err:
188    type: File
189    outputSource: build_gold/errors