Hyper Formatter

In this Article

Overview

You can use this Snap to convert the incoming documents into a Tableau hyper extract file and send the extract to the binary output view.

You can configure multiple input views in this Snap as the hyper file contains multiple tables. The table names for the hyper file is taken from the View Labels that you configure in Views.

Prerequisites

  • Tableau 10.5 or later version.

  • To run the Tableau hyper Pipelines in a plex, you must set the environment or system property TABLEAU_HYPER_LIBS to hyper/ (excluding hyper folder) where the jcc is running.

  • Tableau Hyper Snaps use Tableau Hyper API version 21.0.0.12982. You must have the Java Native Access (JNA) and shared libraries of the same API version for the respective Operating System on which you run your Tableau Pipelines. You can download the files for your operating system (Windows, Mac, and Linux) using this link: https://www.tableau.com/support/releases/hyper-api/0.0.12982.

Support for Ultra Pipelines

Does not work in Ultra Pipelines

Limitations and Known Issues

None.

Snap Views

Type

Format

Number of Views

Examples of Upstream and Downstream Snaps

Description

Type

Format

Number of Views

Examples of Upstream and Downstream Snaps

Description

Input 

Document

  • Min:1

  • Max:∞

  • Mapper

  • Copy

  • Any Parser Snaps

Data in document format.

Output

Binary

  • Min:1

  • Max:1

  • File Writer

  • S3 File Writer

Document in binary format.

Snap Settings

Field Name

Field Type

Description

Field Name

Field Type

Description

Label*


Default ValueHyper Formatter
ExampleHyper Formatter

String

Specify the name for the Snap. You can modify this to be more specific, especially if you have more than one of the same Snap in your Pipeline.

 

Schema Name


Default ValueExtract
ExampleExtract

String/Expression

Specify a schema name for the Tableau extract. If this field is left blank, the Snap uses the default schema Extract.

 

Snap Execution



Default Value: Validate & Execute
Example: Execute only

Dropdown list

Select one of the three modes in which the Snap executes. Available options are:

  • Validate & Execute: Performs limited execution of the Snap and generates a data preview during Pipeline validation. Subsequently, performs full execution of the Snap (unlimited records) during Pipeline runtime.

  • Execute only: Performs full execution of the Snap during Pipeline execution without generating preview data.

  • Disabled: Disables the Snap and all Snaps that are downstream from it.

Troubleshooting

Error

Reason

Resolution

Error

Reason

Resolution

"java.lang.UnsupportedClassVersionError"

The "java.lang.UnsupportedClassVersionError" error might be displayed when the JCC node contains a JDK version lower than 11.

 

When you encounter this error, follow these steps to resolve the issue:

  1. Define the /etc/sysconfig/jcc file on the node.

  2. Ensure that the JDK11 or a higher version is available as the first JAVA in the path environment variable. For example:
    JAVA11_HOME=/usr/java/<JDK Directory>
    PATH=$JAVA11_HOME/bin:$PATH
    export PATH

If the issue still persists, contact support@snaplogic.com

Example

Transforming Data into Hyper Format and Publishing the Datasource

This example Pipeline demonstrates how to transform data into hyper extract format and publish the data source in the Tableau server.
Publishing a data source in the Tableau server is essentially a four-step process:

  1. Transform data into hyper extract

  2. Initiate file upload

  3. Append file upload

  4. Publish data source

We have three Tableau REST Snaps in this Pipeline, each calling these three APIs: initiate_file_upload, append_file_upload, and publish_datasource.

Initially, we pass the following parameters in the Pipeline as key-value pairs:

Key

Value

Key

Value

projectid

87473786-9edd-495d-9820-c9ecbc928fe1

siteid

b3013847-c198-4a1e-8650-9f43f9d5e9f2

hyperfilename

test.hyper

Transform data into hyper extract

Step 1: Configure the JSON Generator Snap to pass product information with the following sub elements: Category, Product ID, Product Name, and Sub-Category, and validate the Snap.

Product Data Configuration

Product Data Output

Product Data Configuration

Product Data Output

Step 2: Configure the Hyper Formatter Snap to format the JSON data output into Tableau hyper format. Configure the views with one input view Table_name_product. This view label name is used as the table name in the hyper file in the output.

Hyper Formatter Snap Configuration

Hyper Formatter Views

Hyper Formatter Snap Configuration

Hyper Formatter Views

 

 

Step 3: Configure the File Writer Snap to write the transformed hyper format data file, test.hyper to the SL database. Upon validation, the hyper data file test.hyper is written to the SL database.

File Writer Snap Configuration

File Writer Output

File Writer Snap Configuration

File Writer Output

 

 

Initiate File Upload

Step 1: Configure the Mapper Snap to pass the datasource Type and SiteId inputs for initializing the file upload and validate the Snap.

Step 2: Configure the Tableau REST Snap to initiate the file upload operation using the REST operation.

Step 3: Validate the Snap—it establishes an upload session and creates a unique session ID. Because the file is not uploaded in this operation, the value of the $filezSize field is 0. A preview of the output from the Tableau REST Snap is as shown below:

Append to file upload

Step 1: Configure the Mapper Snap to append the uploaded file. We pass the fileSize, uploadSessionId, and siteId values to the downstream Tableau REST Snap.

Step 2: Validate the Snap—the following output is displayed:

Step 3: Configure the Tableau REST Snap to append the file to Tableau Online Site (repository/folder) in which the appended file will be placed. We use the REST operation append_file_upload to append the test.hyper file and provide the target file’s name. This operation creates a resource location for the uploaded file (test.hyper).

Step 4: Validate the Snap—the file is uploaded in chunks to the site (based on $siteId). In the Snap's output notice that the session ID of the upload session is the same as that generated in the "Initiate" step.

Publish data source

Step 1: Configure the Mapper Snap to map the fields from the output of the second Tableau REST Snap to be used in the downstream Snap.
Note: uploadSessionId is an input from the previous REST operation, whereas the siteId, hyperfilename, and projectId are the values passed in the Pipeline parameters.

Step 2: Validate the Snap—it displays the following output:

Step 3: Configure the last Tableau REST Snap to publish the data source to Tableau instance. This Snap uses the inputs from the upstream Snap to determine how to publish the file online. We use the REST operation publish_datasource to accomplish this task.

Step 4: Validate the Snap—it displays the following output.

Step 5: Execute the Pipeline, the hyper extract file test.hyper is uploaded to Tableau instance and stored under the External Assets group.

After the file is uploaded to Tableau, you can use this data for visualization of product information as graphs or pie charts.

Download this Pipeline

Downloads

Important Steps to Successfully Reuse Pipelines

  1. Download and import the Pipeline into SnapLogic.

  2. Configure Snap accounts as applicable.

  3. Provide Pipeline parameters as applicable.

  File Modified

File Example_Tableau_HyperFormatter.slp

Jul 23, 2021 by Kalpana Malladi

Snap Pack History