When you create a mapping, you can preview data for individual transformations to test the mapping logic.
You preview data for a transformation on the Preview panel of the transformation. Select the number of source rows to process and the runtime environment that runs the preview job.
When you run a preview job, Data Integration creates a temporary mapping task that contains a virtual target immediately downstream of the selected transformation. Data Integration discards the temporary task after the preview job completes. When the job completes, Data Integration displays the data that is transformed by the selected transformation on the Preview panel.
The following image shows the Preview panel of a Sorter transformation after you run a preview job on the transformation:
To preview data in a mapping, you must have the Data Integration Data Previewer role or your user role must have the "Data - preview" feature privilege for Data Integration.
If you apply a limit to the number of rows to preview for an active transformation, such as a Filter transformation, that row limit also applies to the source. The Filter transformation might show fewer rows output in the filter preview window than in the source preview window, depending on the filter condition.
You can preview data if the mapping uses input parameters. Data Integration prompts you for the parameter values when you run the preview.
You can't preview data when you develop a mapplet in the Mapplet Designer. You can't preview data that contains special, emoji, and Unicode characters in the table name.
Preview behavior for a mapping
You can preview data for a transformation if there are no mapping validation errors in the selected transformation or any upstream transformations. Data Integration displays mapping results for the selected transformation. It also generates results for the upstream transformations.
You can preview data for any transformation except for the following transformations:
•Data Masking
•Hierarchy Builder
•Sequence
•Velocity
•Web Services
•Target
Running a preview job for a mapping
Run a data preview job on the Preview panel of the selected transformation.
Before you run a data preview job for a mapping, verify that the following conditions are true:
•Verify that a Secure Agent is available to run the job. You can't run a preview job using the Hosted Agent.
•Verify that the Secure Agent machine has enough disk space to store the preview data.
•Verify that there are no mapping validation errors in the selected transformation or any upstream transformation.
To run a data preview job:
1 In the Mapping Designer, select a transformation.
2Open the Preview panel.
3Click Run Preview.
4 In the Run Preview wizard, enter the number of source rows to preview and the runtime environment to run the preview job.
The number that you enter applies to each source in the mapping. For example, if you select 10 rows and the mapping contains multiple sources, the preview job processes the first 10 rows in each source.
You can select up to 999,999,999 rows.
Warning: Selecting a large number of source rows can cause storage or performance issues on the Secure Agent machine.
5If the part of the mapping that you are previewing uses input parameters, click Next and enter the parameter values.
6Click Run Preview.
Data Integration displays the results in the Preview panel for the selected transformation.
You can monitor preview jobs on the My Jobs page in Data Integration and on the All Jobs and Running Jobs pages in Monitor. Data Integration names the preview job <mapping name>-<instance number>, for example, MyMapping_1. You can download the session log for a data preview job. However, session logs for data preview jobs for mappings in SQL ELT mode aren't available for download.
To restart a preview job, run the job again on the Preview panel. You can't restart a data preview job on the My Jobs or All Jobs pages.
Viewing preview results for a mapping
Data Integration generates preview results for the selected transformation and the upstream transformations in the mapping. Data Integration stores preview results in CSV files on the Secure Agent machine.
Data Integration displays preview results on the Preview panel of the selected transformation and each upstream transformation. Data Integration does not display preview results for downstream transformations.
If a transformation has multiple output groups and you want to preview results for a different output group, select the output group from the Output Groups menu at the top of the Preview panel.
To download preview results, click Download on the Preview panel.
Data Integration stores preview results in CSV files on the Secure Agent machine. When you run a preview, Data Integration creates one CSV file for the selected transformation and one CSV file for every upstream transformation in the mapping. If a transformation has multiple output groups, Data Integration creates one CSV file for each output group. If you run the same preview multiple times, Data Integration overwrites the CSV files.
By default, the files are stored in the following directory:
The CSV files are stored in this directory unless an organization administrator changes the value of the $PMCacheDir property for the Data Integration Server service that runs on the Secure Agent. For more information about Secure Agent services, see the Administrator help.
Note: Ensure that the Secure Agent machine has enough disk space to store preview data for all users that might run a data preview using the Secure Agent.
Data Integration purges the preview directory once every 24 hours. During the purge, Data Integration deletes files that are more than 24 hours old.
Note: In CSV format, null values for integer, double, string, and text data types show as empty.
Customizing preview results
You can choose which columns to display on the Preview panel. You can also reorder the columns. Customize the Preview panel on the Settings dialog.
The following image shows the Settings dialog:
To open the Settings dialog, click the settings icon on the Preview panel. Columns in the Selected Columns area appear on the Preview panel. To hide a column from the Preview panel, select it and move it to the Available Columns area. To reorder the columns in the Preview panel, select a column name in the Selected Columns area and move it up or down.