0% found this document useful (0 votes)
19 views1 page

Normalize

The Normalize component generates multiple output records from each input record based on specified parameters and transform functions. It includes functions for selecting input records, determining the number of output records, and filtering output records. The document also poses questions related to designing graphs for output records, the length function, index creation, record selection, and examples of using the Normalize component.

Uploaded by

aanand7singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views1 page

Normalize

The Normalize component generates multiple output records from each input record based on specified parameters and transform functions. It includes functions for selecting input records, determining the number of output records, and filtering output records. The document also poses questions related to designing graphs for output records, the length function, index creation, record selection, and examples of using the Normalize component.

Uploaded by

aanand7singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

Normalize

Normalize generates multiple output records from each of its input records. You can
directly specify the number of output records for each input record, or the
number of output records can depend on some calculation.

Parameters
transform
Either the name of the file containing the types and transform functions, or a
transform string.

There are following permanent functions in normalize component:


input_select: An output value of 0 means false (the record was not selected); non-0
means true (the record was selected). If you define the input_select transform
function, it performs selection of input records:

Length: Specifies the number of output records Normalize generates for this input
record. Normalize calls the length function once for each input record.

Normalize: Output will be send to the out port.

output_select: An output value of 0 means false (the record was not selected); non-
0 means true (the recordwas selected).

Runtime behavior of NORMALIZE:


Normalize generates a series of output records for each input record as follows:

1. Reads the input record.


If input_select is defined, the input records are filtered according to the
selection criteria. If you have not defined input_select, Normalize processes all
records.
2. Performs iterations of the normalize transform function for each input record.
Normalize executes the length transform function. The length function returns a
value, n, that specifiesthenumber of times to call the normalize transform function
for each input record.
3. Produces the output record:
4. Sends the output record to the out port.
If you have defined the output_select transform function, it is now called to
filter the output records, asfollows:

Normalize ignores records for which output_select returns 0; it writes all others
to the out port.
If you have not defined the output_select transform function, Normalize writes all
output records to the out port.
If any of the transform functions returns NULL, Normalize writes:
The current input record to the reject port (if connected).
A descriptive error message to the error port (if connected).
If you do not connect flows to the reject or error ports, Normalize discards the
information.

Q. If u r having single record in input, design a graph so that in o/p will have 10
records?
Q. What is length function inside transform parameter? How do you decide the number
of records to be produced dynamically?
Q. What is index in normalize? Will you create values for index?
Q. How do you select only particular records after applying normalize logic?
Q. Give one example using normalize component. What if vector is not fixed length?

You might also like