You can use a Rank transformation in a dynamic mapping. You can configure dynamic ports in the transformation and reference the generated ports.
If you reference a generated port in the Rank transformation and the generated port does not exist at run time, the mapping fails.
If you specify a dynamic port as a Rank port, the dynamic port can have no more than one generated port.
If you specify a dynamic port as the Group By port, the Data Integration service considers all the generated ports as Group By ports. The mapping is not valid if you specify a generated port as a Group By port and you specify the parent dynamic port as a Rank port or as a Group By port.
You can parameterize the Rank port and the Group By ports. Use a port type parameter for the Rank port. Use a port list type parameter for the Group By ports.