@forzalabs/remora 2.1.1 → 2.2.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.
@@ -634,7 +634,25 @@
634
634
  },
635
635
  "maximumFileSize": {
636
636
  "type": "number",
637
- "description": "The maximum size of each output file, expressed in Gb. When the current output file exceeds this size it is rotated and a new file is started."
637
+ "description": "Shorthand for split.maxFileSizeGb: the maximum size of each output file, expressed in Gb. When the current output file reaches this size it is rotated and a new numbered file is started. Can't be combined with 'split'."
638
+ },
639
+ "split": {
640
+ "type": "object",
641
+ "description": "Splits the output into several files: by the value of one or more fields, by a size cap, or both (key first, then size within each key). At least one of the two properties must be set.",
642
+ "properties": {
643
+ "by": {
644
+ "type": "array",
645
+ "items": {
646
+ "type": "string"
647
+ },
648
+ "description": "Consumer field key(s) — the alias where one is set. Each distinct combination of values is written to its own file, named after the value(s). A null value buckets as '_null' and an empty one as '_empty'."
649
+ },
650
+ "maxFileSizeGb": {
651
+ "type": "number",
652
+ "description": "The maximum size of ONE output file, expressed in Gb. With 'by' set the cap applies per key, not across the whole output."
653
+ }
654
+ },
655
+ "additionalProperties": false
638
656
  },
639
657
  "_version": {
640
658
  "type": "number",
@@ -58,16 +58,12 @@
58
58
  "properties": {
59
59
  "sqlTable": {
60
60
  "type": "string",
61
- "description": "The SQL table name, which is a concise way of setting the sql property to 'SELECT * FROM <sql table name>'"
61
+ "description": "The table a SQL producer reads, as 'table' or 'schema.table'. The statement is built from it and the producer's dimensions"
62
62
  },
63
63
  "direct": {
64
64
  "type": "boolean",
65
65
  "description": "If true, no view is created on the producer side due to permission limitations"
66
66
  },
67
- "sql": {
68
- "type": "string",
69
- "description": "The name of the file that has the SQL statement to run to create this producer"
70
- },
71
67
  "fileKey": {
72
68
  "type": "string",
73
69
  "description": "For S3/local sources: the file key/path that identifies the file to read. For HTTP API sources: the API endpoint path (e.g., '/api/v1/users')"
@@ -126,7 +122,7 @@
126
122
  },
127
123
  "disablePushdown": {
128
124
  "type": "boolean",
129
- "description": "Stops the run's filters and record limit from being sent to the source as query hints (Delta Share). Both are still applied here, so this only costs bandwidth."
125
+ "description": "Stops the run's filters and record limit from being sent to the source — as query hints on a Delta Share, as a WHERE and a LIMIT on a SQL source. Both are still applied here, so this only costs bandwidth."
130
126
  },
131
127
  "hasHeaderRow": {
132
128
  "type": "boolean",
@@ -254,7 +250,7 @@
254
250
  },
255
251
  "nullable": {
256
252
  "type": "boolean",
257
- "description": "Declares whether this dimension is allowed to hold null/missing values. Descriptive metadata only: it documents intent for consumers, schema generation and AI mappers, and does not change runtime behaviour (nulls are already passed through untouched). Use a consumer field 'required' validation to enforce presence."
253
+ "description": "Declares whether this dimension is allowed to hold null/missing values. Defaults to true. A missing value (null, or the empty field a NULL is staged as) is kept as null; set this to false to get the type's own empty value instead (string -> \"\", number -> 0, boolean -> false; a datetime stays null, having no empty value). Use a consumer field 'required' validation to reject a missing value rather than fill it."
258
254
  },
259
255
  "classification": {
260
256
  "type": "array",
@@ -3,7 +3,7 @@
3
3
  "title": "Project Schema",
4
4
  "description": "Schema for defining remora project configuration",
5
5
  "type": "object",
6
- "required": ["name", "version", "consumers", "producers", "sources", "settings"],
6
+ "required": ["name", "version", "settings"],
7
7
  "properties": {
8
8
  "$schema": {
9
9
  "type": "string",
@@ -28,7 +28,8 @@
28
28
  "type": "string",
29
29
  "pattern": "^/"
30
30
  },
31
- "description": "Array of consumer paths"
31
+ "deprecated": true,
32
+ "description": "DEPRECATED and ignored. Resource folders are fixed: /sources, /producers, /consumers, /schemas and /code_sets. Remove this property"
32
33
  },
33
34
  "producers": {
34
35
  "type": "array",
@@ -36,7 +37,8 @@
36
37
  "type": "string",
37
38
  "pattern": "^/"
38
39
  },
39
- "description": "Array of producer paths"
40
+ "deprecated": true,
41
+ "description": "DEPRECATED and ignored. Resource folders are fixed: /sources, /producers, /consumers, /schemas and /code_sets. Remove this property"
40
42
  },
41
43
  "sources": {
42
44
  "type": "array",
@@ -44,7 +46,8 @@
44
46
  "type": "string",
45
47
  "pattern": "^/"
46
48
  },
47
- "description": "Array of source paths"
49
+ "deprecated": true,
50
+ "description": "DEPRECATED and ignored. Resource folders are fixed: /sources, /producers, /consumers, /schemas and /code_sets. Remove this property"
48
51
  },
49
52
  "schemas": {
50
53
  "type": "array",
@@ -52,7 +55,8 @@
52
55
  "type": "string",
53
56
  "pattern": "^/"
54
57
  },
55
- "description": "Array of schema paths"
58
+ "deprecated": true,
59
+ "description": "DEPRECATED and ignored. Resource folders are fixed: /sources, /producers, /consumers, /schemas and /code_sets. Remove this property"
56
60
  },
57
61
  "codeSets": {
58
62
  "type": "array",
@@ -60,7 +64,8 @@
60
64
  "type": "string",
61
65
  "pattern": "^/"
62
66
  },
63
- "description": "Optional array of code-set paths used to drive synthetic-data generation"
67
+ "deprecated": true,
68
+ "description": "DEPRECATED and ignored. Resource folders are fixed: /sources, /producers, /consumers, /schemas and /code_sets. Remove this property"
64
69
  },
65
70
  "settings": {
66
71
  "type": "object",
@@ -108,10 +113,6 @@
108
113
  "name": "analytics-project",
109
114
  "version": "1.0.0",
110
115
  "description": "Analytics data processing project",
111
- "consumers": ["/consumers"],
112
- "producers": ["/producers"],
113
- "sources": ["/sources"],
114
- "schemas": ["/schemas"],
115
116
  "settings": {
116
117
  "SQL_MAX_QUERY_ROWS": 10000,
117
118
  "API_QUEUE": {
@@ -25,7 +25,8 @@
25
25
  "aws-sqs",
26
26
  "local",
27
27
  "delta-share",
28
- "http-api"
28
+ "http-api",
29
+ "presigned-url"
29
30
  ],
30
31
  "description": "The type of data engine"
31
32
  },
@@ -229,6 +230,29 @@
229
230
  "description": "Request timeout in milliseconds",
230
231
  "default": 30000,
231
232
  "minimum": 1000
233
+ },
234
+ "signedUrlField": {
235
+ "type": "string",
236
+ "description": "presigned-url only. Dot path to the signed URL inside the minting endpoint's JSON response, e.g. 'data.uploadUrl'",
237
+ "default": "url"
238
+ },
239
+ "signedHeadersField": {
240
+ "type": "string",
241
+ "description": "presigned-url only. Dot path to an object of headers in the minting response. Set it when the minter signs headers (a Content-Type, an x-amz-*): the transfer must send them back verbatim or S3 answers 403 SignatureDoesNotMatch"
242
+ },
243
+ "fileNameParam": {
244
+ "type": "string",
245
+ "description": "presigned-url only. Name of the field carrying the file name to the minting endpoint - in the JSON body on a POST/PUT/PATCH, as a query parameter otherwise",
246
+ "default": "filename"
247
+ },
248
+ "signedUrlMethod": {
249
+ "type": "string",
250
+ "enum": [
251
+ "GET",
252
+ "PUT",
253
+ "POST"
254
+ ],
255
+ "description": "presigned-url only. HTTP method used against the signed URL itself. Defaults to GET when the source is read from and PUT when it is exported to"
232
256
  }
233
257
  },
234
258
  "required": [
@@ -377,6 +401,38 @@
377
401
  "scope": "delta_sharing"
378
402
  },
379
403
  "_version": 1
404
+ },
405
+ {
406
+ "name": "Partner upload",
407
+ "description": "Exports to a bucket we hold no credentials for: an API Gateway endpoint with M2M (OAuth2 client-credentials) auth signs an upload URL per file, and remora PUTs to it",
408
+ "engine": "presigned-url",
409
+ "authentication": {
410
+ "method": "oidc",
411
+ "url": "https://api.example.com/v1/uploads/presign",
412
+ "httpMethod": "POST",
413
+ "fileNameParam": "filename",
414
+ "signedUrlField": "uploadUrl",
415
+ "tokenEndpoint": "https://example.auth.eu-west-1.amazoncognito.com/oauth2/token",
416
+ "clientId": "{PRESIGN_CLIENT_ID}",
417
+ "clientSecret": "{PRESIGN_CLIENT_SECRET}",
418
+ "scope": "uploads/write"
419
+ },
420
+ "_version": 1
421
+ },
422
+ {
423
+ "name": "Partner download",
424
+ "description": "Reads a file signed on demand by an API key protected endpoint. The producer's fileKey is the name sent to it",
425
+ "engine": "presigned-url",
426
+ "authentication": {
427
+ "method": "api-key",
428
+ "url": "https://api.example.com/v1/downloads/presign",
429
+ "httpMethod": "GET",
430
+ "apiKey": "{PRESIGN_API_KEY}",
431
+ "apiKeyHeader": "x-api-key",
432
+ "fileNameParam": "key",
433
+ "signedUrlField": "data.url"
434
+ },
435
+ "_version": 1
380
436
  }
381
437
  ]
382
438
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forzalabs/remora",
3
- "version": "2.1.1",
3
+ "version": "2.2.0",
4
4
  "description": "A powerful CLI tool for seamless data translation.",
5
5
  "main": "index.js",
6
6
  "private": false,