After you create a subflow, you can add the subflow to
a data flow by using the subflow input and output operators to identify
ports that are designated as inputs and outputs.
Procedure
To add a subflow
to a data flow:
- Create a new data flow in the Design Studio.
- Select the subflow operator in the palette and drag and
drop it to the canvas. Select the subflow you want to embed
in the data flow.
- Drag the other transform operators onto the canvas and
complete the data flow.
- Ensure that the source and target tables
that are referred to in the subflow are present in the database that
is specified as the SQL execution database. If they are not
present in the SQL execution database, then you must try to connect
to the table sources and targets using the remote database location
option to indicate the exact location of the table.
- Save the data flow and validate the flow.
Note: The
latest version of the subflow is always used when the code is generated
for the containing data flow, as long as the input and output port
definitions of the subflow do not change. If you add new columns to
the subflow input or add a new input or output port, the data flow
is likely to be invalid because you have to reconnect the column level
links. A subflow can also become invalid if an input or output subflow
port is dropped or renamed (or if the whole subflow is renamed or
deleted). In these cases, the containing data flow has an unsupported
subflow reference and data flow validation fails. You have to delete
the subflow operator from the data flow and define a new subflow operator.
You cannot change the subflow reference in an existing subflow operator.