Professional Documents
Culture Documents
Denormalize sorted
Denormalize sorted
Denormalize Sorted consolidates groups of related records by key into a single output record
with a vector field for each group, and optionally computes summary fields in the output
record for each group.
Key-method: Method by which component group records. There are 2 options for this
parameter.
Use Key Specifier
Use Key_change function
Key: Name of the key fields, that the component will use to group records are mentioned
here. This parameter is available only when Key method parameter is set as “Use Key
specifier”.
Check-sort: If you use a key specifier, this parameter indicates whether or not to abort
execution on the first input record that is out of sorted order.
Transform: The name of the file containing the types and transform functions, or a transform
string.
Reject-threshold: The component's tolerance for reject events.
Logging: Specifies whether or not to log component events.
Sample Graph
************************************************************
Code in Transform
type element_type = decimal("|");
type denormalization_type = element_type[3];
/*Do computation*/
denorm_out::denormalize(denorm,in,count)=
begin
denorm_out.index:: count;
denorm_out.elt:: in.amount;
end;
Output
record
decimal("|") cust_id;
string("|") cust_name;
decimal("\n") amounts[3];
end
*******************************************************************************
Code in Transform
type element_type = decimal("|");
type denormalization_type = element_type[3];
/*Do computation*/
denorm_out::denormalize(temp,denorm,in,count)=
begin
denorm_out.index:: count;
denorm_out.elt:: in.amount;
end;
Output
record
decimal("|") cust_id;
string("|") cust_name;
decimal("|") no_of_trans;
decimal("|") total_amount;
decimal("\n") amounts[3];
end
************************************************************
Input
record
decimal("|") cust_id;
string("|") cust_name;
decimal("\n") amount;
end
Code in Transform
type element_type = decimal("|");
type denormalization_type = element_type[3];
/*Input select*/
out :: input_select(in) =
begin
out :: in.amount>1000;
end;
/*Do computation*/
denorm_out::denormalize(denorm,in,count)=
begin
denorm_out.index:: count;
denorm_out.elt:: in.amount;
end;
Output
record
decimal("|") cust_id;
string("|") cust_name;
decimal("\n") amounts[3];
end
*******************************************************************
Example 4 – Using output_select function
Input
record
decimal("|") cust_id;
string("|") cust_name;
decimal("\n") amount;
end
Code in Transform
type element_type = decimal("|");
type denormalization_type = element_type[3];
/*Do computation*/
denorm_out::denormalize(denorm,in,count)=
begin
denorm_out.index:: count;
denorm_out.elt:: in.amount;
end;
/*Output Select*/
out :: output_select(out) =
begin
out :: out.cust_id>=2;
end;
Output
record
decimal("|") cust_id;
string("|") cust_name;
decimal("\n") amounts[3];
end
*******************************************************************
Input
record
decimal("|") cust_id;
string("|") cust_name;
decimal("\n") amount;
end
/*Do computation*/
denorm_out::denormalize(denorm,in,count)=
begin
denorm_out.index:: count;
denorm_out.elt:: in.amount;
end;
Output
record
decimal("|") cust_id;
string("|") cust_name;
decimal("\n") amounts[3];
end
*******************************************************************