@openfn/language-hive 0.3.5 → 0.3.7
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/ast.json +13 -2
- package/package.json +2 -2
package/ast.json
CHANGED
|
@@ -342,7 +342,7 @@
|
|
|
342
342
|
"operation"
|
|
343
343
|
],
|
|
344
344
|
"docs": {
|
|
345
|
-
"description": "
|
|
345
|
+
"description": "Iterates over an array of items and invokes an operation upon each one, where the state\nobject is _scoped_ so that state.data is the item under iteration.\nThe rest of the state object is untouched and can be referenced as usual.\nYou can pass an array directly, or use lazy state or a JSONPath string to\nreference a slice of state.",
|
|
346
346
|
"tags": [
|
|
347
347
|
{
|
|
348
348
|
"title": "public",
|
|
@@ -356,7 +356,18 @@
|
|
|
356
356
|
},
|
|
357
357
|
{
|
|
358
358
|
"title": "example",
|
|
359
|
-
"description": "each(\
|
|
359
|
+
"description": "each(\n $.data,\n // Inside the callback operation, `$.data` is scoped to the item under iteration\n insert(\"patient\", {\n patient_name: $.data.properties.case_name,\n patient_id: $.data.case_id,\n })\n);",
|
|
360
|
+
"caption": "Using lazy state ($) to iterate over items in state.data and pass each into an \"insert\" operation"
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
"title": "example",
|
|
364
|
+
"description": "each(\n $.data,\n insert(\"patient\", (state) => ({\n patient_id: state.data.case_id,\n ...state.data\n }))\n);",
|
|
365
|
+
"caption": "Iterate over items in state.data and pass each one into an \"insert\" operation"
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
"title": "example",
|
|
369
|
+
"description": "each(\n \"$.data[*]\",\n insert(\"patient\", (state) => ({\n patient_name: state.data.properties.case_name,\n patient_id: state.data.case_id,\n }))\n);",
|
|
370
|
+
"caption": "Using JSON path to iterate over items in state.data and pass each one into an \"insert\" operation"
|
|
360
371
|
},
|
|
361
372
|
{
|
|
362
373
|
"title": "param",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openfn/language-hive",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.7",
|
|
4
4
|
"description": "An Apache HIVE adaptor for OpenFn",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
],
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"hive-driver": "1.0.0",
|
|
24
|
-
"@openfn/language-common": "2.
|
|
24
|
+
"@openfn/language-common": "2.1.1"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@openfn/simple-ast": "0.4.1",
|