Table of Contents

Search

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

Transformation Language Reference

Transformation Language Reference

POWER

POWER

Returns a value raised to the exponent you pass to the function.

Syntax

POWER(
base
,
exponent
)
The following table describes the arguments for this command:
Argument
Required/
Optional
Description
base
Required
Numeric value. This argument is the base value. You can enter any valid transformation expression. If the base value is negative, the exponent must be an integer.
exponent
Required
Numeric value. This argument is the exponent value. You can enter any valid transformation expression. If the base value is negative, the exponent must be an integer. In this case, the function rounds any decimal values to the nearest integer before returning a value.

Return Value

Double value.
NULL if you pass a null value to the function.

Example

The following expression returns the values in the Numbers port raised to the values in the Exponent port:
POWER( NUMBERS, EXPONENT )
NUMBERS
EXPONENT
RETURN VALUE
10.0
2.0
100
3.5
6.0
1838.265625
3.5
5.5
982.594307804838
NULL
2.0
NULL
10.0
NULL
NULL
-3.0
-6.0
0.00137174211248285
3.0
-6.0
0.00137174211248285
-3.0
6.0
729.0
-3.0
5.5
729.0
The value -3.0 raised to 6 returns the same results as -3.0 raised to 5.5. If the base is negative, the exponent must be an integer. Otherwise, the
PowerCenter Integration Service
rounds the exponent to the nearest integer value.

0 COMMENTS

We’d like to hear from you!