@truedat/dq 4.47.4 → 4.47.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1238 @@
1
+ import {
2
+ createRuleImplementation,
3
+ updateRuleImplementation,
4
+ } from "../../routines";
5
+
6
+ export const props = {
7
+ createRuleImplementation: jest.fn(),
8
+ updateRuleImplementation: jest.fn(),
9
+ edition: true,
10
+ };
11
+
12
+ const structuresFields = {
13
+ 11127104: [
14
+ {
15
+ data_structure_id: 11127108,
16
+ data_type_class: "number",
17
+ database: "xe",
18
+ default: "None",
19
+ deleted_at: null,
20
+ description:
21
+ "Department id where employee works; foreign key to department_id column of the departments table",
22
+ has_note: false,
23
+ host: "localhost",
24
+ inserted_at: "2022-04-12T14:28:06.057667Z",
25
+ links: [],
26
+ name: "DEPARTMENT_ID",
27
+ nullable: true,
28
+ order: "11",
29
+ precision: "22",
30
+ published_note: null,
31
+ schema: "HR",
32
+ table: "EMPLOYEES",
33
+ type: "NUMBER",
34
+ },
35
+ {
36
+ data_structure_id: 11127111,
37
+ data_type_class: "string",
38
+ database: "xe",
39
+ default: "None",
40
+ deleted_at: null,
41
+ description: "First name of the employee. A not null column.",
42
+ has_note: false,
43
+ host: "localhost",
44
+ inserted_at: "2022-04-12T14:28:06.057667Z",
45
+ links: [],
46
+ name: "FIRST_NAME",
47
+ nullable: true,
48
+ order: "2",
49
+ precision: "20",
50
+ published_note: null,
51
+ schema: "HR",
52
+ table: "EMPLOYEES",
53
+ type: "VARCHAR2",
54
+ },
55
+ {
56
+ data_structure_id: 11127117,
57
+ data_type_class: "number",
58
+ database: "xe",
59
+ default: "None",
60
+ deleted_at: null,
61
+ description:
62
+ "Monthly salary of the employee. Must be greater than zero (enforced by constraint emp_salary_min)",
63
+ has_note: false,
64
+ host: "localhost",
65
+ inserted_at: "2022-04-12T14:28:06.057667Z",
66
+ links: [],
67
+ name: "SALARY",
68
+ nullable: true,
69
+ order: "8",
70
+ precision: "22",
71
+ published_note: null,
72
+ schema: "HR",
73
+ table: "EMPLOYEES",
74
+ type: "NUMBER",
75
+ },
76
+ {
77
+ data_structure_id: 11127116,
78
+ data_type_class: "string",
79
+ database: "xe",
80
+ default: "None",
81
+ deleted_at: null,
82
+ description:
83
+ "Phone number of the employee; includes country code and area code",
84
+ has_note: false,
85
+ host: "localhost",
86
+ inserted_at: "2022-04-12T14:28:06.057667Z",
87
+ links: [],
88
+ name: "PHONE_NUMBER",
89
+ nullable: true,
90
+ order: "5",
91
+ precision: "20",
92
+ published_note: null,
93
+ schema: "HR",
94
+ table: "EMPLOYEES",
95
+ type: "VARCHAR2",
96
+ },
97
+ {
98
+ data_structure_id: 11127115,
99
+ data_type_class: "number",
100
+ database: "xe",
101
+ default: "None",
102
+ deleted_at: null,
103
+ description:
104
+ "Manager id of the employee; has same domain as manager_id in departments table. Foreign key to employee_id column of employees table. (useful for reflexive joins and CONNECT BY query)",
105
+ has_note: false,
106
+ host: "localhost",
107
+ inserted_at: "2022-04-12T14:28:06.057667Z",
108
+ links: [],
109
+ name: "MANAGER_ID",
110
+ nullable: true,
111
+ order: "10",
112
+ precision: "22",
113
+ published_note: null,
114
+ schema: "HR",
115
+ table: "EMPLOYEES",
116
+ type: "NUMBER",
117
+ },
118
+ {
119
+ data_structure_id: 11127109,
120
+ data_type_class: "string",
121
+ database: "xe",
122
+ default: "None",
123
+ deleted_at: null,
124
+ description: "Email id of the employee",
125
+ has_note: false,
126
+ host: "localhost",
127
+ inserted_at: "2022-04-12T14:28:06.057667Z",
128
+ links: [],
129
+ name: "EMAIL",
130
+ nullable: false,
131
+ order: "4",
132
+ precision: "25",
133
+ published_note: null,
134
+ schema: "HR",
135
+ table: "EMPLOYEES",
136
+ type: "VARCHAR2",
137
+ },
138
+ {
139
+ data_structure_id: 11127110,
140
+ data_type_class: "number",
141
+ database: "xe",
142
+ default: "None",
143
+ deleted_at: null,
144
+ description: "Primary key of employees table.",
145
+ has_note: false,
146
+ host: "localhost",
147
+ inserted_at: "2022-04-12T14:28:06.057667Z",
148
+ links: [],
149
+ name: "EMPLOYEE_ID",
150
+ nullable: false,
151
+ order: "1",
152
+ precision: "22",
153
+ primary_key: "PK",
154
+ published_note: null,
155
+ schema: "HR",
156
+ table: "EMPLOYEES",
157
+ type: "NUMBER",
158
+ },
159
+ {
160
+ data_structure_id: 11127114,
161
+ data_type_class: "string",
162
+ database: "xe",
163
+ default: "None",
164
+ deleted_at: null,
165
+ description: "Last name of the employee. A not null column.",
166
+ has_note: false,
167
+ host: "localhost",
168
+ inserted_at: "2022-04-12T14:28:06.057667Z",
169
+ links: [],
170
+ name: "LAST_NAME",
171
+ nullable: false,
172
+ order: "3",
173
+ precision: "25",
174
+ published_note: null,
175
+ schema: "HR",
176
+ table: "EMPLOYEES",
177
+ type: "VARCHAR2",
178
+ },
179
+ {
180
+ data_structure_id: 11127112,
181
+ data_type_class: "date",
182
+ database: "xe",
183
+ default: "None",
184
+ deleted_at: null,
185
+ description:
186
+ "Date when the employee started on this job. A not null column.",
187
+ has_note: false,
188
+ host: "localhost",
189
+ inserted_at: "2022-04-12T14:28:06.057667Z",
190
+ links: [],
191
+ name: "HIRE_DATE",
192
+ nullable: false,
193
+ order: "6",
194
+ precision: "7",
195
+ published_note: null,
196
+ schema: "HR",
197
+ table: "EMPLOYEES",
198
+ type: "DATE",
199
+ },
200
+ {
201
+ data_structure_id: 11127113,
202
+ data_type_class: "string",
203
+ database: "xe",
204
+ default: "None",
205
+ deleted_at: null,
206
+ description:
207
+ "Current job of the employee; foreign key to job_id column of the jobs table. A not null column.",
208
+ has_note: false,
209
+ host: "localhost",
210
+ inserted_at: "2022-04-12T14:28:06.057667Z",
211
+ links: [],
212
+ name: "JOB_ID",
213
+ nullable: false,
214
+ order: "7",
215
+ precision: "10",
216
+ published_note: null,
217
+ schema: "HR",
218
+ table: "EMPLOYEES",
219
+ type: "VARCHAR2",
220
+ },
221
+ {
222
+ data_structure_id: 11127107,
223
+ data_type_class: "number",
224
+ database: "xe",
225
+ default: "None",
226
+ deleted_at: null,
227
+ description:
228
+ "Commission percentage of the employee; Only employees in sales department elgible for commission percentage",
229
+ has_note: false,
230
+ host: "localhost",
231
+ inserted_at: "2022-04-12T14:28:06.057667Z",
232
+ links: [],
233
+ name: "COMMISSION_PCT",
234
+ nullable: true,
235
+ order: "9",
236
+ precision: "22",
237
+ published_note: null,
238
+ schema: "HR",
239
+ table: "EMPLOYEES",
240
+ type: "NUMBER",
241
+ },
242
+ ],
243
+ };
244
+
245
+ const ruleImplementation = {
246
+ data_structures: [
247
+ {
248
+ data_structure: {
249
+ confidential: false,
250
+ current_version: {
251
+ class: "table",
252
+ deleted_at: null,
253
+ description:
254
+ "employees table. Contains 107 rows. References with departments, jobs, job_history tables. Contains a self reference.",
255
+ external_id: null,
256
+ group: "oracle://localhost/xe",
257
+ id: 8824790,
258
+ name: "EMPLOYEES",
259
+ path: ["xe", "HR"],
260
+ },
261
+ domain_ids: [2],
262
+ domains: null,
263
+ external_id: "oracle://localhost/xe/HR/EMPLOYEES",
264
+ id: 11127104,
265
+ inserted_at: "2022-02-07T15:12:25.343288Z",
266
+ linked_concepts: null,
267
+ metadata: {},
268
+ path: [],
269
+ source: {},
270
+ source_id: 162,
271
+ system: {
272
+ external_id: "oracle2",
273
+ id: 2,
274
+ name: "BBDD Oracle",
275
+ },
276
+ system_id: 2,
277
+ tags: [],
278
+ updated_at: "2022-03-14T12:03:40.076583Z",
279
+ },
280
+ data_structure_id: 11127104,
281
+ deleted_at: null,
282
+ id: 881,
283
+ implementation_id: 1330,
284
+ type: "dataset",
285
+ },
286
+ {
287
+ data_structure: {
288
+ confidential: false,
289
+ current_version: {
290
+ class: "field",
291
+ deleted_at: null,
292
+ description:
293
+ "Monthly salary of the employee. Must be greater than zero (enforced by constraint emp_salary_min)",
294
+ external_id: null,
295
+ group: "oracle://localhost/xe",
296
+ id: 8824786,
297
+ name: "SALARY",
298
+ path: ["xe", "HR", "EMPLOYEES"],
299
+ },
300
+ domain_ids: [2],
301
+ domains: null,
302
+ external_id: "oracle://localhost/xe/HR/EMPLOYEES/SALARY",
303
+ id: 11127117,
304
+ inserted_at: "2022-02-07T15:12:25.343288Z",
305
+ linked_concepts: null,
306
+ metadata: {},
307
+ path: [],
308
+ source: {},
309
+ source_id: 162,
310
+ system: {
311
+ external_id: "oracle2",
312
+ id: 2,
313
+ name: "BBDD Oracle",
314
+ },
315
+ system_id: 2,
316
+ tags: [],
317
+ updated_at: "2022-03-14T12:03:40.076583Z",
318
+ },
319
+ data_structure_id: 11127117,
320
+ deleted_at: null,
321
+ id: 882,
322
+ implementation_id: 1330,
323
+ type: "validation",
324
+ },
325
+ ],
326
+ dataset: [
327
+ {
328
+ alias: {
329
+ index: 4,
330
+ text: null,
331
+ },
332
+ clauses: [],
333
+ structure: {
334
+ external_id: "oracle://localhost/xe/HR/EMPLOYEES",
335
+ id: 11127104,
336
+ metadata: {
337
+ alias: "oracle-temp",
338
+ creation_date: "2011-08-28 22:21:56",
339
+ database: "xe",
340
+ host: "localhost",
341
+ schema: "HR",
342
+ },
343
+ name: "EMPLOYEES",
344
+ path: ["xe", "HR"],
345
+ system: {
346
+ external_id: "oracle2",
347
+ id: 2,
348
+ name: "BBDD Oracle",
349
+ },
350
+ type: "Table",
351
+ },
352
+ },
353
+ ],
354
+ deleted_at: null,
355
+ df_content: {},
356
+ df_name: "implementaciones_empty",
357
+ domain: {
358
+ external_id: "Truedat",
359
+ id: 2,
360
+ name: "Truedat",
361
+ },
362
+ domain_id: 2,
363
+ executable: true,
364
+ goal: 90,
365
+ id: 1330,
366
+ implementation_key: "oracle_prueba",
367
+ implementation_type: "default",
368
+ minimum: 80,
369
+ populations: [],
370
+ result_type: "percentage",
371
+ results: [],
372
+ rule_id: null,
373
+ segments: [],
374
+ status: "draft",
375
+ validations: [],
376
+ version: 2,
377
+ };
378
+
379
+ const structuresSiblings = {
380
+ 11127104: [
381
+ {
382
+ alias: "oracle-temp",
383
+ classes: null,
384
+ creation_date: "2011-08-28 22:21:55",
385
+ data_structure_id: 11815287,
386
+ database: "xe",
387
+ deleted_at: null,
388
+ host: "localhost",
389
+ id: 8824743,
390
+ name: "COUNTRIES",
391
+ schema: "HR",
392
+ type: "Table",
393
+ },
394
+ {
395
+ alias: "oracle-temp",
396
+ classes: null,
397
+ creation_date: "2011-08-28 22:21:56",
398
+ data_structure_id: 11815291,
399
+ database: "xe",
400
+ deleted_at: null,
401
+ host: "localhost",
402
+ id: 8824747,
403
+ name: "DEPARTMENTS",
404
+ schema: "HR",
405
+ type: "Table",
406
+ },
407
+ {
408
+ alias: "oracle-temp",
409
+ classes: null,
410
+ creation_date: "2011-08-28 22:21:56",
411
+ data_structure_id: 11815296,
412
+ database: "xe",
413
+ deleted_at: null,
414
+ host: "localhost",
415
+ id: 8824752,
416
+ name: "EMP_DETAILS_VIEW",
417
+ schema: "HR",
418
+ type: "Table",
419
+ },
420
+ {
421
+ alias: "oracle-temp",
422
+ classes: null,
423
+ creation_date: "2011-08-28 22:21:56",
424
+ data_structure_id: 11815313,
425
+ database: "xe",
426
+ deleted_at: null,
427
+ host: "localhost",
428
+ id: 8824769,
429
+ name: "JOBS",
430
+ schema: "HR",
431
+ type: "Table",
432
+ },
433
+ {
434
+ alias: "oracle-temp",
435
+ classes: null,
436
+ creation_date: "2011-08-28 22:21:55",
437
+ data_structure_id: 11815318,
438
+ database: "xe",
439
+ deleted_at: null,
440
+ host: "localhost",
441
+ id: 8824774,
442
+ name: "LOCATIONS",
443
+ schema: "HR",
444
+ type: "Table",
445
+ },
446
+ {
447
+ alias: "oracle-temp",
448
+ classes: null,
449
+ creation_date: "2011-08-28 22:21:55",
450
+ data_structure_id: 11815325,
451
+ database: "xe",
452
+ deleted_at: null,
453
+ host: "localhost",
454
+ id: 8824781,
455
+ name: "REGIONS",
456
+ schema: "HR",
457
+ type: "Table",
458
+ },
459
+ {
460
+ alias: "oracle-temp",
461
+ classes: null,
462
+ creation_date: "2011-08-28 22:21:56",
463
+ data_structure_id: 11127104,
464
+ database: "xe",
465
+ deleted_at: null,
466
+ host: "localhost",
467
+ id: 8824790,
468
+ name: "EMPLOYEES",
469
+ schema: "HR",
470
+ type: "Table",
471
+ },
472
+ {
473
+ alias: "oracle-temp",
474
+ classes: null,
475
+ creation_date: "2011-08-28 22:21:56",
476
+ data_structure_id: 11806360,
477
+ database: "xe",
478
+ deleted_at: null,
479
+ host: "localhost",
480
+ id: 8824791,
481
+ name: "JOB_HISTORY",
482
+ schema: "HR",
483
+ type: "Table",
484
+ },
485
+ ],
486
+ };
487
+
488
+ const ruleImplementationOperators = {
489
+ any: {
490
+ operators: [
491
+ {
492
+ name: "unique",
493
+ scope: "validation",
494
+ },
495
+ {
496
+ name: "unique",
497
+ value_type: "field_list",
498
+ },
499
+ {
500
+ name: "not_empty",
501
+ },
502
+ {
503
+ name: "empty",
504
+ },
505
+ {
506
+ group: "references",
507
+ name: "references",
508
+ value_type: "field",
509
+ value_type_filter: "any",
510
+ scope: "validation",
511
+ population: true,
512
+ },
513
+ {
514
+ group: "references",
515
+ name: "not_references",
516
+ value_type: "field",
517
+ value_type_filter: "any",
518
+ scope: "validation",
519
+ },
520
+ ],
521
+ },
522
+ boolean: {
523
+ operators: [
524
+ {
525
+ name: "is_true",
526
+ },
527
+ {
528
+ name: "is_false",
529
+ },
530
+ ],
531
+ },
532
+ number: {
533
+ operators: [
534
+ {
535
+ group: "eq",
536
+ name: "eq",
537
+ value_type: "number",
538
+ },
539
+ {
540
+ group: "eq",
541
+ name: "eq",
542
+ value_type: "field",
543
+ },
544
+ {
545
+ group: "not_eq",
546
+ name: "not_eq",
547
+ value_type: "number",
548
+ },
549
+ {
550
+ group: "not_eq",
551
+ name: "not_eq",
552
+ value_type: "field",
553
+ },
554
+ {
555
+ group: "gt",
556
+ name: "gt",
557
+ value_type: "number",
558
+ },
559
+ {
560
+ group: "gt",
561
+ name: "gt",
562
+ value_type: "field",
563
+ },
564
+ {
565
+ group: "lt",
566
+ name: "lt",
567
+ value_type: "number",
568
+ },
569
+ {
570
+ group: "lt",
571
+ name: "lt",
572
+ value_type: "field",
573
+ },
574
+ {
575
+ group: "gte",
576
+ name: "gte",
577
+ value_type: "number",
578
+ },
579
+ {
580
+ group: "gte",
581
+ name: "gte",
582
+ value_type: "field",
583
+ },
584
+ {
585
+ group: "lte",
586
+ name: "lte",
587
+ value_type: "number",
588
+ },
589
+ {
590
+ group: "lte",
591
+ name: "lte",
592
+ value_type: "field",
593
+ },
594
+ {
595
+ group: "between",
596
+ name: "between",
597
+ value_type: "number",
598
+ arity: 2,
599
+ },
600
+ {
601
+ group: "between",
602
+ name: "between",
603
+ value_type: "field",
604
+ arity: 2,
605
+ },
606
+ {
607
+ group: "format",
608
+ name: "number_of_decimals",
609
+ value_type: "number",
610
+ scope: "validation",
611
+ },
612
+ ],
613
+ },
614
+ string: {
615
+ operators: [
616
+ {
617
+ group: "eq",
618
+ name: "eq",
619
+ value_type: "string",
620
+ },
621
+ {
622
+ group: "eq",
623
+ name: "eq",
624
+ value_type: "field",
625
+ },
626
+ {
627
+ group: "not_eq",
628
+ name: "not_eq",
629
+ value_type: "string",
630
+ },
631
+ {
632
+ group: "not_eq",
633
+ name: "not_eq",
634
+ value_type: "field",
635
+ },
636
+ {
637
+ group: "length",
638
+ name: "length_gt",
639
+ value_type: "number",
640
+ },
641
+ {
642
+ group: "length",
643
+ name: "length_lt",
644
+ value_type: "number",
645
+ },
646
+ {
647
+ group: "length",
648
+ name: "length_eq",
649
+ value_type: "number",
650
+ scope: "validation",
651
+ },
652
+ {
653
+ group: "length",
654
+ name: "length_not_eq",
655
+ value_type: "number",
656
+ scope: "validation",
657
+ },
658
+ {
659
+ group: "length",
660
+ name: "length_gte",
661
+ value_type: "number",
662
+ },
663
+ {
664
+ group: "length",
665
+ name: "length_lte",
666
+ value_type: "number",
667
+ },
668
+ {
669
+ group: "length",
670
+ name: "length_between",
671
+ value_type: "number",
672
+ arity: 2,
673
+ },
674
+ {
675
+ name: "contains",
676
+ value_type: "string",
677
+ },
678
+ {
679
+ name: "not_contains",
680
+ value_type: "string",
681
+ },
682
+ {
683
+ name: "starts_with",
684
+ value_type: "string",
685
+ },
686
+ {
687
+ name: "ends_with",
688
+ value_type: "string",
689
+ },
690
+ {
691
+ name: "in_list",
692
+ value_type: "string_list",
693
+ },
694
+ {
695
+ name: "not_in_list",
696
+ value_type: "string_list",
697
+ },
698
+ {
699
+ group: "format",
700
+ name: "number_of_decimals",
701
+ value_type: "number",
702
+ scope: "validation",
703
+ },
704
+ {
705
+ name: "format_of",
706
+ group: "format",
707
+ value_type: "string",
708
+ fixed_values: [
709
+ "email",
710
+ "phone",
711
+ "number",
712
+ "decimal",
713
+ "date",
714
+ "dni",
715
+ "dni_or_cif",
716
+ "season",
717
+ "timestamp",
718
+ ],
719
+ scope: "validation",
720
+ },
721
+ {
722
+ name: "regex_format",
723
+ value_type: "string",
724
+ },
725
+ ],
726
+ modifiers: [
727
+ {
728
+ name: "cast_as_date",
729
+ cast_as: "date",
730
+ params: [
731
+ {
732
+ name: "format",
733
+ type: "string",
734
+ },
735
+ ],
736
+ },
737
+ ],
738
+ },
739
+ date: {
740
+ operators: [
741
+ {
742
+ group: "eq",
743
+ name: "eq",
744
+ value_type: "date",
745
+ },
746
+ {
747
+ group: "eq",
748
+ name: "eq",
749
+ value_type: "field",
750
+ },
751
+ {
752
+ group: "not_eq",
753
+ name: "not_eq",
754
+ value_type: "date",
755
+ },
756
+ {
757
+ group: "not_eq",
758
+ name: "not_eq",
759
+ value_type: "field",
760
+ },
761
+ {
762
+ group: "gt",
763
+ name: "gt",
764
+ value_type: "date",
765
+ },
766
+ {
767
+ group: "gt",
768
+ name: "gt",
769
+ value_type: "field",
770
+ },
771
+ {
772
+ group: "gte",
773
+ name: "gte",
774
+ value_type: "date",
775
+ },
776
+ {
777
+ group: "gte",
778
+ name: "gte",
779
+ value_type: "field",
780
+ },
781
+ {
782
+ group: "lt",
783
+ name: "lt",
784
+ value_type: "date",
785
+ },
786
+ {
787
+ group: "lt",
788
+ name: "lt",
789
+ value_type: "field",
790
+ },
791
+ {
792
+ group: "lte",
793
+ name: "lte",
794
+ value_type: "date",
795
+ },
796
+ {
797
+ group: "lte",
798
+ name: "lte",
799
+ value_type: "field",
800
+ },
801
+ {
802
+ name: "between",
803
+ value_type: "date",
804
+ arity: 2,
805
+ },
806
+ {
807
+ group: "eq",
808
+ name: "eq_var",
809
+ value_type: "string",
810
+ fixed_values: ["D-0", "D-1", "M-0", "M-1", "M-2", "Y-0", "Y-1"],
811
+ },
812
+ {
813
+ group: "lt",
814
+ name: "lt_var",
815
+ value_type: "string",
816
+ fixed_values: ["D-0", "D-1", "M-0", "M-1", "M-2", "Y-0", "Y-1"],
817
+ },
818
+ {
819
+ group: "lte",
820
+ name: "lte_var",
821
+ value_type: "string",
822
+ fixed_values: ["D-0", "D-1", "M-0", "M-1", "M-2", "Y-0", "Y-1"],
823
+ },
824
+ {
825
+ group: "gt",
826
+ name: "gt_var",
827
+ value_type: "string",
828
+ fixed_values: ["D-0", "D-1", "M-0", "M-1", "M-2", "Y-0", "Y-1"],
829
+ },
830
+ {
831
+ group: "gte",
832
+ name: "gte_var",
833
+ value_type: "string",
834
+ fixed_values: ["D-0", "D-1", "M-0", "M-1", "M-2", "Y-0", "Y-1"],
835
+ },
836
+ {
837
+ name: "variation_on_count",
838
+ value_type: "string",
839
+ fixed_values: ["D-0", "D-1", "M-0", "M-1", "M-2", "Y-0", "Y-1"],
840
+ scope: "validation",
841
+ arity: 2,
842
+ },
843
+ ],
844
+ },
845
+ timestamp: {
846
+ operators: [
847
+ {
848
+ group: "eq",
849
+ name: "eq",
850
+ value_type: "timestamp",
851
+ },
852
+ {
853
+ group: "eq",
854
+ name: "eq",
855
+ value_type: "field",
856
+ },
857
+ {
858
+ group: "not_eq",
859
+ name: "not_eq",
860
+ value_type: "timestamp",
861
+ },
862
+ {
863
+ group: "not_eq",
864
+ name: "not_eq",
865
+ value_type: "field",
866
+ },
867
+ {
868
+ group: "gt",
869
+ name: "gt",
870
+ value_type: "timestamp",
871
+ },
872
+ {
873
+ group: "gt",
874
+ name: "gt",
875
+ value_type: "field",
876
+ },
877
+ {
878
+ group: "gte",
879
+ name: "gte",
880
+ value_type: "timestamp",
881
+ },
882
+ {
883
+ group: "gte",
884
+ name: "gte",
885
+ value_type: "field",
886
+ },
887
+ {
888
+ group: "lt",
889
+ name: "lt",
890
+ value_type: "timestamp",
891
+ },
892
+ {
893
+ group: "lt",
894
+ name: "lt",
895
+ value_type: "field",
896
+ },
897
+ {
898
+ group: "lte",
899
+ name: "lte",
900
+ value_type: "timestamp",
901
+ },
902
+ {
903
+ group: "lte",
904
+ name: "lte",
905
+ value_type: "field",
906
+ },
907
+ {
908
+ name: "between",
909
+ value_type: "timestamp",
910
+ arity: 2,
911
+ },
912
+ {
913
+ group: "eq",
914
+ name: "eq_var",
915
+ value_type: "string",
916
+ fixed_values: ["D-0", "D-1", "M-0", "M-1", "M-2", "Y-0", "Y-1"],
917
+ },
918
+ {
919
+ group: "not_eq",
920
+ name: "not_eq_var",
921
+ value_type: "string",
922
+ fixed_values: ["D-0", "D-1", "M-0", "M-1", "M-2", "Y-0", "Y-1"],
923
+ },
924
+ {
925
+ group: "lt",
926
+ name: "lt_var",
927
+ value_type: "string",
928
+ fixed_values: ["D-0", "D-1", "M-0", "M-1", "M-2", "Y-0", "Y-1"],
929
+ },
930
+ {
931
+ group: "lte",
932
+ name: "lte_var",
933
+ value_type: "string",
934
+ fixed_values: ["D-0", "D-1", "M-0", "M-1", "M-2", "Y-0", "Y-1"],
935
+ },
936
+ {
937
+ group: "gt",
938
+ name: "gt_var",
939
+ value_type: "string",
940
+ fixed_values: ["D-0", "D-1", "M-0", "M-1", "M-2", "Y-0", "Y-1"],
941
+ },
942
+ {
943
+ group: "gte",
944
+ name: "gte_var",
945
+ value_type: "string",
946
+ fixed_values: ["D-0", "D-1", "M-0", "M-1", "M-2", "Y-0", "Y-1"],
947
+ },
948
+ {
949
+ name: "variation_on_count",
950
+ value_type: "string",
951
+ fixed_values: ["D-0", "D-1", "M-0", "M-1", "M-2", "Y-0", "Y-1"],
952
+ scope: "validation",
953
+ arity: 2,
954
+ },
955
+ ],
956
+ },
957
+ };
958
+
959
+ export const sourcesRuleImplementationLoader = [
960
+ {
961
+ __typename: "Source",
962
+ id: "190",
963
+ externalId: "Redshift",
964
+ config: {
965
+ alias: "Redshift",
966
+ databases: ["dev"],
967
+ domain: {
968
+ external_id: "Truedat",
969
+ id: 2,
970
+ name: "Truedat",
971
+ parent_id: null,
972
+ updated_at: "2020-07-28 13:21:21.938189Z",
973
+ },
974
+ host: "redshift-cluster-1.czitmavv4gjx.eu-west-1.redshift.amazonaws.com",
975
+ job_types: ["quality", "profile", "catalog"],
976
+ port: "5439",
977
+ system: {
978
+ external_id: "Redshift",
979
+ id: 139,
980
+ name: "Redshift",
981
+ },
982
+ user: "awsuser",
983
+ },
984
+ },
985
+ {
986
+ __typename: "Source",
987
+ id: "178",
988
+ externalId: "test_athena",
989
+ config: {
990
+ aliases: ["asd", "glue"],
991
+ aws_region: "eu-west-1",
992
+ aws_role_arn: "",
993
+ job_types: ["profile", "quality"],
994
+ output_location: "",
995
+ workgroup: "primary",
996
+ },
997
+ },
998
+ {
999
+ __typename: "Source",
1000
+ id: "187",
1001
+ externalId: "postgres-temp",
1002
+ config: {
1003
+ alias: "postgres-temp",
1004
+ blacklist_schemas: [],
1005
+ databases: ["prueba", "postgres"],
1006
+ domain: {
1007
+ external_id: "Truedat",
1008
+ id: 2,
1009
+ name: "Truedat",
1010
+ parent_id: null,
1011
+ updated_at: "2020-07-28 13:21:21.938189Z",
1012
+ },
1013
+ host: "localhost",
1014
+ job_types: ["profile", "quality", "catalog"],
1015
+ password: "yourStrong(!)Password",
1016
+ port: "5432",
1017
+ system: {
1018
+ external_id: "Postgres-Test",
1019
+ id: 106,
1020
+ name: "Postgres-Test",
1021
+ },
1022
+ user: "postgres",
1023
+ },
1024
+ },
1025
+ {
1026
+ __typename: "Source",
1027
+ id: "119",
1028
+ externalId: "Teradata",
1029
+ config: {
1030
+ alias: "Teradata",
1031
+ databases: ["HR"],
1032
+ domain: {
1033
+ external_id: "Dominio Prueba",
1034
+ id: 83,
1035
+ name: "Dominio Prueba",
1036
+ parent_id: null,
1037
+ updated_at: "2022-02-16 09:28:19.391331Z",
1038
+ },
1039
+ evidences_host: "localhost",
1040
+ evidences_path: "interfases",
1041
+ evidences_port: "445",
1042
+ evidences_size: "10",
1043
+ job_types: ["profile", "quality", "catalog"],
1044
+ object_types: ["View", "Table"],
1045
+ protocol: "SMB",
1046
+ save_evidences: "No",
1047
+ system: {
1048
+ external_id: "Teradata",
1049
+ id: 79,
1050
+ name: "Teradata",
1051
+ },
1052
+ },
1053
+ },
1054
+ {
1055
+ __typename: "Source",
1056
+ id: "130",
1057
+ externalId: "SQLServer",
1058
+ config: {},
1059
+ },
1060
+ {
1061
+ __typename: "Source",
1062
+ id: "177",
1063
+ externalId: "SQLServer test",
1064
+ config: {},
1065
+ },
1066
+ {
1067
+ __typename: "Source",
1068
+ id: "176",
1069
+ externalId: "borrar",
1070
+ config: {
1071
+ alias: "borrar",
1072
+ databases: ["ORCLPDB1.localdomain"],
1073
+ domain: {
1074
+ external_id: "Truedat",
1075
+ id: 2,
1076
+ name: "Truedat",
1077
+ parent_id: null,
1078
+ updated_at: "2020-07-28 13:21:21.938189Z",
1079
+ },
1080
+ host: "localhost",
1081
+ job_types: ["quality", "profile", "catalog"],
1082
+ password: "yourpassword",
1083
+ port: "1521",
1084
+ save_evidences: "No",
1085
+ schemas: ["OT"],
1086
+ system: null,
1087
+ user: "OT",
1088
+ },
1089
+ },
1090
+ {
1091
+ __typename: "Source",
1092
+ id: "201",
1093
+ externalId: "Athena_eu_west_2",
1094
+ config: {
1095
+ aliases: ["Glue_eu_west_2"],
1096
+ aws_region: "eu-west-2",
1097
+ aws_role_arn: "",
1098
+ job_types: ["profile", "quality"],
1099
+ workgroup: "primary",
1100
+ },
1101
+ },
1102
+ {
1103
+ __typename: "Source",
1104
+ id: "151",
1105
+ externalId: "MySQL",
1106
+ config: {
1107
+ alias: "MySQL",
1108
+ domain: {
1109
+ external_id: "Truedat",
1110
+ id: 2,
1111
+ name: "Truedat",
1112
+ parent_id: null,
1113
+ updated_at: "2020-07-28 13:21:21.938189Z",
1114
+ },
1115
+ filter_type: "Whitelist Databases",
1116
+ host: "localhost",
1117
+ job_types: ["profile", "quality", "catalog"],
1118
+ port: "3306",
1119
+ system: {
1120
+ external_id: "MySQL",
1121
+ id: 103,
1122
+ name: "MySQL",
1123
+ },
1124
+ whitelist_databases: ["classicmodels"],
1125
+ },
1126
+ },
1127
+ {
1128
+ __typename: "Source",
1129
+ id: "196",
1130
+ externalId: "Oracle 12",
1131
+ config: {
1132
+ alias: "Oracle 12",
1133
+ databases: ["ORCLPDB1.localdomain"],
1134
+ domain: {
1135
+ external_id: "Truedat",
1136
+ id: 2,
1137
+ name: "Truedat",
1138
+ parent_id: null,
1139
+ updated_at: "2020-07-28 13:21:21.938189Z",
1140
+ },
1141
+ evidences_host: "samba",
1142
+ evidences_password: "badpass",
1143
+ evidences_path: "interfases",
1144
+ evidences_port: "445",
1145
+ evidences_size: "10",
1146
+ evidences_user: "example1",
1147
+ filter_type: "Whitelist",
1148
+ host: "oracle_12",
1149
+ job_types: ["profile", "quality", "catalog"],
1150
+ password: "Oradoc_db1",
1151
+ port: "1521",
1152
+ protocol: "SMB",
1153
+ save_evidences: "Yes",
1154
+ schemas: ["OT"],
1155
+ system: {
1156
+ external_id: "Oracle 12",
1157
+ id: 141,
1158
+ name: "Oracle 12",
1159
+ },
1160
+ tables_whitelist: ["REGIONS", "CUSTOMERS"],
1161
+ user: "system",
1162
+ },
1163
+ },
1164
+ {
1165
+ __typename: "Source",
1166
+ id: "181",
1167
+ externalId: "PostgreSQL",
1168
+ config: {
1169
+ alias: "PostgreSQL",
1170
+ databases: [
1171
+ "td_audit",
1172
+ "td_auth",
1173
+ "td_bg",
1174
+ "td_dd",
1175
+ "td_df",
1176
+ "td_ie",
1177
+ "td_lm",
1178
+ "td_metrics",
1179
+ ],
1180
+ domain: {
1181
+ external_id: "Truedat",
1182
+ id: 2,
1183
+ name: "Truedat",
1184
+ parent_id: null,
1185
+ updated_at: "2020-07-28 13:21:21.938189Z",
1186
+ },
1187
+ job_types: ["profile", "quality", "catalog"],
1188
+ system: {
1189
+ external_id: "postgres",
1190
+ id: 7,
1191
+ name: "Truedat PostgreSQL",
1192
+ },
1193
+ },
1194
+ },
1195
+ {
1196
+ __typename: "Source",
1197
+ id: "162",
1198
+ externalId: "oracle-temp",
1199
+ config: {
1200
+ alias: "oracle-temp",
1201
+ databases: ["xe"],
1202
+ domain: {
1203
+ external_id: "Truedat",
1204
+ id: 2,
1205
+ name: "Truedat",
1206
+ parent_id: null,
1207
+ updated_at: "2020-07-28 13:21:21.938189Z",
1208
+ },
1209
+ filter_type: null,
1210
+ host: "localhost",
1211
+ job_types: ["profile", "catalog", "quality"],
1212
+ password: "oracle",
1213
+ port: "1521",
1214
+ save_evidences: "No",
1215
+ schemas: ["HR"],
1216
+ system: {
1217
+ external_id: "oracle2",
1218
+ id: 2,
1219
+ name: "BBDD Oracle",
1220
+ },
1221
+ user: "system",
1222
+ },
1223
+ },
1224
+ ];
1225
+
1226
+ export const ruleImplementationLoaderGlobalState = {
1227
+ rule: {},
1228
+ ruleImplementation,
1229
+ ruleImplementationRaw: {},
1230
+ ruleImplementationOperators,
1231
+ structuresFields,
1232
+ structuresSiblings,
1233
+ };
1234
+
1235
+ export const ruleImplementationLoaderActions = {
1236
+ createRuleImplementation,
1237
+ updateRuleImplementation,
1238
+ };