Data Processing Rules

Data Processing Rules use a user friendly expression based on Cloud Assert's Common Cost Query Language (CCQL)

Assignment Rules are used during source data processing and transformation stages to assign values to target data properties based on incoming data property conditions.

Following rule assigns CloudSpend target property with default value as 'Service', add the property to group by list during processing. With conditions based on source data properties

ASSIGN CloudSpend WITH DEFAULT 'Service' AND GROUPBY
IF source.ServiceInfo2 LIKE '%Marketplace%' OR source.Source = 'Marketplace' THEN 'Marketplace'
END

Supported Conditional Operators

NameOperator

Equal To

=

Not Equal To

!=

Greater Than

>

Greater Than or Equal To

>=

Less Than

<

Less Than or Equal To

<=

Like

LIKE

Contains In

IN

Not Contains In

NOT IN

Expression Operators

NameOperator

Plus

+

Minus

-

Multiplication

*

Division

/

Modulo

%

Left Parenthesis

(

Right Parenthesis

)

Property Names

Property Names are used to refer to Source data property or target source property and they must adhere to following conventions

  1. Names must start with an alphabet

  2. Then it can be followed by alpha numeric and can contain dot and optionally enclosed within brackets like: source.[Prop Name]

Variable Names

Variable Names references parameters passed from external system and are similar to SQL Parameters

  1. Variable names must start with an alphabet and followed by alpha numeric

  2. Variable names must be prefixed with @ , like @StartDate

Examples

// Assign default NULL and Group By with multi line conditions

ASSIGN AccountOwner WITH DEFAULT NULL AND GROUPBY
  IF source.AccountOwnerId = 'Master' THEN 'FCC-Global'
  IF [Account Name] = 'FCC' THEN 'FCC-Global'
  IF [source.Account Name] = 'FCC' THEN 'FCC-Global'
  IF source.[User Name] = 'FCC' THEN 'FCC-Global'
  IF [source two].[User Name] = 'FCC' THEN 'FCC-Global'
END
// Assign default NULL and no Group By
ASSIGN AccountOwner WITH DEFAULT NULL
  IF source.AccountOwnerId = 'Master' THEN 'FCC-Global'
  IF [Account Name] = 'FCC' THEN 'FCC-Global'
  IF [source.Account Name] = 'FCC' THEN 'FCC-Global'
END
// Only Default Assignment, no conditional assignments
ASSIGN CloudSpend WITH DEFAULT 'Service' END
// Using Variables
ASSIGN CloudSpend2 WITH DEFAULT @DVar
  IF line_item_line_item_type = @Var1 OR (account_name = @AccountNameVar  AND project_code = 'GCC') THEN 'Reserved Instance'
END

Last updated