You cannot use one transformation as the direct data input to another
transformation. The data must first flow from a transformation to
a permanent or temporary output table. Then, it can proceed to the
next transformation.
Of course,
if you need to save the output into a physical table that you can
access after the current SAS session is terminated, you must use a
permanent output table. You need to consider performance when you
decide whether to use permanent or temporary output storage.
Temporary output storage can be created either as a table in the WORK library or as
a view. If the data from the first transformation in the job is referenced multiple
times in a process flow, then putting the data into a table
generally improves overall performance. When you use a view as a temporary output
table, SAS must execute the underlying code repeatedly each time the view is accessed.
However,
if the data is referenced only once in a process flow, then the use
of a view that is created from a temporary output table usually offers
better performance.
You can
tell whether a temporary output table takes the form of a view or
a physical table by looking for the View modifier on the temporary
output table. You can also right-click a temporary output table and
look at the pop-up menu. If the Create as View item is checked, a view is generated. If not, the output is stored
in a temporary physical table.
You can
also click Create as View to switch between
a physical table and a view. Note, however, that some transformations,
such as Sort, do not support the creation of views. You can click Create as View, but the transformation ignores it and
produces a temporary physical table.
Perform
the following steps to create a process flow diagram that uses a temporary
output table as an input to a transformation:
-
-
Select and drag a transformation from the Transformations tree. Then, drop it in the
empty job on the Diagram tab in
the Job Editor window.
-
Select and drag a source table from the Inventory tree. Then, drop it before the transformation
on the Diagram tab.
-
Drag the cursor from the source table to the input port of the transformation. This
action connects the source to
the transformation.
-
Select
and drag a second transformation from the Transformations tree on
the Diagram tab.
-
Drag the
cursor from the output port of the temporary output table that is
attached to the first transformation to the input port of the second
transformation. This action connects the temporary output table to
the second transformation.
The following display shows a sample job that works this way.
Note: Some transformations,
such as Return Code Check, produce no data output. Because they are
not data transformations, they are linked to other transformations
only by control flow lines. The User Written transformation also has
an optional data target. When it is used without a data target, it
also connects only with control flow lines.