Tamr Documentation

Working with Expressions

An expression operates on zero or more attributes, and can be used in a formula or as part of a statement in a script.

The effect of an expression is highly dependent on how it is used.

Overview

This topic introduces terminology used when working with expressions.

Expressions in Formulas and Scripts

The following image shows the expression in a formula (surrounded with a blue solid line). This expression consists of a function, upper(), and the attribute or column you want to apply it to, name.

An expression in a formula.An expression in a formula.

An expression in a formula.

In a formula, you select the output column from a dropdown list.

The following image shows the same expression in a script (surrounded with a blue solid line).

An expression and named expression in a script.An expression and named expression in a script.

An expression and named expression in a script.

When a script includes an output column for the result of the expression, namecleaned in this example, collectively they are referred to as the _named expression (surrounded with a pink dashed line).

Components of Expressions

Expressions can consist of any number of the following components:

  • Functions
  • Column names
  • Literals

The image that follows shows valid expressions in several formulas.

Expressions are made up of literals, columns, and functions.Expressions are made up of literals, columns, and functions.

Expressions are made up of literals, columns, and functions.

The result of each of these example formulas is:

  • 1 uses the literal 0 to populate the name_cleaned column
  • 2 uses the values in the name column to populate the name_cleaned column
  • 3 makes the values in the name column uppercase and then uses the result to populate the name_cleaned column
  • 4 makes the values in the first and last columns uppercase, concatenates the resulting values together with a literal ' ' (space) between them, and then uses the result to populate the company_name column

This topics in this section describe different types of expressions and provide examples of using expressions in context.

Updated about a year ago



Working with Expressions


An expression operates on zero or more attributes, and can be used in a formula or as part of a statement in a script.

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.