Up: Component summary Component

Array2Folder

Transforms an array into a physical folder.

Supports custom file/folder naming through template CSV. Array2CSV component can be used to generate a CSV from an Array/folder, process it in a pipeline, and then, transform the array back into a folder preserving original file names and subdirectory structure.

Version 1.2
Bundle builtin
Categories
Specialties generic
Authors Ville Rantanen (ville.rantanen@helsinki.fi)
Issue tracker View/Report issues
Source files component.xml Array2Folder.py
Usage Example with default values

Type parameters (generics)

Inputs

Name Type Mandatory Description
in Array<T1> (generic) Mandatory Array to be transformed
template CSV Optional Template CSV to reconstruct the initial folder structure. For all keys from array that occur in template column keyCol, the respective files in the output folder would have same name as in the template column fileCol.

Outputs

Name Type Description
out BinaryFolder The binary folder obtained from the array

Parameters

Name Type Default Description
fileCol string "File" Template input column for file names
fileMode string "@key@_@file@" The mode to generate the file name. Use the following tags in the string to create file names:
  • @key@ will be replaced with the current key
  • @file@ will be replaced with the current file name
  • @ext@ will be replaced with the current file extension
  • @instance@ will be replaced with the instance name
The fileMode will not be used if template input is given.
keyCol string "Key" Template input column for keys
link boolean false Create symbolic links instead of copying the file. WARNING: You may potentially break the execution of components, if @keep=false is used.

Test cases

Test case Parameters IN
in
IN
template
OUT
out
case1 (missing) in (missing) out
case2 (missing) in (missing) out
case3 (missing) in template out
case4 (missing) in template out
case_fileMode properties in (missing) out

fileMode=table_@key@_@ext@

case_flatDir properties in (missing) out

fileMode=.


Generated 2019-02-08 07:42:08 by Anduril 2.0.0