Skip to main content

Varicent ELT Assistant

Case

Label your data in a specific way using the Case tool. Adds a label to data according to logical tests.

To add labels to your data:

  1. Pick a name for the new column.

  2. Select the default value. If all logical tests fail, we use the default value instead.

  3. Define any number of logical tests. The value of the first successful logical test will be used.

You can set as many logical tests as you'd like, but there can be only 1 default value.

Reorder and move cases the way you want. Use the drag and drop icon DragIcon.png to reorder your cases.

When to use this tool

Use when you want to label your data in a specific way.

The Case tool supports both filter and formula expressions, with the filter function as the default. You can switch between the two functions as necessary.

With the filter function, you can select a column to filter and then choose the filter category and value or text. You can use AND or OR statements to filter. For more information about the Filter functions, see Filter.

With the formula function, you can apply a formula to the data. The formula must return a value of TRUE or FALSE. For more information about the Formula functions, see Formula.

Input

The Case tool requires one data input.

Configuration

Use the following configuration options to help create your case configuration.

Configuring the Case tool
  1. Go to the Pipes module from the side navigation bar.

  2. On the Pipes tab, find the pipe you want to work with. Click the pipe to open.

  3. From the Pipes tab, click an existing pipe to open, or create a new pipe. To create a new pipe, read the Creating a pipe documentation.

  4. In the Pipe builder, add a data source to your pipe. For more information on adding a data source, see the Data Input tool.Data Input

  5. Click symon_add_icon.png + Tool.

    The Tools modal opens, where you can add tools, such as the  Aggregate  tool, to your pipe.

  6. In the search bar, search for Case. Click + Add tool.

    Tip

    You can also find the Case tool in the Calculate section.

  7. Click the tool node and drag the line to the next tool to connect the tools. If you need to undo the action, click the line and then click Unlink.

  8. In the configuration pane, under New column name, enter a name for the new column.

  9. Under Default value, select the default value. If all logical tests fail, we will use the default value instead.

  10. Under Select a column, select a column to filter.

  11. Under Filter category, select a category to filter.

  12. Under Value or text, select the value or text.

  13. Under AND +Statement, optionally use an AND statement to filter.

  14. Under OR +Statement, optionally use an OR statement to filter.

    Note

    You can have a mix of filters and formulas in your configuration. Apply a formula to a filter instead of using a case filter. Click Switch to formula in the Cases section. If you want to revert back, click Switch to filter in the Formula section.

  15. Click on the tool name to rename your tool node to a meaningful name. Name your tools in a way that describes the function, not the object or the data action. For example, use “Look up rate” instead of “Join to rate table”.

Error messaging

The Case tool can identify the following errors in your formulas:

  • Syntax error: An invalid function is present, or the function cannot be parsed due to a special character, or a missing bracket.

  • Invalid argument error: The tool detects that the argument is invalid due to a wrong data type.

  • Too many arguments error: The tool detects that there are too many arguments.

  • Missing arguments error: The tool detects that there are arguments missing from a function in your formula.

  • Unsupported data type error: The tool detects an unsupported data type. The Formula tool only accepts number, boolean, text, and date data types.