@forzalabs/remora 2.3.0 → 2.4.0
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.
- package/CHANGELOG.md +46 -0
- package/documentation/README.md +1 -4
- package/index.js +776 -394
- package/json_schemas/consumer-schema.json +9 -10
- package/json_schemas/producer-schema.json +0 -38
- package/package.json +4 -2
- package/workers/ExecutorWorker.js +788 -389
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"properties": {
|
|
82
82
|
"key": {
|
|
83
83
|
"type": "string",
|
|
84
|
-
"description": "The dimension
|
|
84
|
+
"description": "The dimension of the producer, OR '*' for every dimension of one producer, OR a pattern holding a '*' (e.g. 'addr*Street') that selects every matching field — each keeping the rest of this field's configuration, so one entry can transform or validate a whole family of columns."
|
|
85
85
|
},
|
|
86
86
|
"description": {
|
|
87
87
|
"type": "string",
|
|
@@ -301,7 +301,7 @@
|
|
|
301
301
|
},
|
|
302
302
|
"outputs": {
|
|
303
303
|
"type": "array",
|
|
304
|
-
"description": "
|
|
304
|
+
"description": "Where and how the consumer exports its data. Exactly one: a run stages its records in one encoding and moves that file to the destination, so a second output has nothing left to write.",
|
|
305
305
|
"items": {
|
|
306
306
|
"type": "object",
|
|
307
307
|
"properties": {
|
|
@@ -311,9 +311,10 @@
|
|
|
311
311
|
"API",
|
|
312
312
|
"CSV",
|
|
313
313
|
"JSON",
|
|
314
|
+
"PARQUET",
|
|
314
315
|
"TXT"
|
|
315
316
|
],
|
|
316
|
-
"description": "The output format of the consumer. JSON/CSV/TXT export to a file destination; API exposes the result over the API."
|
|
317
|
+
"description": "The output format of the consumer. JSON/CSV/TXT/PARQUET export to a file destination; API exposes the result over the API. PARQUET writes a typed, SNAPPY-compressed columnar file whose schema comes from the consumer's dimension types."
|
|
317
318
|
},
|
|
318
319
|
"exportDestination": {
|
|
319
320
|
"type": "string",
|
|
@@ -325,15 +326,15 @@
|
|
|
325
326
|
},
|
|
326
327
|
"delimiter": {
|
|
327
328
|
"type": "string",
|
|
328
|
-
"description": "Only used when the format is 'TXT'. The single-character delimiter used between fields in the exported file. Defaults to a tab if not set."
|
|
329
|
+
"description": "Only used when the format is 'TXT'. The single-character delimiter used between fields in the exported file. Defaults to a tab if not set. Ignored by every other format, PARQUET included."
|
|
329
330
|
},
|
|
330
331
|
"header": {
|
|
331
332
|
"type": "boolean",
|
|
332
|
-
"description": "'CSV'/'TXT' only. Writes the field names as the first line of each exported file, quoted and delimited exactly as the rows under them. Defaults to true; set it to false for a destination that reads the first line as data."
|
|
333
|
+
"description": "'CSV'/'TXT' only. Writes the field names as the first line of each exported file, quoted and delimited exactly as the rows under them. Defaults to true; set it to false for a destination that reads the first line as data. Rejected on PARQUET, which carries its own schema."
|
|
333
334
|
},
|
|
334
335
|
"omitNull": {
|
|
335
336
|
"type": "boolean",
|
|
336
|
-
"description": "'JSON'/'API' only. Omits the fields whose value is null from each exported record instead of writing them as \"field\": null — worth it on a wide, sparse record. Records then legitimately differ in shape, so it is rejected on a positional format (CSV/TXT), and on a JSON output whose consumer also writes one, since every output is serialized from the same record."
|
|
337
|
+
"description": "'JSON'/'API' only. Omits the fields whose value is null from each exported record instead of writing them as \"field\": null — worth it on a wide, sparse record. Records then legitimately differ in shape, so it is rejected on a positional format (CSV/TXT/PARQUET), and on a JSON output whose consumer also writes one, since every output is serialized from the same record."
|
|
337
338
|
},
|
|
338
339
|
"trigger": {
|
|
339
340
|
"type": "object",
|
|
@@ -443,7 +444,8 @@
|
|
|
443
444
|
],
|
|
444
445
|
"additionalProperties": false
|
|
445
446
|
},
|
|
446
|
-
"minItems": 1
|
|
447
|
+
"minItems": 1,
|
|
448
|
+
"maxItems": 1
|
|
447
449
|
},
|
|
448
450
|
"filters": {
|
|
449
451
|
"type": "array",
|
|
@@ -1875,9 +1877,6 @@
|
|
|
1875
1877
|
}
|
|
1876
1878
|
],
|
|
1877
1879
|
"outputs": [
|
|
1878
|
-
{
|
|
1879
|
-
"format": "API"
|
|
1880
|
-
},
|
|
1881
1880
|
{
|
|
1882
1881
|
"format": "JSON",
|
|
1883
1882
|
"exportDestination": "Data Lake",
|
|
@@ -26,32 +26,6 @@
|
|
|
26
26
|
"items": { "$ref": "#/definitions/dimension" },
|
|
27
27
|
"minItems": 1
|
|
28
28
|
},
|
|
29
|
-
"measures": {
|
|
30
|
-
"type": "array",
|
|
31
|
-
"description": "Optional measures for the producer",
|
|
32
|
-
"items": {
|
|
33
|
-
"type": "object",
|
|
34
|
-
"properties": {
|
|
35
|
-
"name": {
|
|
36
|
-
"type": "string",
|
|
37
|
-
"description": "The name of the measure"
|
|
38
|
-
},
|
|
39
|
-
"description": {
|
|
40
|
-
"type": "string",
|
|
41
|
-
"description": "Optional description of the measure"
|
|
42
|
-
},
|
|
43
|
-
"sql": {
|
|
44
|
-
"type": "string",
|
|
45
|
-
"description": "SQL command used to create a metric"
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
"required": [
|
|
49
|
-
"name",
|
|
50
|
-
"sql"
|
|
51
|
-
],
|
|
52
|
-
"additionalProperties": false
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
29
|
"settings": {
|
|
56
30
|
"type": "object",
|
|
57
31
|
"description": "Settings for the producer",
|
|
@@ -515,18 +489,6 @@
|
|
|
515
489
|
"type": "datetime"
|
|
516
490
|
}
|
|
517
491
|
],
|
|
518
|
-
"measures": [
|
|
519
|
-
{
|
|
520
|
-
"name": "total_orders",
|
|
521
|
-
"description": "Total number of orders by this customer",
|
|
522
|
-
"sql": "COUNT(order_id)"
|
|
523
|
-
},
|
|
524
|
-
{
|
|
525
|
-
"name": "total_spent",
|
|
526
|
-
"description": "Total amount spent by this customer",
|
|
527
|
-
"sql": "SUM(order_amount)"
|
|
528
|
-
}
|
|
529
|
-
],
|
|
530
492
|
"settings": {
|
|
531
493
|
"sqlTable": "customers"
|
|
532
494
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forzalabs/remora",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
4
4
|
"description": "A powerful CLI tool for seamless data translation.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"private": false,
|
|
@@ -14,8 +14,9 @@
|
|
|
14
14
|
"sync:drivers": "cd ../.. && npm run build --workspace=@remora/app-drivers",
|
|
15
15
|
"watch:drivers": "cd ../.. && npm run dev --workspace=@remora/app-drivers",
|
|
16
16
|
"sync:internal": "cd ../.. && npm run sync:internal",
|
|
17
|
+
"sync:preview": "cd ../.. && npm run build:preview",
|
|
17
18
|
"watch:internal": "cd ../.. && npm run watch:internal",
|
|
18
|
-
"ts-check": "npx tsc --noemit",
|
|
19
|
+
"ts-check": "npm run sync:preview && npx tsc --noemit",
|
|
19
20
|
"perf": "npm run sync:internal && npm run fast-build && npm run copy-static-file && npx tsx ./scripts/perf/RunPerfBaseline.ts",
|
|
20
21
|
"perf:quick": "npx tsx ./scripts/perf/RunPerfBaseline.ts",
|
|
21
22
|
"init": "npm run sync:internal && npx tsx ./src/index.ts init",
|
|
@@ -64,6 +65,7 @@
|
|
|
64
65
|
"fast-xml-parser": "^5.3.5",
|
|
65
66
|
"fs-extra": "^11.1.0",
|
|
66
67
|
"hyparquet": "^1.17.4",
|
|
68
|
+
"hyparquet-writer": "^0.16.12",
|
|
67
69
|
"inquirer": "^8.2.5",
|
|
68
70
|
"json-schema": "^0.4.0",
|
|
69
71
|
"jsonwebtoken": "^9.0.2",
|