-
Notifications
You must be signed in to change notification settings - Fork 12
/
openapi.yaml
2534 lines (2493 loc) · 86.9 KB
/
openapi.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: 3.0.0
info:
version: "0.0.1"
title: Conquery API
description: Conquery API
license:
#TODO find a fitting license
name: TODO
url: http://TODO/
servers:
- url: "http://localhost:8081"
tags:
- name: dataset
- name: concept
- name: query
- name: user
- name: entity-preview
- name: config
- name: frontend
components:
securitySchemes:
BasicAuth:
type: http
scheme: basic
Bearer:
type: http
scheme: bearer
parameters:
Dataset:
in: path
name: dataset
required: true
schema:
$ref: "#/components/schemas/DatasetId"
Query:
in: path
name: query
required: true
schema:
$ref: "#/components/schemas/ExecutionId"
Concept:
in: path
name: concept
required: true
schema:
$ref: "#/components/schemas/ConceptId"
responses:
unauthorized:
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
description: The user is not logged in or misses permissions to access the resource.
schemas:
Id:
description: Typed identifier of an object. Usually consists of a recursive structure separated by dots, starting with the dataset. The dataset can be omitted, when the url is already in a context with a bound dataset.
type: string
TableId:
$ref: "#/components/schemas/Id"
MappingId:
$ref: "#/components/schemas/Id"
DatasetId:
$ref: "#/components/schemas/Id"
FilterId:
$ref: "#/components/schemas/Id"
SelectId:
$ref: "#/components/schemas/Id"
ValidityDateId:
$ref: "#/components/schemas/Id"
ConceptElementId:
$ref: "#/components/schemas/Id"
ConceptId:
$ref: "#/components/schemas/ConceptElementId"
ConnectorId:
$ref: "#/components/schemas/Id"
SecondaryIdId:
$ref: "#/components/schemas/Id"
TemplateId:
$ref: "#/components/schemas/Id"
ColumnId:
$ref: "#/components/schemas/Id"
ExecutionId:
$ref: "#/components/schemas/Id"
UserId:
$ref: "#/components/schemas/Id"
DateTime: #TODO
type: string
# format: date-time TODO not compatible: Value does not conform to the required ISO-8601 datetime format. Invalid value '2022-12-13T13:33:32.455901838Z' for type datetime at
date: #TODO
type: string
format: date
QueryState:
description: Potential states of a query.
type: string
enum:
- NEW
- RUNNING
- FAILED
- DONE
Column:
type: object
properties:
name:
type: string
label:
type: string
type:
$ref: "#/components/schemas/ColumnType"
description:
type: string
minSuffixLength:
type: integer
generateSuffixes:
type: boolean
searchDisabled:
type: boolean
secondaryId:
$ref: "#/components/schemas/SecondaryIdId"
Table:
type: object
properties:
name:
type: string
label:
type: string
columns:
type: array
items:
$ref: "#/components/schemas/Column"
OutputDescriptionBase:
type: object
properties:
name:
description: "Name of the `table.column` to be imported into."
type: string
required:
type: boolean
LineOutput:
description: "Emits the line number. The line-number is not guaranteed to be in file order, just an incrementing unique number: If multiple files are preprocessed, the line-number will not reset to zero."
allOf:
- $ref: "#/components/schemas/OutputDescriptionBase"
- properties:
operation:
type: string
enum: [ LINE ]
NullOutput:
description: "Emits a `null`/NA value. Can be used to unify among multiple input sources with differing file schemas."
allOf:
- $ref: "#/components/schemas/OutputDescriptionBase"
- properties:
operation:
type: string
enum: [ NULL ]
CopyOutput:
description: "Parses and emits the values in inputColumn as the provided type."
allOf:
- $ref: "#/components/schemas/OutputDescriptionBase"
- properties:
inputColumn:
type: string
description: "Name of the csv column to process."
inputType:
$ref: "#/components/schemas/MajorType"
operation:
type: string
enum: [ COPY ]
CompoundDateRangeOutput:
description: "Creates a virtual daterange column as a composite of its neighboring DATE-columns (not csv columns).
This helps avoid copying multiple values of the same column, when they can be reused."
allOf:
- $ref: "#/components/schemas/OutputDescriptionBase"
- properties:
startColumn:
type: string
endColumn:
type: string
allowOpen:
type: boolean
operation:
type: string
enum: [ COMPOUND_DATE_RANGE ]
DateRangeOutput:
description: "Parses `startColumn` and `endColumn` as dates, then emits them as a daterange."
allOf:
- $ref: "#/components/schemas/OutputDescriptionBase"
- properties:
startColumn:
type: string
endColumn:
type: string
allowOpen:
type: boolean
operation:
type: string
enum: [ DATE_RANGE ]
EpochDateRangeOutput:
deprecated: true
description: "Parses `startColumn` and `endColumn` as integers, interpreting them as dates in the Unix-Epoch (i.e. days since 01-01-1970), then emits them as a daterange."
allOf:
- $ref: "#/components/schemas/OutputDescriptionBase"
- properties:
startColumn:
type: string
endColumn:
type: string
allowOpen:
type: boolean
operation:
type: string
enum: [ EPOCH_DATE_RANGE ]
EpochOutput:
deprecated: true
description: "Parses `startColumn` integer, emitting it as dates in the Unix-Epoch (i.e. days since 01-01-1970)"
allOf:
- $ref: "#/components/schemas/OutputDescriptionBase"
- properties:
inputColumn:
type: string
operation:
type: string
enum: [ EPOCH ]
OutputDescription:
description: "Operations to transform, then import, values into tables."
discriminator:
propertyName: operation
mapping: {
# FK: I'm using JSON notation here, because the key `NULL` breaks some tools.
"COMPOUND_DATE_RANGE": "#/components/schemas/CompoundDateRangeOutput",
"COPY": "#/components/schemas/CopyOutput",
"DATE_RANGE": "#/components/schemas/DateRangeOutput",
"EPOCH": "#/components/schemas/EpochOutput",
"EPOCH_DATE_RANGE": "#/components/schemas/EpochDateRangeOutput",
"LINE": "#/components/schemas/LineOutput",
"NULL": "#/components/schemas/NullOutput",
}
oneOf:
- $ref: "#/components/schemas/CompoundDateRangeOutput"
- $ref: "#/components/schemas/CopyOutput"
- $ref: "#/components/schemas/DateRangeOutput"
- $ref: "#/components/schemas/EpochDateRangeOutput"
- $ref: "#/components/schemas/EpochOutput"
- $ref: "#/components/schemas/LineOutput"
- $ref: "#/components/schemas/NullOutput"
Import:
description: "Describes how one or multiple CSV files are to be transformed into a .cqpp file compatible with the designated table."
type: object
properties:
table:
$ref: "#/components/schemas/TableId"
name:
description: "Name of the import. When preprocessed with tags, will be overwritten to the respective tag."
type: string
label:
deprecated: true
type: string
inputs:
description: "One or more descriptions to preprocess a `.csv` or `.csv.gz` into a single cqpp."
type: array
items:
type: object
properties:
sourceFile:
description: "Filename of the to preprocess file, relative to the path supplied in `preprocess`."
type: string
filter:
description: "Groovy script which can be used to filter the csv rows.
The row is passed as `row` array, the fields can be accessed as integer variables to the index in the file.
For example accessing `value` in `id,value` can be done with `row[value]` (no string up-ticks), or `row[1]`."
type: string
primary:
$ref: "#/components/schemas/OutputDescription"
output:
type: array
items:
$ref: "#/components/schemas/OutputDescription"
FrontendDatasetId:
type: object
properties:
id:
$ref: "#/components/schemas/DatasetId"
label:
type: string
ResolvedConceptsResult:
description: Response object for resolve endpoint.
type: object
properties:
resolvedConcepts:
description: Ids of resolved concept elements.
type: array
uniqueItems: true
items:
$ref: "#/components/schemas/ConceptId"
unknownCodes:
description: Values that could not be resolved.
type: array
uniqueItems: true
items:
type: string
resolvedFilter:
type: object
properties:
TableId:
$ref: "#/components/schemas/TableId"
FilterId:
$ref: "#/components/schemas/FilterId"
value:
description: List of resolved filter values.
type: array
items:
type: object
properties:
value:
description: Actual value - can be treated as the Id of the value. To be used when querying the Filter.
type: string
label:
description: Verbose description of the value.
type: string
optionValue:
description: Less verbose description of the value.
type: string
required:
- "value"
mail:
type: string
format: mail
ColumnConfig:
type: object
properties:
name:
description: Name of the Column-Config to be used when resolving with Upload.
type: string
label:
description: Map of Localized labels.
type: object
items:
type: string
description:
description: Map of Localized descriptions.
type: object
items:
type: string
field:
type: string
description: Name of column in result csv.
pad:
description: Pad-String when uploading data, to avoid problems with some tools truncating leading zeros or similar.
type: string
length:
description: In conjunction with pad, the length of the padded string.
type: integer
resolvable:
description: True, if the Column should be printed to output. This can be used to have resolvable but not printable fields in mapping.
type: boolean
UploadConfig:
description: Describes the format of ids for EXTERNAL and entity-preview Id kinds. Also describes the output format for ids in the result files.
type: object
properties:
ids:
type: array
items:
$ref: "#/components/schemas/ColumnConfig"
CurrencyConfig:
description: Describes how the frontend shall interpret and display currency values.
type: object
properties:
prefix:
type: string
thousandSeparator:
type: string
decimalSeparator:
type: string
pattern: "[.,]"
decimalScale:
type: string
VersionContainer:
type: object
properties:
name:
type: string
example: backend
description: Name of the versioned component
version:
type: string
example: "1.2.3-g983u4r84u"
description: Version id of the component
buildTime:
type: string
format: date-time
example: "2007-08-31T16:47:00+00:00"
required:
- name
FrontendConfig:
type: object
properties:
versions:
description: Revisions of backend components such as the backend and form-backends
type: array
items:
$ref: "#/components/schemas/VersionContainer"
manualUrl:
description: URL to this instances manual if available.
type: string
format: url
contactEmail:
$ref: "#/components/schemas/mail"
currency:
$ref: "#/components/schemas/CurrencyConfig"
upload:
$ref: "#/components/schemas/UploadConfig"
Error:
type: object
properties:
message:
type: string
code:
type: number
Me:
type: object
properties:
userName:
type: string
hideLogoutButton:
type: boolean
datasetAbilities:
description: Per dataset abilities of the logged in User.
type: object
additionalProperties:
type: object
properties:
canUpload:
type: boolean
groups:
description: Groups the user is part of.
type: array
items:
type: object
properties:
Id:
$ref: "#/components/schemas/Id"
label:
type: string
QueryStatus:
description: Status of an executing or executed query.
type: object
properties:
label:
description: Display label of the query.
type: string
isPristineLabel:
description: True if the user did not alter the queries label.
type: boolean
tags:
description: Tags of the query. To be treated like directories.
type: array
items:
type: string
uniqueItems: true
createdAt:
$ref: "#/components/schemas/DateTime"
lastUsed:
$ref: "#/components/schemas/DateTime"
owner:
$ref: "#/components/schemas/UserId"
ownerName:
type: string
shared:
description: True if the query is shared with other users.
type: boolean
own:
description: True if the query is owned by the current user.
type: boolean
system:
description: True if the query is system generated.
type: boolean
Id:
$ref: "#/components/schemas/ExecutionId"
status:
$ref: "#/components/schemas/QueryState"
numberOfResults:
description: Number of result-lines of the query.
type: integer
requiredTime:
description: Duration of the last execution.
nullable: true
type: integer
startTime:
$ref: "#/components/schemas/DateTime"
finishTime:
$ref: "#/components/schemas/DateTime"
queryType:
description: Specific subtype of the query.
type: string # TODO use discriminator from Query
secondaryId:
$ref: "#/components/schemas/SecondaryIdId"
resultUrls:
description: Available result urls of the query.
type: array
items:
$ref: "#/components/schemas/ResultAsset"
ResultAsset:
type: object
properties:
label:
type: string
minLength: 1
url:
type: string
format: url
required:
- label
- url
Labeled:
type: object
properties:
name:
type: string
label:
type: string
NotCondition:
properties:
condition:
$ref: "#/components/schemas/ConceptCondition"
type:
type: string
enum: [ NOT ]
IsPresentCondition:
properties:
column:
$ref: "#/components/schemas/ColumnId"
type:
type: string
enum: [ PRESENT ]
PrefixRangeCondition:
deprecated: true
properties:
min:
type: string
max:
type: string
type:
type: string
enum: [ PREFIX_RANGE ]
OrCondition:
properties:
conditions:
type: array
items:
$ref: "#/components/schemas/ConceptCondition"
type:
type: string
enum: [ OR ]
PrefixCondition:
deprecated: true
properties:
prefixes:
type: array
items:
type: string
type:
type: string
enum: [ PREFIX ]
AndCondition:
properties:
conditions:
type: array
items:
$ref: "#/components/schemas/ConceptCondition"
type:
type: string
enum: [ AND ]
GroovyCondition:
deprecated: true
properties:
script:
type: string
type:
type: string
enum: [ GROOVY ]
ColumnEqualCondition:
properties:
column:
$ref: "#/components/schemas/ColumnId"
values:
type: array
items:
type: string
uniqueItems: true
type:
type: string
enum: [ COLUMN_EQUAL ]
EqualCondition:
properties:
values:
type: array
items:
type: string
uniqueItems: true
type:
type: string
enum: [ EQUAL ]
ConceptCondition:
type: object
discriminator:
propertyName: type
mapping:
AND: "#/components/schemas/AndCondition"
COLUMN_EQUAL: "#/components/schemas/ColumnEqualCondition"
EQUAL: "#/components/schemas/EqualCondition"
GROOVY: "#/components/schemas/GroovyCondition"
NOT: "#/components/schemas/NotCondition"
OR: "#/components/schemas/OrCondition"
PREFIX: "#/components/schemas/PrefixCondition"
PREFIX_RANGE: "#/components/schemas/PrefixRangeCondition"
PRESENT: "#/components/schemas/IsPresentCondition"
oneOf:
- $ref: "#/components/schemas/AndCondition"
- $ref: "#/components/schemas/ColumnEqualCondition"
- $ref: "#/components/schemas/EqualCondition"
- $ref: "#/components/schemas/GroovyCondition"
- $ref: "#/components/schemas/NotCondition"
- $ref: "#/components/schemas/OrCondition"
- $ref: "#/components/schemas/PrefixCondition"
- $ref: "#/components/schemas/PrefixRangeCondition"
- $ref: "#/components/schemas/IsPresentCondition"
ConceptTreeChild:
description: "See documentation for Concept."
allOf:
- $ref: "#/components/schemas/Labeled"
- properties:
children:
type: array
items:
$ref: "#/components/schemas/ConceptTreeChild"
condition:
$ref: "#/components/schemas/ConceptCondition"
description:
type: string
additionalInfos:
type: array
items:
properties:
key:
type: string
value:
type: string
Select:
description: "Selects allow users to add aggregations to the output.
Selects can only be placed in Connectors, as opposed to UniversalSelects, which can also be placed in Concepts."
type: object
discriminator:
propertyName: type
mapping:
COUNT: "#/components/schemas/CountSelect"
COUNT_QUARTERS: "#/components/schemas/CountQuartersSelect"
DATE_DISTANCE: "#/components/schemas/DateDistanceSelect"
DATE_UNION: "#/components/schemas/DateUnionSelect"
DISTINCT: "#/components/schemas/DistinctSelect"
DURATION_SUM: "#/components/schemas/DurationSumSelect"
FIRST: "#/components/schemas/FirstValueSelect"
FLAGS: "#/components/schemas/FlagSelect"
LAST: "#/components/schemas/LastValueSelect"
QUARTER: "#/components/schemas/QuarterSelect"
QUARTERS_IN_YEAR: "#/components/schemas/QuartersInYearSelect"
RANDOM: "#/components/schemas/RandomValueSelect"
SUM: "#/components/schemas/SumSelect"
oneOf:
- $ref: "#/components/schemas/CountSelect"
- $ref: "#/components/schemas/CountQuartersSelect"
- $ref: "#/components/schemas/DateDistanceSelect"
- $ref: "#/components/schemas/DateUnionSelect"
- $ref: "#/components/schemas/DistinctSelect"
- $ref: "#/components/schemas/DurationSumSelect"
- $ref: "#/components/schemas/FirstValueSelect"
- $ref: "#/components/schemas/FlagSelect"
- $ref: "#/components/schemas/LastValueSelect"
- $ref: "#/components/schemas/QuarterSelect"
- $ref: "#/components/schemas/QuartersInYearSelect"
- $ref: "#/components/schemas/RandomValueSelect"
- $ref: "#/components/schemas/SumSelect"
ExistsSelect:
description: "Emits a boolean: True, if its holder is fulfilled, false otherwise."
allOf:
- $ref: "#/components/schemas/SelectBase"
- properties:
type:
type: string
enum: [ EXISTS ]
ConceptColumnSelect:
description: "Emits the values of the Concepts column. If `asIds` is true, it will instead emit the resolved ids."
allOf:
- $ref: "#/components/schemas/SelectBase"
- properties:
asIds:
type: boolean
type:
type: string
enum: [ CONCEPT_COLUMN ]
EventDateUnionSelect:
description: "Emits the aggregated values of the ValidityDates."
allOf:
- $ref: "#/components/schemas/SelectBase"
- properties:
type:
type: string
enum: [ EVENT_DATE_UNION ]
EventDurationSumSelect:
description: "Emits the number of days among the aggregated ValidityDates."
allOf:
- $ref: "#/components/schemas/SelectBase"
- properties:
type:
type: string
enum: [ EVENT_DURATION_SUM ]
QuarterSelect:
description: "Emits the sampled quarter in `2020Q1` format."
allOf:
- $ref: "#/components/schemas/SelectBase"
- properties:
sample:
$ref: "#/components/schemas/TemporalSampler"
type:
type: string
enum: [ QUARTER ]
DurationSumSelect:
description: "Emits the number of days of the aggregated date column."
allOf:
- $ref: "#/components/schemas/SelectBase"
- properties:
column:
$ref: "#/components/schemas/ColumnId"
type:
type: string
enum: [ DURATION_SUM ]
CountSelect:
description: "Emits the number of filtered events, or number of unique entries in a selected column."
allOf:
- $ref: "#/components/schemas/SelectBase"
- properties:
distinct:
type: boolean
type:
type: string
enum: [ COUNT ]
- oneOf:
- properties:
column:
$ref: "#/components/schemas/ColumnId"
- properties:
distinctByColumn:
type: array
items:
$ref: "#/components/schemas/ColumnId"
CountQuartersSelect:
description: "Emits the count of covered quarters encountered in the selected date column."
allOf:
- $ref: "#/components/schemas/SelectBase"
- properties:
column:
$ref: "#/components/schemas/ColumnId"
type:
type: string
enum: [ COUNT_QUARTERS ]
DateUnionSelect:
description: "Emits the merged aggregate of the date column as date-set."
allOf:
- $ref: "#/components/schemas/SelectBase"
- properties:
column:
$ref: "#/components/schemas/ColumnId"
type:
type: string
enum: [ DATE_UNION ]
DateDistanceSelect:
description: "Calculates the maximum distance of a date column, relative to today, or the end of the maximum of an available date restriction.
Mostly used to calculate the age of an entity, with `timeUnit=YEARS`."
allOf:
- $ref: "#/components/schemas/SelectBase"
- properties:
column:
$ref: "#/components/schemas/ColumnId"
timeUnit:
type: string
enum: [ YEARS, DAYS, MONTHS, WEEKS, HOURS ]
type:
type: string
enum: [ DATE_DISTANCE ]
QuartersInYearSelect:
description: "Calculates the maximum number of quarters in a single year, over the entire observed period.
e.g.: If an entity has events Q1-Q3 2020, and an event in Q1 2019, the result is 3."
allOf:
- $ref: "#/components/schemas/SelectBase"
- properties:
column:
$ref: "#/components/schemas/ColumnId"
type:
type: string
enum: [ QUARTERS_IN_YEAR ]
FlagSelect:
description: "Emits the labels of all of the columns having a `true` value. The columns must be of type boolean."
allOf:
- $ref: "#/components/schemas/SelectBase"
- properties:
flags:
description: "The keys are labels for the boolean columns."
type: object
additionalProperties:
$ref: "#/components/schemas/ColumnId"
type:
type: string
enum: [ FLAGS ]
SumSelect:
description: "Calculates the sum over a specified column, if `subtractColumn` is set subtracts that.
Additionally, if `distinctByColumn` is set, only aggregates the first encountered value for unique sets of keys."
allOf:
- $ref: "#/components/schemas/SelectBase"
- properties:
distinct:
type: boolean
column:
$ref: "#/components/schemas/ColumnId"
subtractColumn:
$ref: "#/components/schemas/ColumnId"
distinctByColumn:
type: array
items:
$ref: "#/components/schemas/ColumnId"
type:
type: string
enum: [ SUM ]
DistinctSelect:
description: "Collects unique values among the specified column.
If set, translates the values using the supplied mapping."
allOf:
- $ref: "#/components/schemas/SelectBase"
- properties:
column:
$ref: "#/components/schemas/ColumnId"
mapping:
$ref: "#/components/schemas/MappingId"
type:
type: string
enum: [ DISTINCT ]
FirstValueSelect:
description: "Emits the first value among the specified column, by ValidityDate.
If set, translates the values using the supplied mapping."
allOf:
- $ref: "#/components/schemas/SelectBase"
- properties:
column:
$ref: "#/components/schemas/ColumnId"
mapping:
$ref: "#/components/schemas/MappingId"
type:
type: string
enum: [ FIRST ]
LastValueSelect:
description: "Emits the last value among the specified column, by ValidityDate.
If set, translates the values using the supplied mapping."
allOf:
- $ref: "#/components/schemas/SelectBase"
- properties:
column:
$ref: "#/components/schemas/ColumnId"
mapping:
$ref: "#/components/schemas/MappingId"
type:
type: string
enum: [ LAST ]
RandomValueSelect:
description: "Emits a random value among the encountered values. The distribution mirrors the distribution in the original data by values."
allOf:
- $ref: "#/components/schemas/SelectBase"
- properties:
column:
$ref: "#/components/schemas/ColumnId"
mapping:
$ref: "#/components/schemas/MappingId"
type:
type: string
enum: [ RANDOM ]
SelectBase:
allOf:
- $ref: "#/components/schemas/Labeled"
- properties:
description:
type: string
default:
type: boolean
Searchable:
properties:
searchMinSuffixLength:
type: integer
generateSearchSuffixes:
type: boolean
UniversalSelect:
description: "Selects that can be used both on Concept and Connector level."
type: object
discriminator:
propertyName: type
mapping:
CONCEPT_COLUMN: "#/components/schemas/ConceptColumnSelect"
COUNT_QUARTERS: "#/components/schemas/CountQuartersSelect"
EVENT_DATE_UNION: "#/components/schemas/EventDateUnionSelect"
EVENT_DURATION_SUM: "#/components/schemas/EventDurationSumSelect"
EXISTS: "#/components/schemas/ExistsSelect"
QUARTER: "#/components/schemas/QuarterSelect"
oneOf:
- $ref: "#/components/schemas/ConceptColumnSelect"
- $ref: "#/components/schemas/CountQuartersSelect"
- $ref: "#/components/schemas/EventDateUnionSelect"
- $ref: "#/components/schemas/EventDurationSumSelect"
- $ref: "#/components/schemas/ExistsSelect"
- $ref: "#/components/schemas/QuarterSelect"
SumFilter:
description: "Filters entities to having the sum over a set of columns to be within a user defined range. See SumSelect for more info."
allOf:
- $ref: "#/components/schemas/FilterBase"
- properties:
distinct:
type: boolean
column:
$ref: "#/components/schemas/ColumnId"
subtractColumn:
$ref: "#/components/schemas/ColumnId"
distinctByColumn:
type: array
items:
$ref: "#/components/schemas/ColumnId"
type:
type: string
enum: [ SUM ]
CountFilter:
description: "Filters entities to having a specific number of events. See CountSelect for more info."
allOf:
- $ref: "#/components/schemas/FilterBase"
- properties:
distinct:
type: boolean
type:
type: string
enum: [ COUNT ]
- oneOf:
- properties:
column:
$ref: "#/components/schemas/ColumnId"
- properties:
distinctByColumn:
type: array
items:
$ref: "#/components/schemas/ColumnId"
FlagFilter:
description: "Filters events to have `true` values in the user selected columns."
allOf:
- $ref: "#/components/schemas/FilterBase"
- properties:
flags:
type: object
additionalProperties:
$ref: "#/components/schemas/ColumnId"
type:
type: string
enum: [ FLAGS ]
CountQuartersFilter:
allOf:
- $ref: "#/components/schemas/FilterBase"
- properties:
column:
$ref: "#/components/schemas/ColumnId"
type:
type: string
enum: [ COUNT_QUARTERS ]
SelectFilterBase:
description: "Filters events for a user defined list of values in a specific column."
allOf:
- $ref: "#/components/schemas/FilterBase"
- $ref: "#/components/schemas/Searchable"
- properties:
column:
$ref: "#/components/schemas/ColumnId"
- oneOf:
- properties:
labels:
type: object
additionalProperties:
type: string
- properties: