@forzalabs/remora 1.0.21 → 1.1.1

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.
Files changed (111) hide show
  1. package/actions/automap.js +26 -42
  2. package/actions/compile.js +27 -43
  3. package/actions/create_consumer.js +24 -40
  4. package/actions/create_producer.js +16 -32
  5. package/actions/debug.js +18 -34
  6. package/actions/deploy.js +30 -46
  7. package/actions/discover.js +13 -29
  8. package/actions/init.js +29 -45
  9. package/actions/mock.js +16 -32
  10. package/actions/run.js +34 -52
  11. package/actions/sample.js +42 -58
  12. package/index.js +38 -43
  13. package/package.json +4 -4
  14. package/workers/ExecutorWorker.js +18 -32
  15. package/Constants.js +0 -34
  16. package/core/Affirm.js +0 -42
  17. package/core/Algo.js +0 -160
  18. package/core/dste/DSTE.js +0 -113
  19. package/core/logger/DebugLogService.js +0 -48
  20. package/core/logger/DevelopmentLogService.js +0 -70
  21. package/core/logger/LocalLogService.js +0 -70
  22. package/core/logger/Logger.js +0 -54
  23. package/database/DatabaseEngine.js +0 -149
  24. package/database/DatabaseStructure.js +0 -27
  25. package/definitions/DatasetDefinitions.js +0 -2
  26. package/definitions/ExecutorDefinitions.js +0 -2
  27. package/definitions/ProcessENV.js +0 -2
  28. package/definitions/agents/DestinationDriver.js +0 -2
  29. package/definitions/agents/SourceDriver.js +0 -2
  30. package/definitions/cli.js +0 -2
  31. package/definitions/database/ApiKeys.js +0 -2
  32. package/definitions/database/Stored.js +0 -7
  33. package/definitions/database/UsageStat.js +0 -2
  34. package/definitions/database/User.js +0 -2
  35. package/definitions/json_schemas/consumer-schema.json +0 -1226
  36. package/definitions/json_schemas/producer-schema.json +0 -308
  37. package/definitions/json_schemas/project-schema.json +0 -100
  38. package/definitions/json_schemas/source-schema.json +0 -249
  39. package/definitions/requests/ConsumerRequest.js +0 -2
  40. package/definitions/requests/Developer.js +0 -2
  41. package/definitions/requests/Mapping.js +0 -2
  42. package/definitions/requests/ProducerRequest.js +0 -2
  43. package/definitions/requests/Request.js +0 -2
  44. package/definitions/resources/Compiled.js +0 -2
  45. package/definitions/resources/Consumer.js +0 -2
  46. package/definitions/resources/Environment.js +0 -2
  47. package/definitions/resources/Library.js +0 -2
  48. package/definitions/resources/Producer.js +0 -2
  49. package/definitions/resources/Project.js +0 -2
  50. package/definitions/resources/Schema.js +0 -2
  51. package/definitions/resources/Source.js +0 -2
  52. package/definitions/temp.js +0 -2
  53. package/definitions/transform/Transformations.js +0 -2
  54. package/drivers/DeltaShareDriver.js +0 -186
  55. package/drivers/DriverFactory.js +0 -72
  56. package/drivers/DriverHelper.js +0 -248
  57. package/drivers/HttpApiDriver.js +0 -208
  58. package/drivers/RedshiftDriver.js +0 -184
  59. package/drivers/files/LocalDestinationDriver.js +0 -146
  60. package/drivers/files/LocalSourceDriver.js +0 -405
  61. package/drivers/s3/S3DestinationDriver.js +0 -197
  62. package/drivers/s3/S3SourceDriver.js +0 -495
  63. package/engines/CryptoEngine.js +0 -75
  64. package/engines/Environment.js +0 -170
  65. package/engines/ProcessENVManager.js +0 -83
  66. package/engines/RandomEngine.js +0 -47
  67. package/engines/SecretManager.js +0 -23
  68. package/engines/UserManager.js +0 -66
  69. package/engines/ai/AutoMapperEngine.js +0 -37
  70. package/engines/ai/DeveloperEngine.js +0 -497
  71. package/engines/ai/LLM.js +0 -255
  72. package/engines/consumer/ConsumerManager.js +0 -218
  73. package/engines/consumer/ConsumerOnFinishManager.js +0 -202
  74. package/engines/dataset/Dataset.js +0 -824
  75. package/engines/dataset/DatasetManager.js +0 -211
  76. package/engines/dataset/DatasetRecord.js +0 -120
  77. package/engines/dataset/DatasetRecordPool.js +0 -77
  78. package/engines/execution/RequestExecutor.js +0 -67
  79. package/engines/parsing/CSVParser.js +0 -60
  80. package/engines/parsing/LineParser.js +0 -71
  81. package/engines/parsing/ParseCompression.js +0 -101
  82. package/engines/parsing/ParseHelper.js +0 -18
  83. package/engines/parsing/ParseManager.js +0 -54
  84. package/engines/parsing/XLSParser.js +0 -87
  85. package/engines/parsing/XMLParser.js +0 -115
  86. package/engines/producer/ProducerEngine.js +0 -127
  87. package/engines/producer/ProducerManager.js +0 -43
  88. package/engines/scheduler/CronScheduler.js +0 -222
  89. package/engines/scheduler/QueueManager.js +0 -314
  90. package/engines/schema/SchemaValidator.js +0 -67
  91. package/engines/transform/JoinEngine.js +0 -232
  92. package/engines/transform/TransformationEngine.js +0 -277
  93. package/engines/transform/TypeCaster.js +0 -59
  94. package/engines/usage/DataframeManager.js +0 -55
  95. package/engines/usage/UsageDataManager.js +0 -151
  96. package/engines/usage/UsageManager.js +0 -65
  97. package/engines/validation/Validator.js +0 -216
  98. package/executors/ConsumerExecutor.js +0 -280
  99. package/executors/Executor.js +0 -177
  100. package/executors/ExecutorOrchestrator.js +0 -331
  101. package/executors/ExecutorPerformance.js +0 -17
  102. package/executors/ExecutorProgress.js +0 -54
  103. package/executors/ExecutorScope.js +0 -52
  104. package/executors/OutputExecutor.js +0 -118
  105. package/executors/ProducerExecutor.js +0 -108
  106. package/helper/Helper.js +0 -149
  107. package/helper/Logger.js +0 -84
  108. package/helper/Runtime.js +0 -20
  109. package/helper/Settings.js +0 -13
  110. package/licencing/LicenceManager.js +0 -64
  111. package/settings.js +0 -12
@@ -1,1226 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "title": "Consumer Schema",
4
- "description": "Schema for defining data consumers",
5
- "type": "object",
6
- "properties": {
7
- "$schema": {
8
- "type": "string",
9
- "format": "uri"
10
- },
11
- "name": {
12
- "type": "string",
13
- "description": "The name of the consumer"
14
- },
15
- "description": {
16
- "type": "string",
17
- "description": "Optional description of the consumer"
18
- },
19
- "producers": {
20
- "type": "array",
21
- "description": "The 'FROM' elements of the SQL query (only the first one is in the FROM clause, others are joined in)",
22
- "items": {
23
- "type": "object",
24
- "properties": {
25
- "name": {
26
- "type": "string",
27
- "description": "The name of an available producer/consumer"
28
- },
29
- "joins": {
30
- "type": "array",
31
- "items": {
32
- "type": "object",
33
- "properties": {
34
- "otherName": {
35
- "type": "string",
36
- "description": "The name of the other producer to JOIN with from the list of producers"
37
- },
38
- "relationship": {
39
- "type": "string",
40
- "enum": [
41
- "one-to-one",
42
- "one-to-many",
43
- "many-to-one"
44
- ],
45
- "description": "The type of join relationship"
46
- },
47
- "sql": {
48
- "type": "string",
49
- "description": "The SQL to use to perform the join"
50
- }
51
- },
52
- "required": [
53
- "otherName",
54
- "relationship",
55
- "sql"
56
- ],
57
- "additionalProperties": false
58
- }
59
- },
60
- "union": {
61
- "type": "boolean",
62
- "description": "Merges the data from the various producers in a single dataset. They must have the same output dimensions. If true, then you can't set any joins on any producer, since all producers are merged in a single dataset."
63
- },
64
- "isOptional": {
65
- "type": "boolean",
66
- "description": "If true, if the data for this producer is not available when executing the consumer (e.g. the file is not present) the consumer will not fail, but just create a placeholder dataset and continue execution."
67
- }
68
- },
69
- "required": [
70
- "name"
71
- ],
72
- "additionalProperties": false
73
- },
74
- "minItems": 1
75
- },
76
- "fields": {
77
- "type": "array",
78
- "description": "The fields to include in the consumer",
79
- "items": {
80
- "type": "object",
81
- "properties": {
82
- "key": {
83
- "type": "string",
84
- "description": "The dimension/measure of the producer OR '*'. If '*' then return all dimensions"
85
- },
86
- "alias": {
87
- "type": "string",
88
- "description": "If set, changes the key returned by the consumer to this alias"
89
- },
90
- "from": {
91
- "type": "string",
92
- "description": "If the key is ambiguous, set a 'from' with the name of the producer/consumer to get the key from"
93
- },
94
- "grouping": {
95
- "type": "object",
96
- "description": "If set, group resulting items that have the same value for the 'groupingKey'",
97
- "properties": {
98
- "groupingKey": {
99
- "type": "string",
100
- "description": "Used to create hierarchical data structure (parent -> children)"
101
- },
102
- "subFields": {
103
- "type": "array",
104
- "description": "Recursive structure defining fields that should be pulled inside this grouped field",
105
- "items": {
106
- "$ref": "#/definitions/consumerField"
107
- }
108
- }
109
- },
110
- "required": [
111
- "groupingKey",
112
- "subFields"
113
- ],
114
- "additionalProperties": false
115
- },
116
- "transform": {
117
- "description": "Optional list of transformations to apply to the dataset before returning the data",
118
- "oneOf": [
119
- {
120
- "$ref": "#/definitions/singleTransformation"
121
- },
122
- {
123
- "type": "array",
124
- "items": {
125
- "$ref": "#/definitions/singleTransformation"
126
- },
127
- "description": "A list of transformations to be applied in sequence"
128
- }
129
- ]
130
- },
131
- "validate": {
132
- "type": "object",
133
- "description": "Rules to check field value compliance and data quality",
134
- "properties": {
135
- "min": {
136
- "type": "number",
137
- "description": "Minimum value for numeric fields"
138
- },
139
- "max": {
140
- "type": "number",
141
- "description": "Maximum value for numeric fields"
142
- },
143
- "regex": {
144
- "type": "string",
145
- "description": "Regular expression pattern to validate string fields"
146
- },
147
- "required": {
148
- "type": "boolean",
149
- "description": "Whether the field is required"
150
- }
151
- },
152
- "additionalProperties": false
153
- },
154
- "onError": {
155
- "type": "string",
156
- "description": "Action to take if an error occurs during transformations or validation",
157
- "enum": ["set_default", "skip", "fail"]
158
- },
159
- "default": {
160
- "description": "Default value of the field if it is missing (or on error if specified)"
161
- },
162
- "hidden": {
163
- "type": "boolean",
164
- "description": "If set, the field is kept and used during processing, but omitted when exporting the data"
165
- },
166
- "fixed": {
167
- "type": "boolean",
168
- "description": "If set, \"default\" must have a value. This field is not searched in the underlying dataset, but is a fixed value set by the \"default\" prop."
169
- }
170
- },
171
- "required": [
172
- "key"
173
- ],
174
- "additionalProperties": false
175
- },
176
- "minItems": 1
177
- },
178
- "outputs": {
179
- "type": "array",
180
- "description": "Output formats and configurations for the consumer",
181
- "items": {
182
- "type": "object",
183
- "properties": {
184
- "format": {
185
- "type": "string",
186
- "enum": [
187
- "SQL",
188
- "API",
189
- "CSV",
190
- "PARQUET",
191
- "JSON"
192
- ],
193
- "description": "The output format of the consumer"
194
- },
195
- "accelerated": {
196
- "type": "boolean",
197
- "description": "If true and supported, the consumer will be materialized to improve query performance"
198
- },
199
- "direct": {
200
- "type": "boolean",
201
- "description": "If true, no view is created on the consumer side due to permission limitations"
202
- },
203
- "exportDestination": {
204
- "type": "string",
205
- "description": "The name of the source where the consumer will export its data when deployed/run"
206
- },
207
- "exportName": {
208
- "type": "string",
209
- "description": "If the format is a file, forces the same name in the export file (extension is auto-added)"
210
- },
211
- "trigger": {
212
- "type": "object",
213
- "description": "Triggers to perform the export (not just the usual 'Deploy')",
214
- "properties": {
215
- "type": {
216
- "type": "string",
217
- "enum": [
218
- "CRON",
219
- "API",
220
- "QUEUE"
221
- ],
222
- "description": "The type of trigger schedule. CRON: time-based scheduling. API: HTTP endpoint trigger. QUEUE: SQS queue message trigger (supports shared queues with message type filtering)."
223
- },
224
- "value": {
225
- "type": "string",
226
- "description": "The value for the trigger. For CRON: cron expression (e.g., '0 0 * * *'). For API: endpoint path. For QUEUE: SQS queue URL or queue name (will construct full URL using metadata.region and metadata.accountId if needed)."
227
- },
228
- "metadata": {
229
- "type": "object",
230
- "description": "Additional metadata for the trigger (e.g., AWS credentials, message type filter)",
231
- "properties": {
232
- "messageType": {
233
- "type": "string",
234
- "description": "Optional message type filter for QUEUE triggers. Only messages with matching 'type', 'messageType', or 'eventType' fields will be processed by this consumer. Messages without a matching type will be left in the queue for other consumers, enabling shared queue usage."
235
- },
236
- "region": {
237
- "type": "string",
238
- "description": "AWS region for the queue (for QUEUE triggers)"
239
- },
240
- "accountId": {
241
- "type": "string",
242
- "description": "AWS account ID for constructing queue URL (for QUEUE triggers)"
243
- },
244
- "accessKeyId": {
245
- "type": "string",
246
- "description": "AWS access key ID for queue authentication (for QUEUE triggers)"
247
- },
248
- "secretAccessKey": {
249
- "type": "string",
250
- "description": "AWS secret access key for queue authentication (for QUEUE triggers)"
251
- },
252
- "sessionToken": {
253
- "type": "string",
254
- "description": "AWS session token for temporary credentials (for QUEUE triggers)"
255
- }
256
- },
257
- "additionalProperties": {
258
- "type": "string"
259
- }
260
- }
261
- },
262
- "required": [
263
- "type",
264
- "value"
265
- ],
266
- "additionalProperties": false
267
- },
268
- "onSuccess": {
269
- "type": "array",
270
- "description": "Actions to perform when the output operation completes successfully",
271
- "items": {
272
- "$ref": "#/definitions/consumerOutputOnFinish"
273
- }
274
- },
275
- "onError": {
276
- "type": "array",
277
- "description": "Actions to perform when the output operation fails",
278
- "items": {
279
- "$ref": "#/definitions/consumerOutputOnFinish"
280
- }
281
- }
282
- },
283
- "required": [
284
- "format"
285
- ],
286
- "additionalProperties": false
287
- },
288
- "minItems": 1
289
- },
290
- "filters": {
291
- "type": "array",
292
- "description": "Filters to apply to the consumer data",
293
- "items": {
294
- "type": "object",
295
- "properties": {
296
- "sql": {
297
- "type": "string",
298
- "description": "The SQL to use to filter on the included dimension"
299
- },
300
- "rule": {
301
- "type": "object",
302
- "description": "Non-SQL based filtering logic",
303
- "properties": {
304
- "member": {
305
- "type": "string",
306
- "description": "The field to filter on. Use the \"alias\" if specified"
307
- },
308
- "operator": {
309
- "type": "string",
310
- "enum": [
311
- "equals",
312
- "notEquals",
313
- "contains",
314
- "notContains",
315
- "startsWith",
316
- "endsWith",
317
- "greaterThan",
318
- "greaterThanOrEquals",
319
- "lessThan",
320
- "lessThanOrEquals",
321
- "in",
322
- "notIn",
323
- "between",
324
- "notBetween",
325
- "isNull",
326
- "isNotNull",
327
- "true",
328
- "false",
329
- "matches",
330
- "notMatches",
331
- "sql"
332
- ],
333
- "description": "The filter operator to apply"
334
- },
335
- "values": {
336
- "type": "array",
337
- "items": {
338
- "type": "string"
339
- },
340
- "description": "The values to filter against"
341
- }
342
- },
343
- "required": [
344
- "member",
345
- "operator",
346
- "values"
347
- ],
348
- "additionalProperties": false
349
- }
350
- },
351
- "additionalProperties": false
352
- }
353
- },
354
- "metadata": {
355
- "type": "object",
356
- "description": "Any tags to add to this consumer for sorting and organizing",
357
- "additionalProperties": {
358
- "type": "string"
359
- }
360
- },
361
- "project": {
362
- "type": "string",
363
- "description": "Tag that groups consumers together to make them accessible by a singular api_key"
364
- },
365
- "options": {
366
- "type": "object",
367
- "description": "Additional options for the consumer",
368
- "properties": {
369
- "distinct": {
370
- "type": "boolean",
371
- "description": "If true, then the result set will only contain DISTINCT values"
372
- },
373
- "distinctOn": {
374
- "type": "object",
375
- "description": "Performs a distinct operation on specific key(s) and applies collision resolution rules to determine which record to keep when duplicates are found",
376
- "properties": {
377
- "keys": {
378
- "type": "array",
379
- "items": {
380
- "type": "string"
381
- },
382
- "minItems": 1,
383
- "description": "The field(s) to use for determining uniqueness. Use the 'alias' if specified. Can be a single field or multiple fields for composite keys."
384
- },
385
- "resolution": {
386
- "type": "object",
387
- "description": "Rules to determine which record to keep when duplicates are found",
388
- "properties": {
389
- "strategy": {
390
- "type": "string",
391
- "enum": ["first", "last", "min", "max"],
392
- "description": "Strategy for resolving which record to keep. 'first': Keep the first record based on orderBy field. 'last': Keep the last record based on orderBy field. 'min': Keep the record with the minimum value in orderBy field. 'max': Keep the record with the maximum value in orderBy field."
393
- },
394
- "orderBy": {
395
- "type": "string",
396
- "description": "Required for 'first', 'last', 'min', 'max' strategies. The field to use for ordering/comparison when selecting the record to keep."
397
- },
398
- "direction": {
399
- "type": "string",
400
- "enum": ["asc", "desc"],
401
- "default": "asc",
402
- "description": "For 'first' and 'last' strategies, the sort direction."
403
- }
404
- },
405
- "required": ["strategy"],
406
- "additionalProperties": false
407
- }
408
- },
409
- "required": ["keys", "resolution"],
410
- "additionalProperties": false
411
- }
412
- },
413
- "additionalProperties": false
414
- },
415
- "schema": {
416
- "type": "string",
417
- "description": "The name of the JSON schema in this project that this consumer needs to adhere to"
418
- },
419
- "_version": {
420
- "type": "number",
421
- "description": "Version number of the consumer configuration"
422
- }
423
- },
424
- "required": [
425
- "name",
426
- "producers",
427
- "fields",
428
- "outputs"
429
- ],
430
- "additionalProperties": false,
431
- "definitions": {
432
- "consumerField": {
433
- "type": "object",
434
- "properties": {
435
- "key": {
436
- "type": "string",
437
- "description": "The dimension/measure of the producer OR '*'. If '*' then return all dimensions"
438
- },
439
- "alias": {
440
- "type": "string",
441
- "description": "If set, changes the key returned by the consumer to this alias"
442
- },
443
- "from": {
444
- "type": "string",
445
- "description": "If the key is ambiguous, set a 'from' with the name of the producer/consumer to get the key from"
446
- },
447
- "grouping": {
448
- "type": "object",
449
- "description": "If set, group resulting items that have the same value for the 'groupingKey'",
450
- "properties": {
451
- "groupingKey": {
452
- "type": "string",
453
- "description": "Used to create hierarchical data structure (parent -> children)"
454
- },
455
- "subFields": {
456
- "type": "array",
457
- "description": "Recursive structure defining fields that should be pulled inside this grouped field",
458
- "items": {
459
- "$ref": "#/definitions/consumerField"
460
- }
461
- }
462
- },
463
- "required": [
464
- "groupingKey",
465
- "subFields"
466
- ],
467
- "additionalProperties": false
468
- },
469
- "transform": {
470
- "description": "Optional list of transformations to apply to the dataset before returning the data",
471
- "oneOf": [
472
- {
473
- "$ref": "#/definitions/singleTransformation"
474
- },
475
- {
476
- "type": "array",
477
- "items": {
478
- "$ref": "#/definitions/singleTransformation"
479
- },
480
- "description": "A list of transformations to be applied in sequence"
481
- }
482
- ]
483
- },
484
- "validate": {
485
- "type": "object",
486
- "description": "Rules to check field value compliance and data quality",
487
- "properties": {
488
- "min": {
489
- "type": "number",
490
- "description": "Minimum value for numeric fields"
491
- },
492
- "max": {
493
- "type": "number",
494
- "description": "Maximum value for numeric fields"
495
- },
496
- "regex": {
497
- "type": "string",
498
- "description": "Regular expression pattern to validate string fields"
499
- },
500
- "required": {
501
- "type": "boolean",
502
- "description": "Whether the field is required"
503
- }
504
- },
505
- "additionalProperties": false
506
- },
507
- "onError": {
508
- "type": "string",
509
- "description": "Action to take if an error occurs during transformations or validation",
510
- "enum": ["set_default", "skip", "fail"]
511
- },
512
- "default": {
513
- "description": "Default value of the field if it is missing (or on error if specified)"
514
- },
515
- "hidden": {
516
- "type": "boolean",
517
- "description": "If set, the field is kept and used during processing, but omitted when exporting the data"
518
- },
519
- "fixed": {
520
- "type": "boolean",
521
- "description": "If set, \"default\" must have a value. This field is not searched in the underlying dataset, but is a fixed value set by the \"default\" prop."
522
- }
523
- },
524
- "required": [
525
- "key"
526
- ],
527
- "additionalProperties": false
528
- },
529
- "singleTransformation": {
530
- "oneOf": [
531
- {
532
- "type": "object",
533
- "properties": {
534
- "cast": {
535
- "type": "string",
536
- "description": "Cast the value to a specific type",
537
- "enum": ["string", "number", "datetime", "boolean"]
538
- },
539
- "format": {
540
- "type": "string",
541
- "description": "Optional format for date parsing or string formatting (e.g. YYYY-MM-DD, DD/MM/YY)"
542
- }
543
- },
544
- "required": ["cast"],
545
- "additionalProperties": false
546
- },
547
- {
548
- "type": "object",
549
- "properties": {
550
- "multiply": {
551
- "type": "number",
552
- "description": "Multiply the numeric value by this factor"
553
- }
554
- },
555
- "required": ["multiply"],
556
- "additionalProperties": false
557
- },
558
- {
559
- "type": "object",
560
- "properties": {
561
- "add": {
562
- "type": "number",
563
- "description": "Add this number to the numeric value"
564
- }
565
- },
566
- "required": ["add"],
567
- "additionalProperties": false
568
- },
569
- {
570
- "type": "object",
571
- "properties": {
572
- "extract": {
573
- "type": "string",
574
- "enum": ["year", "month", "day", "hour", "minute"],
575
- "description": "Extract a component from a date value"
576
- }
577
- },
578
- "required": ["extract"],
579
- "additionalProperties": false
580
- },
581
- {
582
- "type": "object",
583
- "properties": {
584
- "concat": {
585
- "type": "object",
586
- "properties": {
587
- "separator": {
588
- "type": "string",
589
- "description": "The separator to use when joining array elements"
590
- }
591
- },
592
- "required": ["separator"],
593
- "additionalProperties": false
594
- }
595
- },
596
- "required": ["concat"],
597
- "additionalProperties": false
598
- },
599
- {
600
- "type": "object",
601
- "properties": {
602
- "split": {
603
- "type": "object",
604
- "properties": {
605
- "separator": {
606
- "type": "string",
607
- "description": "The separator to use when splitting the string"
608
- },
609
- "index": {
610
- "type": "number",
611
- "description": "The index of the split part to keep"
612
- }
613
- },
614
- "required": ["separator", "index"],
615
- "additionalProperties": false
616
- }
617
- },
618
- "required": ["split"],
619
- "additionalProperties": false
620
- },
621
- {
622
- "type": "object",
623
- "properties": {
624
- "regex_match": {
625
- "type": "object",
626
- "properties": {
627
- "pattern": {
628
- "type": "string",
629
- "description": "The regex pattern to test against"
630
- },
631
- "flags": {
632
- "type": "string",
633
- "description": "Regex flags (e.g., 'i' for case-insensitive)"
634
- }
635
- },
636
- "required": ["pattern"],
637
- "additionalProperties": false
638
- }
639
- },
640
- "required": ["regex_match"],
641
- "additionalProperties": false
642
- },
643
- {
644
- "type": "object",
645
- "properties": {
646
- "regex_replace": {
647
- "type": "object",
648
- "properties": {
649
- "pattern": {
650
- "type": "string",
651
- "description": "The regex pattern to match"
652
- },
653
- "replacement": {
654
- "type": "string",
655
- "description": "The replacement string"
656
- },
657
- "flags": {
658
- "type": "string",
659
- "description": "Regex flags (e.g., 'g' for global)"
660
- }
661
- },
662
- "required": ["pattern", "replacement"],
663
- "additionalProperties": false
664
- }
665
- },
666
- "required": ["regex_replace"],
667
- "additionalProperties": false
668
- },
669
- {
670
- "type": "object",
671
- "properties": {
672
- "regex_extract": {
673
- "type": "object",
674
- "properties": {
675
- "pattern": {
676
- "type": "string",
677
- "description": "The regex pattern to extract with"
678
- },
679
- "group": {
680
- "type": "number",
681
- "description": "The capture group index to extract (0 for full match)"
682
- },
683
- "flags": {
684
- "type": "string",
685
- "description": "Regex flags (e.g., 'i' for case-insensitive)"
686
- }
687
- },
688
- "required": ["pattern", "group"],
689
- "additionalProperties": false
690
- }
691
- },
692
- "required": ["regex_extract"],
693
- "additionalProperties": false
694
- },
695
- {
696
- "type": "object",
697
- "properties": {
698
- "trim": {
699
- "type": "boolean",
700
- "description": "Trim whitespace from both ends of the string"
701
- }
702
- },
703
- "required": ["trim"],
704
- "additionalProperties": false
705
- },
706
- {
707
- "type": "object",
708
- "properties": {
709
- "to_lowercase": {
710
- "type": "boolean",
711
- "description": "Convert string to lowercase"
712
- }
713
- },
714
- "required": ["to_lowercase"],
715
- "additionalProperties": false
716
- },
717
- {
718
- "type": "object",
719
- "properties": {
720
- "to_uppercase": {
721
- "type": "boolean",
722
- "description": "Convert string to uppercase"
723
- }
724
- },
725
- "required": ["to_uppercase"],
726
- "additionalProperties": false
727
- },
728
- {
729
- "type": "object",
730
- "properties": {
731
- "capitalize": {
732
- "type": "boolean",
733
- "description": "Capitalize the first letter of the string"
734
- }
735
- },
736
- "required": ["capitalize"],
737
- "additionalProperties": false
738
- },
739
- {
740
- "type": "object",
741
- "properties": {
742
- "substring": {
743
- "type": "object",
744
- "properties": {
745
- "start": {
746
- "type": "number",
747
- "description": "Starting position of substring"
748
- },
749
- "end": {
750
- "type": "number",
751
- "description": "Optional ending position of substring"
752
- }
753
- },
754
- "required": ["start"],
755
- "additionalProperties": false
756
- }
757
- },
758
- "required": ["substring"],
759
- "additionalProperties": false
760
- },
761
- {
762
- "type": "object",
763
- "properties": {
764
- "pad_start": {
765
- "type": "object",
766
- "properties": {
767
- "length": {
768
- "type": "number",
769
- "description": "Desired string length after padding"
770
- },
771
- "char": {
772
- "type": "string",
773
- "description": "Character to pad with",
774
- "minLength": 1,
775
- "maxLength": 1
776
- }
777
- },
778
- "required": ["length", "char"],
779
- "additionalProperties": false
780
- }
781
- },
782
- "required": ["pad_start"],
783
- "additionalProperties": false
784
- },
785
- {
786
- "type": "object",
787
- "properties": {
788
- "pad_end": {
789
- "type": "object",
790
- "properties": {
791
- "length": {
792
- "type": "number",
793
- "description": "Desired string length after padding"
794
- },
795
- "char": {
796
- "type": "string",
797
- "description": "Character to pad with",
798
- "minLength": 1,
799
- "maxLength": 1
800
- }
801
- },
802
- "required": ["length", "char"],
803
- "additionalProperties": false
804
- }
805
- },
806
- "required": ["pad_end"],
807
- "additionalProperties": false
808
- },
809
- {
810
- "type": "object",
811
- "properties": {
812
- "prepend": {
813
- "type": "string",
814
- "description": "String to add at the beginning"
815
- }
816
- },
817
- "required": ["prepend"],
818
- "additionalProperties": false
819
- },
820
- {
821
- "type": "object",
822
- "properties": {
823
- "append": {
824
- "type": "string",
825
- "description": "String to add at the end"
826
- }
827
- },
828
- "required": ["append"],
829
- "additionalProperties": false
830
- },
831
- {
832
- "type": "object",
833
- "properties": {
834
- "combine_fields": {
835
- "type": "object",
836
- "properties": {
837
- "fields": {
838
- "type": "array",
839
- "items": {
840
- "type": "string"
841
- },
842
- "description": "Array of field names to combine",
843
- "minItems": 1
844
- },
845
- "separator": {
846
- "type": "string",
847
- "description": "Optional separator between fields (default: empty string)"
848
- },
849
- "template": {
850
- "type": "string",
851
- "description": "Optional template string with placeholders like '{field1} - {field2}'"
852
- }
853
- },
854
- "required": ["fields"],
855
- "additionalProperties": false
856
- }
857
- },
858
- "required": ["combine_fields"],
859
- "additionalProperties": false
860
- },
861
- {
862
- "type": "object",
863
- "description": "Apply conditional logic to transform values based on comparison conditions.",
864
- "properties": {
865
- "conditional": {
866
- "type": "object",
867
- "properties": {
868
- "clauses": {
869
- "type": "array",
870
- "description": "Array of if-then clauses evaluated in order. First matching clause wins.",
871
- "items": {
872
- "type": "object",
873
- "properties": {
874
- "if": {
875
- "$ref": "#/definitions/comparisonCondition"
876
- },
877
- "then": {
878
- "description": "The value to return if the condition matches",
879
- "oneOf": [
880
- { "type": "string" },
881
- { "type": "number" },
882
- { "type": "boolean" }
883
- ]
884
- }
885
- },
886
- "required": ["if", "then"],
887
- "additionalProperties": false
888
- },
889
- "minItems": 1
890
- },
891
- "else": {
892
- "description": "Default value if no clause matches. If not specified, the original value is kept.",
893
- "oneOf": [
894
- { "type": "string" },
895
- { "type": "number" },
896
- { "type": "boolean" },
897
- { "type": "null" }
898
- ]
899
- }
900
- },
901
- "required": ["clauses"],
902
- "additionalProperties": false
903
- }
904
- },
905
- "required": ["conditional"],
906
- "additionalProperties": false
907
- },
908
- {
909
- "type": "object",
910
- "properties": {
911
- "mask": {
912
- "type": "string",
913
- "enum": ["hash", "mask", "crypt", "random", "seeded-random", "none"],
914
- "description": "Apply masking to the field value for data privacy. Options: 'hash' (one-way hash), 'mask' (replace with asterisks), 'crypt' (reversible encryption), 'random' (random value), 'seeded-random' (consistent random value per input), 'none' (no masking)"
915
- }
916
- },
917
- "required": ["mask"],
918
- "additionalProperties": false
919
- }
920
- ]
921
- },
922
- "comparisonCondition": {
923
- "description": "A condition to compare a field value against. Exactly one comparison operator must be specified.",
924
- "oneOf": [
925
- {
926
- "type": "object",
927
- "description": "Check if the numeric value is greater than the specified number",
928
- "properties": {
929
- "greater_than": {
930
- "type": "number",
931
- "description": "The value must be greater than this number"
932
- }
933
- },
934
- "required": ["greater_than"],
935
- "additionalProperties": false
936
- },
937
- {
938
- "type": "object",
939
- "description": "Check if the numeric value is greater than or equal to the specified number",
940
- "properties": {
941
- "greater_than_or_equal": {
942
- "type": "number",
943
- "description": "The value must be greater than or equal to this number"
944
- }
945
- },
946
- "required": ["greater_than_or_equal"],
947
- "additionalProperties": false
948
- },
949
- {
950
- "type": "object",
951
- "description": "Check if the numeric value is less than the specified number",
952
- "properties": {
953
- "less_than": {
954
- "type": "number",
955
- "description": "The value must be less than this number"
956
- }
957
- },
958
- "required": ["less_than"],
959
- "additionalProperties": false
960
- },
961
- {
962
- "type": "object",
963
- "description": "Check if the numeric value is less than or equal to the specified number",
964
- "properties": {
965
- "less_than_or_equal": {
966
- "type": "number",
967
- "description": "The value must be less than or equal to this number"
968
- }
969
- },
970
- "required": ["less_than_or_equal"],
971
- "additionalProperties": false
972
- },
973
- {
974
- "type": "object",
975
- "description": "Check if the value equals the specified value (strict equality)",
976
- "properties": {
977
- "equals": {
978
- "description": "The value must equal this exactly",
979
- "oneOf": [
980
- { "type": "string" },
981
- { "type": "number" },
982
- { "type": "boolean" }
983
- ]
984
- }
985
- },
986
- "required": ["equals"],
987
- "additionalProperties": false
988
- },
989
- {
990
- "type": "object",
991
- "description": "Check if the value does not equal the specified value",
992
- "properties": {
993
- "not_equals": {
994
- "description": "The value must not equal this",
995
- "oneOf": [
996
- { "type": "string" },
997
- { "type": "number" },
998
- { "type": "boolean" }
999
- ]
1000
- }
1001
- },
1002
- "required": ["not_equals"],
1003
- "additionalProperties": false
1004
- },
1005
- {
1006
- "type": "object",
1007
- "description": "Check if the value is in the specified list of values",
1008
- "properties": {
1009
- "in": {
1010
- "type": "array",
1011
- "description": "The value must be one of these values",
1012
- "items": {
1013
- "oneOf": [
1014
- { "type": "string" },
1015
- { "type": "number" },
1016
- { "type": "boolean" }
1017
- ]
1018
- },
1019
- "minItems": 1
1020
- }
1021
- },
1022
- "required": ["in"],
1023
- "additionalProperties": false
1024
- },
1025
- {
1026
- "type": "object",
1027
- "description": "Check if the value is not in the specified list of values",
1028
- "properties": {
1029
- "not_in": {
1030
- "type": "array",
1031
- "description": "The value must not be any of these values",
1032
- "items": {
1033
- "oneOf": [
1034
- { "type": "string" },
1035
- { "type": "number" },
1036
- { "type": "boolean" }
1037
- ]
1038
- },
1039
- "minItems": 1
1040
- }
1041
- },
1042
- "required": ["not_in"],
1043
- "additionalProperties": false
1044
- },
1045
- {
1046
- "type": "object",
1047
- "description": "Check if the string value starts with the specified prefix",
1048
- "properties": {
1049
- "starts_with": {
1050
- "type": "string",
1051
- "description": "The string value must start with this prefix"
1052
- }
1053
- },
1054
- "required": ["starts_with"],
1055
- "additionalProperties": false
1056
- },
1057
- {
1058
- "type": "object",
1059
- "description": "Check if the string value ends with the specified suffix",
1060
- "properties": {
1061
- "ends_with": {
1062
- "type": "string",
1063
- "description": "The string value must end with this suffix"
1064
- }
1065
- },
1066
- "required": ["ends_with"],
1067
- "additionalProperties": false
1068
- },
1069
- {
1070
- "type": "object",
1071
- "description": "Check if the string value contains the specified substring",
1072
- "properties": {
1073
- "contains": {
1074
- "type": "string",
1075
- "description": "The string value must contain this substring"
1076
- }
1077
- },
1078
- "required": ["contains"],
1079
- "additionalProperties": false
1080
- },
1081
- {
1082
- "type": "object",
1083
- "description": "Check if the string value does not contain the specified substring",
1084
- "properties": {
1085
- "not_contains": {
1086
- "type": "string",
1087
- "description": "The string value must not contain this substring"
1088
- }
1089
- },
1090
- "required": ["not_contains"],
1091
- "additionalProperties": false
1092
- },
1093
- {
1094
- "type": "object",
1095
- "description": "Check if the value is empty (null, undefined, or blank string)",
1096
- "properties": {
1097
- "is_empty": {
1098
- "type": "boolean",
1099
- "const": true,
1100
- "description": "Returns true if the value is null, undefined, or an empty/whitespace-only string"
1101
- }
1102
- },
1103
- "required": ["is_empty"],
1104
- "additionalProperties": false
1105
- },
1106
- {
1107
- "type": "object",
1108
- "description": "Check if the value is not empty (has content)",
1109
- "properties": {
1110
- "is_not_empty": {
1111
- "type": "boolean",
1112
- "const": true,
1113
- "description": "Returns true if the value is not null, not undefined, and not an empty/whitespace-only string"
1114
- }
1115
- },
1116
- "required": ["is_not_empty"],
1117
- "additionalProperties": false
1118
- }
1119
- ]
1120
- },
1121
- "consumerOutputOnFinish": {
1122
- "type": "object",
1123
- "description": "Actions to perform when output operations complete",
1124
- "properties": {
1125
- "action": {
1126
- "type": "string",
1127
- "enum": ["move-file"],
1128
- "description": "The action to perform"
1129
- },
1130
- "moveToDestination": {
1131
- "type": "string",
1132
- "description": "If the action is 'move-file', this specifies the source destination in remora where the source file should be moved"
1133
- }
1134
- },
1135
- "required": ["action"],
1136
- "additionalProperties": false
1137
- }
1138
- },
1139
- "examples": [
1140
- {
1141
- "name": "UserOrderAnalytics",
1142
- "description": "Consumer that combines user data with their order history",
1143
- "producers": [
1144
- {
1145
- "name": "UserData",
1146
- "joins": [
1147
- {
1148
- "otherName": "OrderData",
1149
- "relationship": "one-to-many",
1150
- "sql": "${P.id} = ${OrderData.user_id}"
1151
- }
1152
- ]
1153
- },
1154
- {
1155
- "name": "OrderData"
1156
- }
1157
- ],
1158
- "fields": [
1159
- {
1160
- "key": "id",
1161
- "from": "UserData"
1162
- },
1163
- {
1164
- "key": "name",
1165
- "alias": "user_name",
1166
- "from": "UserData"
1167
- },
1168
- {
1169
- "key": "email",
1170
- "from": "UserData"
1171
- },
1172
- {
1173
- "key": "orders",
1174
- "grouping": {
1175
- "groupingKey": "order_items",
1176
- "subFields": [
1177
- {
1178
- "key": "id",
1179
- "from": "OrderData",
1180
- "alias": "order_id"
1181
- },
1182
- {
1183
- "key": "created_at",
1184
- "from": "OrderData"
1185
- },
1186
- {
1187
- "key": "total_amount",
1188
- "from": "OrderData"
1189
- }
1190
- ]
1191
- }
1192
- }
1193
- ],
1194
- "outputs": [
1195
- {
1196
- "format": "API"
1197
- },
1198
- {
1199
- "format": "JSON",
1200
- "exportDestination": "Data Lake",
1201
- "trigger": {
1202
- "type": "CRON",
1203
- "value": "0 0 * * *"
1204
- }
1205
- }
1206
- ],
1207
- "filters": [
1208
- {
1209
- "rule": {
1210
- "member": "total_amount",
1211
- "operator": "greaterThan",
1212
- "values": [
1213
- "100"
1214
- ]
1215
- }
1216
- }
1217
- ],
1218
- "metadata": {
1219
- "department": "Sales",
1220
- "owner": "analytics-team"
1221
- },
1222
- "project": "sales-analytics",
1223
- "_version": 1
1224
- }
1225
- ]
1226
- }