Ab Initio Component | LEADING RECORDS

Purpose of LEADING RECORDS


  • LEADING RECORDS copies a specified number of records from its in to its out port, counting from the first record in the input flow.


Parameters for LEADING RECORDS


num_records (integer, required)


  • This parameter specifies the number of records to copy from the in port to the out port. If you enter a value of -1, it specifies that all records appearing on the component’s in port should be passed through to its out port.


early-close    (boolean, required)


  • When this parameter set to True, LEADING RECORDS closes its output immediately after reaching the value specified in num_records, which speeds downstream processing. In a non-continuous graph, always set early-close to True.


    Default is False. Use this setting only for continuous graphs.
    

Runtime behavior of LEADING RECORDS

  • When this component is connected to an INPUT FILE component, LEADING RECORDS has a useful optimization: it stops reading the input file as soon as it reaches the specified number of records. To get this optimization, make sure the INPUT FILE and the LEADING RECORDS use the same layout.

  • When this component is connected to an INPUT TABLE component  this optimization does not apply.With an INPUT TABLE, it is most efficient to select the desired records using a SELECT statement.

  • LEADING RECORDS does not have a port to which to send unused records.

  • LEADING RECORDS supports implicit reformat.