Overview
This helper takes a folder and CSV file, checks that it’s a valid CSV, and filters rows by an exact match on a single column. You provide the column name and the value to match. It produces two clean outputs: one with all matching rows and another with the nonmatching rows.
Given a file {base_name}.csv, this template will output 2 files in the provided workflows folder:
-
{base_name}_matches.csv, a file containing all the rows where column = value
-
{base_name}_nonmatches.csv, a file containing all other rows
Variables
|
Name |
Reference |
Type |
Required |
Default |
Options |
Description |
|---|---|---|---|---|---|---|
|
Workflows Folder Name |
SOURCE_FILE_PATH |
Alphanumeric |
❌ |
None |
- |
Name of the local folder on Workflows the target file is expected to be. If left blank, will look in the home directory. |
|
Workflows File Name |
FILE |
Alphanumeric |
✅ |
None |
- |
Name of file to preview. Should be |
|
Column to Filter |
COLUMN |
Alphanumeric |
✅ |
None |
- |
Target column name. Ensure the column name is an exact match. |
|
Value |
VALUE |
Alphanumeric |
✅ |
None |
- |
Exact value that should match in the column you chose above. |
Yaml
Below is the YAML template
source:
template: Workflows Helper - Filter CSV
inputs:
SOURCE_FILE_PATH:
FILE:
COLUMN:
VALUE:
type: TEMPLATE
guardrails:
retry_count: 1
retry_wait: 0h0m0s
runtime_cutoff: 1h0m0s
exclude_exit_code_ranges:
- 101
- 102
- 103
- 104
- 105
- 106
- 199