Before you start
Define the rule first: trim name, change exactly jorge to Jorge, and retain only name and amount. This is not general capitalization. Use a laboratory CSV with headers, UTF-8 encoding and a separate destination. Prepare permissions and compatible runtime before testing.
No SQL expression is needed for this literal change. For general first-letter capitalization, Clean text offers capitalize; for each word, use title. This example deliberately keeps the exact Replace values rule. Calculated field interpolates text without executing LEFT or formulas.
Procedure
- Add Flat File input with
format=csv,delimiter=,andhasHeader=true. Review field names and header. - Add Clean text with
fields=["name"]andoperations=["trim"]. This allows a value containing surrounding spaces to match the following exact rule. - Connect Replace values with
field=name,find=jorge,replacement=Jorge,matchMode=exact,caseSensitive=true. - Add Field selector with
fields=["name","amount"]. This removes all other columns from schema and rows. - Connect Flat File output with
includeHeader=trueand a test filename. Validate, save and publish; prepare the Session and Workflow for execution.
Synthetic example
Input:
name,amount,internal_note
jorge ,12.5,sample-a
ana,8,sample-b
Expected output:
name,amount
Jorge,12.5
ana,8
Order is intentional: Trim before Replace values. The rule does not change ana or convert amounts; for typed numbers, add Convert type and define its error policy.
Verify the result
Check two rows, header containing only name,amount, Jorge replacement and Ana preservation. The internal_note column must not appear. CSV output writes the received schema; its filename does not select fields.
To check required values, you can add Required fields with fields=["name"] and maxInvalidPercent=0. It fails the entire execution for an invalid row; it neither fills values nor drops records. Do not add checks without deciding how their failures should be handled.
Troubleshooting
If replacement fails, inspect whitespace, case, field name and matchMode. For extra columns, inspect the saved Mapping and bound revision; do not assume Field selector retains unselected fields. If general capitalization is required, specify it as a different requirement; this replacement is not a universal solution. Before repeating a real load, verify idempotence and destinations. A correct example does not establish financial precision or rounding policy. Record the accepted rule before changing the production design.