@platforma-sdk/workflow-tengo 2.0.0 → 2.1.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/dist/tengo/lib/pframes.util.lib.tengo +5 -3
- package/dist/tengo/lib/pframes.xsv.lib.tengo +16 -1
- package/dist/tengo/lib/workflow.bquery.lib.tengo +0 -1
- package/dist/tengo/tpl/exec.exec.plj.gz +0 -0
- package/dist/tengo/tpl/exec.python.create-venv.plj.gz +0 -0
- package/dist/tengo/tpl/exec.python.install-deps.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.aggregate.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.export-multiple-pcolumns.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.export-pframe.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.export-single-pcolumn.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.import-dir.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.map-pframe.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.xsv-export-pframe.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.xsv-import-map.plj.gz +0 -0
- package/dist/tengo/tpl/workdir.save.plj.gz +0 -0
- package/dist/tengo/tpl/workflow.build-ctx.plj.gz +0 -0
- package/package.json +1 -1
|
@@ -225,9 +225,10 @@ purifySpec := func(spec) {
|
|
|
225
225
|
for ax in spec.axes {
|
|
226
226
|
newAxes = append(newAxes, objects.deleteUndefined({
|
|
227
227
|
column: ax.column,
|
|
228
|
+
filterOutRegex: ax.filterOutRegex,
|
|
228
229
|
preProcess: ax.preProcess,
|
|
230
|
+
naRegex: ax.naRegex,
|
|
229
231
|
allowNA: ax.allowNA,
|
|
230
|
-
parseErrorToNA: ax.parseErrorToNA,
|
|
231
232
|
spec: { type: ax.spec.type }
|
|
232
233
|
}))
|
|
233
234
|
}
|
|
@@ -237,10 +238,11 @@ purifySpec := func(spec) {
|
|
|
237
238
|
for col in spec.columns {
|
|
238
239
|
newCols = append(newCols, objects.deleteUndefined({
|
|
239
240
|
column: col.column,
|
|
241
|
+
filterOutRegex: col.filterOutRegex,
|
|
240
242
|
preProcess: col.preProcess,
|
|
241
|
-
|
|
243
|
+
naRegex: col.naRegex,
|
|
242
244
|
allowNA: col.allowNA,
|
|
243
|
-
|
|
245
|
+
id: col.id,
|
|
244
246
|
spec: { valueType: col.spec.valueType }
|
|
245
247
|
}))
|
|
246
248
|
}
|
|
@@ -267,12 +267,27 @@ importFileMap := func(xsvMap, xsvType, spec, ...ops) {
|
|
|
267
267
|
/**
|
|
268
268
|
* Export p-frame into xsv file
|
|
269
269
|
*
|
|
270
|
-
* @param pf: p-frame - a
|
|
270
|
+
* @param pf: p-frame - a list of p-columns ({data, spec}) or a frame-like map of col.data col.spec entries
|
|
271
271
|
* @param xsvType: string - "csv" or "tsv"
|
|
272
272
|
* @param params: map - export params
|
|
273
273
|
*/
|
|
274
274
|
exportFrame := func(pf, xsvType, params) {
|
|
275
275
|
exportPfTpl := assets.importTemplate("@platforma-sdk/workflow-tengo:pframes.xsv-export-pframe")
|
|
276
|
+
|
|
277
|
+
if is_array(pf) {
|
|
278
|
+
// transform into .data .spec map
|
|
279
|
+
|
|
280
|
+
pfm := {}
|
|
281
|
+
i := 0
|
|
282
|
+
for col in pf {
|
|
283
|
+
ll.assert(!is_undefined(col.spec), "expected array of {spec, data} maps as a list of columns, but spec is undefined for: ", col)
|
|
284
|
+
ll.assert(!is_undefined(col.data), "expected array of {spec, data} maps as a list of columns, but data is undefined for: ", col)
|
|
285
|
+
pfm["" + i + ".spec"] = col.spec
|
|
286
|
+
pfm["" + i + ".data"] = col.data
|
|
287
|
+
i = i + 1
|
|
288
|
+
}
|
|
289
|
+
pf = pfm
|
|
290
|
+
}
|
|
276
291
|
|
|
277
292
|
r := render.create(exportPfTpl, {
|
|
278
293
|
pf: pf,
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|