Limiting rows going into tMap - Losing transformation logic.

One Star

Limiting rows going into tMap - Losing transformation logic.

I am trying to put a tSampleRow component between a file and tMap component to limit the number of records for testing purposes. When I place this component between the file and tMap, I lose all my tMap transformation logic. I have to assume there is a simple way to limit the number of rows returned without having to retype and retest logic. Maybe tSampleRow is the wrong component.
Any help would be appreciated.
Thanks.
Greg
Employee

Re: Limiting rows going into tMap - Losing transformation logic.

Greg,
Why do you don't use the LIMIT property in your File properties (you can combinate also with the Header value property)?
So if you would try on the row 34; specify 33 as HEADER and 1 as LIMIT. You will have the first 33 rows not readed, and only 1 row transformed.
Best regards;
One Star

Re: Limiting rows going into tMap - Losing transformation logic.

Hi,
in some input components you could add a header and footer limit to the input data (if you know how much lines you have). For the last point you could use a component top count the number of lines (there are several examples in the forum about this point).
As an alternative you could add a Numeric.Sequence (in a tMap for example) and filter all rows < X with tFilterRow.
Bye
Volker
One Star

Re: Limiting rows going into tMap - Losing transformation logic.

Thanks for the quick response. I think the limit might be the easiest.
I am surprised that we can't flip input files in and out of the tMap while preserving the transformation logic. I am new to the environment, so I am sure it is just growing pains at this point.
Thanks again.
Greg