Guides · For agents
Fill blank cells in a CSV with a value
Ask your agent to run Sift's blank_to fix on the column with the value you want, such as unknown. It fills blank cells only and never changes a cell that already has a value. In the test bookings file, 3 of 10 channels are blank and get filled; the other 7 stay as they are.
Ask your agent
With Sift connected (setup takes three steps), paste this and swap in your own paths.
Use Sift with /path/to/rules.bookings.json on /path/to/bookings_export.csv. Dry run blank_to on the channel column with the value unknown. Tell me how many cells would be filled, then apply it if I say yes, raising the limit to 30% for this job only.
Filling 3 of 10 rows is 30%, over the usual limit in this rules file: {"guardrails": {"stop_if_share_of_rows_changed_over": 0.2}}. So the dry run warns that Sift would stop. Asking for 30% for this job only (maxShareChanged) lets it through and leaves the rules file as it is. On a big file with few blanks, the usual limit is often enough.
What Sift sends back
A cell holding only spaces counts as blank. A value with a comma, such as "unknown, check", is quoted in the file so the columns stay in line.
Fill only some of the blanks
To fill a blank only on certain rows, use set_if with a condition instead. In the same file, a blank channel on a pending booking picks out 2 rows. See change a value where a condition is true.
What to do next
- Choose a fill value your next system accepts. If the column has an allowed list, use a value from it.
- Fill one column per run. Each run gets its own dry run, receipt and undo.
- Keep the receipt with the new file. It lists every row that was filled.
Questions
No. blank_to only writes into blank cells. In the test file, the 7 channels with a value are untouched.
Yes, with set_if: give the value and a condition such as channel is blank and status is pending.
Fixes work on CSV, which is what makes the undo exact. Save the sheet as CSV first, then point your agent at the CSV.
One file, no agent? Clean a file by hand in your browser, with nothing uploaded.