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.
The Tableau Hyper Formatter Snap requires additional time to convert a temporary CSV file into a Hyper Extract file. When the Snap processes a larger number of input documents, the time taken to generate the hyper file will naturally increase. This behavior is expected and is inherent to the functioning of the Snap.
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.
The Tableau Hyper Snaps use Tableau Hyper API version 21.0.0.12982. You must have 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.
Tableau Hyper Lib Setup: To run the Tableau hyper Pipelines in a plex, you must set the environment or system property
TABLEAU_HYPER_LIBS
to/home/lib
(excluding/hyper
) where the JCC is running.Install tabcmd utility: The Tableau Snaps (Hyper Formatter, Hyper Parser, and Hyper Write) invoke tabcmd internally for their functioning.
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 |
---|---|---|---|---|
Input | Document |
|
| Data in document format. |
Output | Binary |
|
| Document in binary format. |
Snap Settings
Field Name | Field Type | Description |
---|---|---|
Label*
| 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
| 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 | Dropdown list | Select one of the three modes in which the Snap executes. Available options are:
|
Troubleshooting
Error | Reason | Resolution |
---|---|---|
| The
| When you encounter this error, follow these steps to resolve the issue:
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:
Transform data into hyper extract
Initiate file upload
Append file upload
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 |
---|---|
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.
Data Configuration | 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 |
---|---|
|
|
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 |
---|---|
|
|
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.
Downloads
Important Steps to Successfully Reuse Pipelines
Download and import the Pipeline into SnapLogic.
Configure Snap accounts as applicable.
Provide Pipeline parameters as applicable.
Snap Pack History
Related Content
https://help.tableau.com/current/api/hyper_api/en-us/index.html
https://docs-snaplogic.atlassian.net/wiki/spaces/SD/pages/1439233/Glossary
Have feedback? Email documentation@snaplogic.com | Ask a question in the SnapLogic Community
© 2017-2024 SnapLogic, Inc.