@platforma-sdk/workflow-tengo 2.0.1 → 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.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
|
@@ -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
|