Filter columns node
This node allows you to keep or remove columns that match the rule you define in the configuration of the node. In result, if you use the data transformation diagram that uses this node in the workflow, the system removes the matching columns in the file used in the workflow.
- In the upper right corner of the pop-up, click the icon.
- Select one of the following options:
- Remove columns - This option deletes columns that match the conditions you define in the further steps.
- Keep columns - This option keeps only the columns that match the conditions you define in the further steps. The columns that don’t match the conditions are removed.
- From the dropdown list, select one of the logical operators:
- Not equal
- Ends with
- Starts with
- Not contain
- In the text field, enter the value.
- To add more conditions, click Add condition.
- Repeat steps 1-4.
- Confirm the settings by clicking Apply.
Example of use
While importing a list of transactions, you can edit out unnecessary columns. In this example, these are any columns that include an underscore in their name (
payment_info) and columns whose name is exactly
price,customer,orderId,payment_info,date,import_type 10.99,John Doe,123345,cash,12.03.2022,toSynerise 4.99,Dwight Addams,122345,cash,12.03.2022,toSynerise 8.99,Andrew Malone,112345,cash,12.03.2022,toSynerise
- Start the diagram with Data Input.
- In the configuration of the node, upload a sample file.
- Add the Filter columns node.
- In the configuration of the node:
- Select Remove columns.
- Add the following conditions:
- Confirm by clicking Apply.
- Add the Data Output node.
Result: You can use this transformation in the Automation workflow to import or export files with the structure presented in this example.