You are here:
computeExpression Parameters
When you define a computeExpression transformation, you set the action attribute to
computeExpression. You also specify the parameters for
the input source and the expression used to generate the values.
Parameters
You can specify parameters in the following sections of the computeExpression node: parameters and computedFields.
This table describes the parameters in the parameters section.
| Parameter | Required? | Value |
|---|---|---|
| source | Yes | Node in the dataflow definition file that identifies the input source for this transformation. |
| mergeWithSource | No | Indicates whether the input fields are included with the derived fields in the resulting dataset. When true, the resulting dataset contains all input fields from the source and the newly generated derived fields. When false, the resulting dataset contains the derived fields only. Default is true. |
| computedFields | Yes | Attributes and expression used to generate derived fields in the dataset. |
computedFields
This table describes the attributes in the computedFields section. It also describes optional attributes that you can
provide to override the field metadata to make the data appear differently in a dataset. For
example, CRM Analytics can replace null values in a field with a default value.
| Attribute | Required? | Value |
|---|---|---|
| name | Yes | API name of the generated field. The API names must be unique. Otherwise, the dataflow fails to run. |
| type | Yes | CRM Analytics field type associated with the field. Valid types are Text, Numeric, or Date. Example: |
| label | No | The display name of the generated field that appears in the CRM Analytics user interface. Can be up to 255 characters. Defaults to input field name if not specified. |
| saqlExpression | Yes | SAQL expression used to calculate the value for the derived field. The expression can be based on input fields or other derived fields in the transformation. Example: If a field name in a SAQL expression contains characters other than letters, numbers, or underscores, enclose the name in single quotes. For example, field names resulting from an augment are prefixed with the relationship name and a dot, and must be. enclosed in single quotes. The use of multivalue fields as input fields isn’t supported. |
| format | Yes (for Date fields only) | Format of the derived date field. For information about formats, see the Analytics External Data Format Developer Guide. |
| fiscalMonthOffset | No | For date fields only. The difference, in months, between the first month of the fiscal year and the first month of the calendar year (January). For example, if the fiscal year starts in January, the offset is 0. If the fiscal year starts in October, the offset is 9. Example:
When you set CRM Analytics doesn’t support fields with
different |
| isYearEndFiscalYear | No | For date fields only, when
Example:
CRM Analytics doesn’t support fields with
different |
| firstDayOfWeek | No | For date fields only. The first day of the week for the calendar year and, if applicable, the fiscal year. Use 0 to set the first day to be Sunday, 1 to set the first day to be Monday, and so on. Use -1 to set the first day to be on January 1. The default is -1. Example:
CRM Analytics doesn’t support fields with different |
| precision | Yes (for Numeric fields only) | The maximum number of digits in a numeric value, or the length of a text value. For numeric values: Includes all numbers to the left and to the right of the decimal point (but excludes the decimal point character). Value must be from 1 to 16. For text values: Value defaults to 255 characters, and must be from 1 to 32,000 characters. Example: |
| scale | Yes (for Numeric fields only) | The number of digits to the right of the decimal point in a numeric value. Must be less than the precision value. Value must be from 1 to 15 characters. Example: |
| defaultValue | No | For text and numeric fields that can be null. Default value that replaces a null value for the specified field. Enter the default value as a string. Example: |

