Data Preview from a Pipeline

On this Page

Overview

Data Preview helps you confirm that mapping and transformations are working as expected. At design time, when you save or validate a Pipeline, SnapLogic attempts to pass a sampling of the real data through all of the Snaps. You can preview the sample data output from any Snap that executed successfully and navigate through all Data Previews in the Pipeline. You can also preview the sample data from failed Snaps that output error documents.

SnapLogic encrypts the sample data before storing it to use in Data Preview. By default, the sample data includes the first 50 records from the input source, up to 15 MB in total size. If the number of documents to preview exceeds 15 MB, validation causes an error. Org admins can change the Org-wide setting for the number of preview documents in Admin Manager or disable pipeline validation. If not disabled, users can change the number of preview documents at the Project level in their User Settings, up to the value set by the Org admin in Admin Manager.

The Data Preview opens in a table. You can display it in JSON format or raw, unformatted. You can also use DataViz to render specific fields of preview data in the following visualizations:

  • Pie chart - Organizes data in sectors, where each sector represents a group proportionate to the whole.

  • Line chart - Compares trends visually for multiple fields or a single field over time.

  • Bar chart - Compares a category from a data set, similar to a pie chart. The simple bar chart displays the number of instances for a field. The group and count bar chart compares data sets from two categories against an index, such as time or geographical location.

  • Scatter chart - Plots the data set for two fields as a map of coordinates and optionally aggregates the data by a third category.

Limitations with Numbers in Data Preview

In preview data, number fields do not always display the expected values:

  • JavaScript has limitations in displaying numbers. The actual value is maintained in the data; however, the preview might not display the numbers accurately. For example:

    • Numbers greater than the JavaScript constant Number.MAX_VALUE display as Infinity. Learn more about MAX_VALUE.

    • Integers greater than the JavaScript constant Number.MAX_SAFE_INTEGER might be rounded or otherwise displayed incorrectly. Learn more about MAX_SAFE_INTEGER.

  • Numbers without significant fractional values are displayed as integers. For example: 10.00 is displayed as 10.

Previewing Data

After saving or validating a Pipeline, preview the data that a Snap will pass down the Pipeline using the data preview icon in the connector on the right side of the Snap:

Data preview

Open the Data Preview in one of the following ways:

  • On Windows, click the data preview icon. 

  • On MacOS, double-click the data preview icon.

To disconnect a Snap instead of displaying the data preview, position the cursor over the connection from the adjoining Snap.

By default, the data preview displays as a table. The Data Preview for some Snaps, such as file readers, displays the metadata instead of data values. The following example shows preview data values after passing through an Excel Parser Snap:

Data Preview Example

Use the controls on the Data Preview pane to:

  • Switch the data format to JSON or raw

  • Display preview document data formatted with line feeds

  • Download the preview data

  • Open DataViz to generate a chart from the preview data

  • Navigate through the preview data

  • Move to the Preview Data pane for the next or previous Snap

Use the outer arrows at the bottom left of the data preview to navigate to the results for the next or the previous Snap:

Viewing data in error documents

If a Snap fails to execute, you can preview data from the previous Snap error documents:

Setting the Number of Records to Preview

You can change the number of records to be shown in the Data Preview, up to a total size of 15 MB. Depending on the size of individual records, increasing the number can provide better visualization.

To change the number of records: 

  1. In the IIP, click the dropdown next to your username to open the menu:

  2. Select User Settings to open the Settings dialog:

  3. In the Settings dialog, click the Preview Document Count drop-down menu, and choose from the available values.

  4. Click Save.

Using DataViz

Save or validate a Pipeline, and open Data Preview for a Snap. Click DataViz and drag the cursor to the left or click the triangle at the top of the DataViz bar to display chart options:

The following sections describe how to use DataViz to configure charts:

Pie Chart

Pie charts reveal patterns by totaling the unique values in a field. Select a field that does not contain too many values. For example, selecting a Grade key, where there are only 16 possible values, makes a meaningful pie chart. However, selecting a Date key over three years of transactions would result in too many dates for the pie chart visualization to render the chart correctly.

If the field you choose to visualize contains too many unique values, the pie chart might fail to render.

To display preview data in a pie chart:

  1. Open Data Preview for a Snap.

  2. Click the triangle at the top of the DataViz bar.

  3. For Chart Type, select Pie Chart.

  4. Click Key to Visualize and choose the key for the values to represent in a pie chart.

Line Charts

A line chart reveals data trends. DataViz can render preview data in a line chart:

Line Chart for Numeric Fields

To display data in a line chart for a given state:

  1. Open Data Preview for a Snap.

  2. Click the triangle at the top of the DataViz bar.

  3. For Chart Type, select Line Chart.

  4. Click Key to Visualize.

  5. For each line, select a numeric field key.

Line Chart Over Time

To display data in a line chart with the date as the x-axis:

  1. Open Data Preview for a Snap.

  2. Click the triangle at the top of the DataViz bar.

  3. For Chart Type, select Line Chart - Date as X axis.

  4. For X-axis (date), select a temporal field (year, date, or time).

  5. Click Key to Visualize.

  6. Select the key for the y-axis values.

Bar Charts

DataViz provides two types of bar charts:

Bar Chart to Compare Values

To display preview data in a bar chart by numeric values:

  1. Open Data Preview for a Snap.

  2. Click the triangle at the top of the DataViz bar.

  3. For Chart Type, select Bar Chart - Count.

  4. Click Key to Visualize.

  5. Select the key field for the y-axis.

Bar Chart to Aggregate Data

With an aggregated bar chart, the y-axis displays the numeric value and the x-axis groups the bars by category. To display your data in a bar chart by group and by count:

  1. Open Data Preview for a Snap.

  2. Click the triangle at the top of the DataViz bar.

  3. For Chart Type, select Bar Chart - Group and Count.

  4. For Category, select the target type.

  5. For Group by, select the field to aggregate.

  6. Roll your cursor over the bars to display a range of the values per each category for the indexical relationship between the group key value and the number of entries for that value.

Scatter Chart

To display two fields of data in a scatter chart and aggregate by a third category:

  1. Open Data Preview for a Snap.

  2. Select Scatter Chart as the Chart Type.

  3. Select a data category from the X-Axis and Y-axis drop-down menus.

  4. Optionally, select a data category from the Group By menu.

  5. Roll over or click a data point to view values. The header shows the value for the Group by field, and the X- and Y- axis values appear below, separated by a comma. 

Data Preview Reference

Data Preview displays by default in a standard table with infinite scrolling capabilities.

Table Preview

Use the controls highlighted in the screenshot below as follows:

  • Preview Type: Select the Preview Type of JSON, Table, or Raw to view the data in JSON format, as a table (default), or as raw data.

  • Navigation: Click the inner arrow keys to navigate through the records, and click the outer arrow keys to navigate through the Data Preview of each Snap in the Pipeline.

  • Formatted: Select to add line feeds that improve the readability of data in table or JSON format. For example, when viewing error documents that have a stack trace column in JSON mode, select Formatted to make troubleshooting easier.

  • Download: Click Select All and Download to download the entire data set as a JSON file.

  • Arrows: Navigate to the results for the next or the previous Snap.

JSON Preview

If you change to JSON as the preview type, additional controls are available. Use the controls as follows:

  • Preview Type: Select the Preview Type of JSON, Table, or Raw to view the data in JSON format, as a table (default), or as raw data.

  • Indent Level: Select the number of spaces to display indenting the hierarchical JSON elements.

  • Expand Level: Select the level of JSON elements to display.

  • Keys in Quotes: Select to add quotes in the display to key elements.

  • Render text with whitespace: Renders blank spaces as dots "." and tabs as underscores "_" in the preview data.

  • Formatted: Select to add line feeds that improve the readability of data in table or JSON format. For example, when viewing error documents that have a stack trace column in JSON mode, select Formatted to make troubleshooting easier.

  • Download: Click Select All and Download to download the entire data set as a JSON file.

  • Expand All: Click to expand all levels of a hierarchical JSON file.

  • Collapse All: Click to collapse all levels of a hierarchical JSON file.

  • Select All: Click to select the JSON text for copying and pasting.

  • Arrows: Navigate to the results for the next or the previous Snap.

Data Preview Options Example

The following video demonstrates Data Preview configuration options:

Troubleshooting Data Preview

If you have issues with data preview, check the following:

  • If the data preview does not display or you get a validation error, check the User Settings and select fewer records to preview. Make sure the records do not total more than 15 MB in size. If changing the number of records does not work, check with your administrator to see if Pipeline Validation has been disabled at the Org level.

  • If the preview data is not exactly what you are expecting, the browser might be caching stale data. In the toolbar, click Retry: