User Community Service Desk Downloads
If you can't find the product or version you're looking for, visit support.ataccama.com/downloads

Wildcards in Workflow Tasks

When configuring certain workflow task properties, you can use the question mark (?) and asterisk (*) wildcard characters to specify multiple files or folders based on the provided pattern.

Wildcards

The wildcards have the following meaning:

  • ?: One character, except file separators, that is, forward slash (/) and backslash (\).

  • *: Zero to n characters, except file separators (/ and \).

Where to use wildcards?

To find out which task properties support wildcards, see the documentation of the specific workflow task. Look for the "supports wildcards" in the Expression support column.

Wildcards are used in properties that set a path to a file or folder. You can use wildcards at any path level, for example, C:/data/test_*/*.csv.

Example

Paths with wildcards on a single level

Assume we want to copy specific files from the in to the out folder of the following file system using the COPY implementation of the Operate On File workflow task:

File system
Operate on File task configuration

The following examples show how the wildcards in the Source File path determine which items are copied to the target folder:

Source File in/dir1/*.csv in/dir1/* in/dir1 in/dir*

Source File value interpretation

All .csv files in the in/dir1 folder.

All files and folders located in the in/dir1 folder.

The dir1 folder.

All dir<value> folders located in the in folder.

Output

100
100
100
100
The contents of the subDir, dir1, and dir2 folders in the previous table depend on the value of the Recursive Flag property. See Operate On File task for more information.

Paths with wildcards on multiple levels

When using multi-level wildcards in the tasks that move or copy files and directories (that is, the COPY and MOVE implementation of the Operate On File task), you have to set the value of the Keep Dir Tree Flag task property to decide whether you want to preserve the source file structure in the target location.

Assume we want to copy specific files or folders from the in to the out folder of the file system using the Operate On File task. The following examples show how the wildcards in the Source File path determine which items are copied to the target folder and how the target file hierarchy depends on the Keep Dir Tree Flag value:

Source File in/dir*/*.csv in/test*/dir*

Source File value interpretation

All .csv files from all in/dir<value> folders.

All dir<value> folders from all in/test<value> folders.

Source file system

100
100

Output

  • If Keep Dir Tree Flag is true, the target hierarchy is out/dir<value>/<file_name>.csv:

    100
  • If Keep Dir Tree Flag is false, the target hierarchy is out/<file_name>.csv:

    100

    If Keep Dir Tree Flag is false, the outcome depends on the Overwrite Flag settings:

    • If true, the task successfully finishes with the previous output.

    • If false, the task fails when it attempts to copy file1.csv multiple times to the same target folder.

  • If Keep Dir Tree Flag is true, the target hierarchy is out/test<value>/dir<value>:

    100
  • If Keep Dir Tree Flag is false, the target hierarchy is out/dir<value>. In this example, two source folders match the in/test*/dir* mask and are merged into a single output dir1 folder:

    100
    If both Keep Dir Tree Flag and Overwrite Flag are false and the test1/dir1 and test2/dir1 contain files with the same names, the task fails when it attempts to copy the files multiple times to the merged target folder.

Was this page useful?