Ab Initio Component | REFORMAT: Part 2

 ..Continue from Part 1..

 

output-index(filename or string, optional)

  • It specifies either the name of a file containing a transform function, or a transform string. This  component calls the specified transform function for each input record. The transform function should return an index value between 0 and the highest-numbered output port. REFORMAT uses this value to direct the input record to the output port that has the same number as the value, and executes the transform function, if any, associated with that port.
  • When you specify a value for this parameter, each input record goes to exactly one transform-output port pair. For example, suppose there are 100 input records and two output ports. Each output port receives between 0 and 100 records. So according to transform function you can specify the output-index split to 50/50, 60/40, 0/100, 99/1 or any other combination which can add up to 100
  • If an index is out of range (less than zero or greater than the highest-numbered port), the component discards the input record.
    
    NOTE: If you specify a value for the output-index parameter, you cannot also specify the output‑indexes parameter and vice-versa

  • If you do not specify a value for either output-index or output-indexes, the component sends every input record to every transform-output port pair.  
 

output-indexes (filename or string, optional)

  • It specifies either the name of a file containing a transform function, or a transform string. The component calls the specified transform function for each input record. The transform function uses the value of the input record to direct that input record to particular transform-output ports. 
  •  The expected output of the transform function is a vector of numeric values. The component considers each element of this vector as an index into the output transforms and ports. The component directs the input record to the identified output ports and executes the transform functions, if any, associated with those ports. 
  • If an index is out of range (less than zero or greater than the highest-numbered port), the component discards the input record.
  • If you do not specify a value for either output-indexes or output-index, the component sends every input record to every transform-output port pair.
  • As an example of how the component uses the transform function specified in the output-indexes parameter, consider the following:

    out :: output_indexes(in) =
    begin
      out :1: if (in.kind == "x") [vector 0, 1, 2];
      out :2: if (in.kind == "y") [vector 2, 3, 4];
      out : : [vector 5];
    end; 
 
  •  When you specify this transform function for the output-indexes parameter, it directs the input record to the transform functions for:

        Ports 0, 1, and 2 if the field in.kind is “x”

        Ports 2, 3, and 4 if the field in.kind is “y”

        Port 5 if otherwise

 logging(boolean, optional)

  •     Specifies whether the component logs certain events.
 

 log_input (choice, optional)

  • Specifies how often the component sends an input record to its log port. The logging parameter must be set to True for this parameter to be available.
  •  For example, if you select 100, the component sends every 100th input record to its log port. 
 

log_output (choice, optional) 

  • Specifies how often the component sends an output record to its log port. The logging parameter must be set to True for this parameter to be available.
  • For example, if you select 100, the component sends every 100th output record to its log port. 
 

log_reject(choice, optional)

  • Specifies how often the component sends a reject record to its log port. The logging parameter must be set to True for this parameter to be available.
  • For example, if you select 100, the component sends every 100th reject record to its log port. 

 

 

 

No comments:

Post a Comment