1#!/usr/bin/env cwl-runner
2
3cwlVersion: v1.1
4class: Workflow
5
6requirements:
7 SubworkflowFeatureRequirement: {}
8 StepInputExpressionRequirement: {}
9 InlineJavascriptRequirement: {}
10 ScatterFeatureRequirement: {}
11
12inputs:
13 database:
14 type: File
15 doc: Path to database connection file, usually database.ini
16 connection_name:
17 type: string
18 doc: The name of the section in the database.ini file
19 registry: File
20 data_files: File[]
21
22steps:
23 store:
24 run:
25 class: Workflow
26 inputs:
27 db:
28 type: File
29 connection:
30 type: string
31 schema:
32 type: File
33 data:
34 type: File
35 table:
36 type: string
37 outputs:
38 ingest_log:
39 type: File
40 outputSource: ingest/log
41 index_log:
42 type: File
43 outputSource: index/log
44 vacuum_log:
45 type: File
46 outputSource: vacuum/log
47 ingest_err:
48 type: File
49 outputSource: ingest/errors
50 index_err:
51 type: File
52 outputSource: index/errors
53 vacuum_err:
54 type: File
55 outputSource: vacuum/errors
56 steps:
57 ingest:
58 run: ingest.cwl
59 doc: Uploads data into the database
60 in:
61 registry: schema
62 domain:
63 valueFrom: "census"
64 table: table
65 input: data
66 database: db
67 connection_name: connection
68 out: [log, errors]
69 index:
70 run: index.cwl
71 in:
72 depends_on: ingest/log
73 registry: schema
74 domain:
75 valueFrom: "census"
76 table: table
77 database: db
78 connection_name: connection
79 out: [log, errors]
80 vacuum:
81 run: vacuum.cwl
82 in:
83 depends_on: index/log
84 domain:
85 valueFrom: "census"
86 registry: schema
87 table: table
88 database: db
89 connection_name: connection
90 out: [log, errors]
91 scatter: data
92 in:
93 data: data_files
94 db: database
95 connection: connection_name
96 schema: registry
97 table:
98 valueFrom: $(inputs.data.nameroot)
99 out:
100 - ingest_log
101 - index_log
102 - vacuum_log
103 - ingest_err
104 - index_err
105 - vacuum_err
106
107outputs:
108 ingest_log:
109 type: File[]
110 outputSource: store/ingest_log
111 index_log:
112 type: File[]
113 outputSource: store/index_log
114 vacuum_log:
115 type: File[]
116 outputSource: store/vacuum_log
117 ingest_errors:
118 type: File[]
119 outputSource: store/ingest_err
120 index_errors:
121 type: File[]
122 outputSource: store/index_err
123 vacuum_errors:
124 type: File[]
125 outputSource: store/vacuum_err