Table of Contents

Search

  1. Preface
  2. The Transformation Language
  3. Constants
  4. Operators
  5. Dates
  6. Functions
  7. Creating Custom Functions
  8. Custom Function API Reference
  9. POWERCENTERHELP

Transformation Language Reference

Transformation Language Reference

LOG

LOG

Returns the logarithm of a numeric value. Most often, you use this function to analyze scientific data rather than business data.

Syntax

LOG(
base
,
exponent
)
The following table describes the arguments for this command:
Argument
Required/
Optional
Description
base
Required
The base of the logarithm. Must be a positive numeric value other than 0 or 1. Any valid transformation expression that evaluates to a positive number other than 0 or 1.
exponent
Required
The exponent of the logarithm. Must be a positive numeric value greater than 0. Any valid transformation expression that evaluates to a positive number greater than 0.

Return Value

Double value.
NULL if a value passed to the function is NULL.

Example

The following expression returns the logarithm for all values in the NUMBERS port:
LOG( BASE, EXPONENT )
BASE
EXPONENT
RETURN VALUE
15
1
0
.09
10
-0.956244644696599
NULL
18
NULL
35.78
NULL
NULL
-9
18
Error. (
PowerCenter Integration Service
does not write the row.
)
0
5
Error. (
PowerCenter Integration Service
does not write the row.
)
10
-2
Error. (
PowerCenter Integration Service
does not write the row.
)
The
PowerCenter Integration Service
displays an error and does not write the row if you pass a negative number, 0, or 1 as a base value, or if you pass a negative value for the exponent.