Add Conditional Column to YAML Files Online
Add a new column to YAML files based on an if/else condition directly in your browser. Set a value for rows that match and a different value for rows that don't — no upload required.
How to add Conditional Column to YAML files
- Drop your file onto the upload area. The first 200 rows are shown.
- Build the condition: pick the column in If column, choose an operator such as equals, contains, greater than or is empty / null, and type the compare value.
- Set the Then value for rows that match and the Else value for rows that do not. The defaults are true and false.
- Name the new column (the default is new_column) and click Add Column. A one-line summary of the rule is shown above the button so you can check it.
- Check the preview and download the file. The new column is added at the end.
Your file is processed locally in your browser and is never uploaded. The free limit is 50 MB per file; larger files work if your device has the memory for them.
Worked example
A help desk promises a first response within 48 hours. The team lead wants a flag on every ticket in this week's export so overdue ones can be filtered and chased.
Input (YAML)
- ticket_id: 5012
priority: high
hours_open: 52.5
- ticket_id: 5013
priority: low
hours_open: 6
- ticket_id: 5014
priority: medium
hours_open: 48
- ticket_id: 5015
priority: high
hours_open: null
- ticket_id: 5016
priority: low
hours_open: 120.25Settings
- If column: hours_open
- Operator: > greater than
- Value: 48
- Then: overdue
- Else: on track
- New column name: sla_status
Result
| ticket_id | priority | hours_open | sla_status |
|---|---|---|---|
| 5012 | high | 52.5 | overdue |
| 5013 | low | 6 | on track |
| 5014 | medium | 48 | on track |
| 5015 | high | NULL | on track |
| 5016 | low | 120.25 | overdue |
Greater than is strict, so ticket 5014 at exactly 48 hours is on track. Pick greater or equal to include it. Ticket 5015 has no hours recorded. An empty value never passes a comparison, so it falls to the Else value. Add a second run with is empty / null if missing data needs its own label.
Frequently Asked Questions
Can I add more than one condition, like IF / ELSE IF?
No. Each run applies one condition with one Then and one Else value. For more outcomes, run the tool again on the result, or write a CASE WHEN expression in the SQL workspace.
What happens to empty values in the condition column?
They never pass equals, not equals or a comparison, so they get the Else value. Use the is empty / null operator to target them directly.
What if I type text as the value for greater than?
On a number column the tool stops and asks for a number. A value such as "48h" or "1,200" is not accepted. Enter digits only, with a dot for decimals. On a date column, type a date such as 2026-04-11.
Related Tools
Filter CSV Files Online
Filter rows in CSV files by column value, directly in your browser. Your data stays on your device.
Count Values in CSV Files Online
Group and count rows by any column in CSV files directly in your browser. Sort by frequency or value to find the most common entries — no upload required.
Cast Column Types in CSV Files Online
Change column data types in CSV files directly in your browser. Cast text to numbers, dates to timestamps, or any supported type conversion — no upload required.
Add Conditional Column to CSV Files Online
Add a new column to CSV files based on an if/else condition directly in your browser. Set a value for rows that match and a different value for rows that don't — no upload required.
Add Conditional Column to Excel Files Online
Add a new column to Excel files based on an if/else condition directly in your browser. Set a value for rows that match and a different value for rows that don't — no upload required.
Add Conditional Column to Parquet Files Online
Add a new column to Parquet files based on an if/else condition directly in your browser. Set a value for rows that match and a different value for rows that don't — no upload required.
Add Conditional Column to JSON Files Online
Add a new column to JSON files based on an if/else condition directly in your browser. Set a value for rows that match and a different value for rows that don't — no upload required.
YAML Viewer Online
View and inspect YAML files directly in your browser. Browse rows, check column names and data types — no upload required, your data stays on your device.