SnapLogic is a cloud-based integration platform-as-a-service (iPaaS) that provides tools for connecting various applications, data sources, and APIs. It enables businesses to automate and streamline their data integration processes by offering pre-built connectors and a visual interface for designing integration workflows.
The SnapLogic platform uses a SnapLogic pipeline, a series of connected "Snaps" (pre-built components) that define the flow and transformation of data between various systems and applications. In a SnapLogic pipeline, data flows from one Snap to another, with each Snap performing a specific function, such as data extraction, transformation, or loading (ETL).
The SnapLogic Designer is the user interface that enables you to develop pipelines. You can see the example page below.
But in SnapLogic with a feature called “Asset Palette,” you may see the different styles of Side Panel view. But the features are the same as those of the side panel view.
The designer page consists of three main parts:
Icons |
Description |
Execute Pipeline
|
Execute the pipeline. |
Validate Pipeline
|
Validate the pipeline. Any unsaved changes will be saved before validation. Clicking the button while a validation is in process cancels that validation. Shift-clicking the button will clear the cache before validating. |
Edit Pipeline Properties
|
You specify properties when creating a pipeline. Click this button to modify the properties. |
Check Pipeline Statistics
|
As a pipeline executes, the statistics are updated periodically so that you can monitor its progress. |
Create Task
|
Create a Task for the current pipeline. |
Save Pipeline
|
Save the current pipeline. |
Export Pipeline
|
Export the current pipeline. |
Copy Pipeline
|
Copy the pipeline from one project to another. |
Move Pipeline
|
Move the pipeline from one project to another. |
Delete Pipeline
|
Delete the current pipeline |
Pipeline Versions
|
Create versions of the pipeline. |
Compare Pipeline
|
Compare the current pipeline with the target pipeline. |
Notes
|
Add a note or delete an existing note. Notes are saved with the pipeline. |
Print
|
Print the pipeline. |
Snaps are the building blocks of a pipeline. Each Snap performs a single function, such as reading, parsing, transforming, or writing data. You can view the Snaps available to you (or your account) in the Snaps Catalog on the left-hand side of the SnapLogic Designer. You can drag a Snap from the Snap Catalog onto the Canvas to use it in a pipeline.
SnapLogic includes the following basic types of Snaps with distinct icons.
Icon |
Snap Type |
Description |
|
Read |
Specifies data sources in the pipeline. Examples: File Reader, CSV Generator, Birst Query |
|
Parse |
Takes the input of unstructured data and generates an output of structured data. Examples: XML Parser, Sequence Parser, JSON Parser |
|
Transform |
Modifies data significantly. |
|
Flow |
Changes the output or direction of data in a pipeline. |
|
Format |
Changes the data format. Examples: CSV Formatter, JSON Formatter, Excel Formatter |
|
Write |
Specifies data destinations in a pipeline. Examples: File Writer, REST Post, Email Delete |
The key to creating a Pipeline in SnapLogic is connecting Snaps. There are a few things to consider when placing Snaps in a Pipeline.
Like puzzle pieces, only Snaps with matching connection pairs (circles or diamonds) can be connected between the input and output of two snaps.
When you drag a snap and place it next to or in front of another snap, the snap will automatically connect both snaps, and the connection will change color, which means it connects successfully. If the color doesn’t change, you need to recheck that both connection shapes are the same and re-connect it again.
Unlinked Snaps can be moved apart or placed next to each other. Make sure the circle or diamond connector is colored Blue, which indicates that the Snaps are linked.
To disconnect linked Snaps, click on the Blue connector. This clears the color and allows you to rearrange the Snaps.
You can connect to Snaps, but not next to each other, using a remote-connect link. For example, click and hold on the Mapper Snap connector until it turns Yellow, then drag it to the Copy Snap connector. When both connections turn Blue, release the mouse button. A number is placed in both connectors to let you know they are connected.
Note: The number is only temporary until the Pipeline is saved. At this point, a new, permanent number may be assigned.
You can also click and hold on one connection, and both Snaps connected by this link will darken. This feature is helpful for large pipelines where it may take much work to visualize the connections quickly.
SnapLogic will pass the data between snaps with two models:
The document data models will represented by a circle shape. This data type uses the JSON format as a container of the data. The support data type in this model is similar to the JSON standard in that it includes string, boolean, number, array, object, and null.
The document data models will represented by a diamond shape. This data type will wrap the binary data in SnapLogic’s model. Mostly, this will be inputted to the file writer and parser and outputted from the file reader and formatter.
You have two options to open the configuration dialog. First, left-click on the snap that you want to configure. The dialog will show up immediately.
The second way is right-clicking at the snap, and the menu displays options available in all Snaps through a dropdown list will be shown. Then click “Edit” in the menu.
Each snap will have different configurations. You can learn more about the configuration of each snap by clicking the question mark icon on the top right of the dialog.
The SnapLogic expression language is a utility that is available to Snaps. You can use expressions (JavaScript syntax) to access functions and properties to set field values dynamically. You can also use the expression language to manipulate data.
Example
$text == "NFL" ? "foo" : "bar"
$counter > 1 ? ($counter < 3 ? 50 : 100) : -1
Expressions are available across multiple Snaps. If the Snap exposes the functionality of the expression for a property, then the icon appears in front of the property's text box. You can toggle on or off by clicking on the icon. When the toggle is on, the down arrow within the field will appear. You can click to see the list of functions and properties available.
List of supported and unsupported operations available on (document https://docs-snaplogic.atlassian.net/wiki/spaces/SD/pages/1438042/Understand+Expressions+in+the+Snap...)
Parameters allow a pipeline to be reused in multiple situations. For example, a File Writer Snap can be configured to write to a file path specified by a parameter, which allows the same pipeline to write to different files. The parameters for a pipeline can be defined by using the Edit Pipeline properties dialog. The name of each parameter must only contain alpha-numeric characters, and the value will be converted to a string. The value for a parameter defined in the pipeline properties dialog is treated as the default when running the pipeline in Designer. Parameters can also be passed to a pipeline by a Task or the ForEach Snap. Any parameters not passed down from the Task or Snap will use the defaults specified in the properties dialog.
To access a pipeline parameter from the expression language, you must prefix the parameter name with an underscore. For example, given the following parameters:
Key |
Value |
firstName |
Bob |
numValue |
12 |
path |
$.age |
The "firstName" parameter can then be accessed using _firstName, as in:
"Hello, " + _firstName // result: Hello, Bob
Since the value of a parameter is always a string, you'll need to convert any string to numeric values before operating on them. For example, simply adding two to the "numValue" parameter will append the character "2" to "12" and yield "122":
_numValue + 2 // result: "122"
Instead, you need to use the parseInt/parseFloat functions to parse the string into a value and then add two to it:
parseInt(_numValue) + 2 // result: 14
You need to parameterize your pipeline with an expression. You can use the eval() function to evaluate an expression stored in a string. For example, to read the document field specified by the "path" parameter, you can use:
eval(_path) // result: <the value of the "age" field in the current document>
An input view schema attribute can be used as part of the expression using the dollar sign ($) prefix.
Example
The REST Put Snap provides a URL. The URL can be toggled into an expression, and the expressions could be created by dynamically substituting the variables from an input view, such as:
'http://someplace:someport/somepart/' + $inputvar + '/somemoreparts'
Any expression-enabled authentication field in a Snap or Account can be used with Secrets Management. You can enter an expression that retrieves a secret stored in your secrets manager, such as an access token, a username, or a password. To use the values from the secrets manager, you must first create secrets myaccesskey and mysecretkey in the Secrets Manager vault. Then, create or modify the Account and enter an expression in the required fields. Learn more: Configure Accounts to use secrets.
An account represents an object that encompasses details to connect to an endpoint. Accounts play a crucial role in integrating applications. Any Snap that communicates with an external endpoint needs an authenticated account to access the resources on the endpoint. For example, a MySQL Snap requires authenticated access to a MySQL database. In SnapLogic, you create an Account to store credentials and any other information necessary to connect, such as a URL, hostname, and port number.
You can create an account from Designer or Manager. In Designer, when working on pipelines, every Snap needing an account prompts you to create a new account or use an existing one.
To use an existing account, you can click the dropdown icon to show all the available accounts for the snaps.
To create a new account, click the “Add Account” button below the property field and follow the steps. The account will be created in your selected location on the first step. You can manage the created account on the Manager page in that location.
Note: You can learn more about account type and each property by clicking the icon question mark in the top right corner.
Sometimes, we want to test the pipeline by dry-running it without running the write snaps. You can use the validate function on the toolbar menu. The difference between validate and execute is before each snap runs. It will check the property called “Snap execution.” There are three opinions on how to trigger the snaps.
Note: By default, the validation will be triggered every time we change the configuration of the snaps in the pipeline.
After executing or validating the pipeline, they will have a preview icon in the connection joint. The preview dialog will appear when you click on it, showing the snaps' output data. For example, when we click the preview icon, the pipeline above will show output data from JSON Generator snaps.
The preview dialog has three types: JSON, Table, and Raw. You can select the dropdown on Preview Type and choose the type you like.
This section will show how you start creating the pipeline, from the requirement to checking the result and running the final pipeline.
For the example scenario, we want to calculate the employees list to check who needs to be assigned marketing training. The list of our employees looks like the data below.
[
{
"Name": "Albert Maro",
"Location": "Field",
"Extension": 4357,
"Email": "amaro@company.com",
"Title": "Director, Eastern US",
"Department": "Sales",
"Dept ID": 1100
},
{
"Name": "Anthony Dunn",
"Location": "HQ",
"Extension": 4387,
"Email": "adunn@company.com",
"Title": "Social Media Director",
"Department": "Marketing",
"Dept ID": 1200
},
{
"Name": "Rich Harris",
"Location": "CO",
"Extension": 4368,
"Email": "rharris@company.com",
"Title": "Principal Developer",
"Department": "Engineering",
"Dept ID": 1300
}
// more data
]
The constraint of needing training is an employee in the marketing department working at “HQ.” We want the list of employees with Firstname, Lastname, Email, Title, and Training fields. The result should look like below.
[
{
"Firstname": "Albert",
"Lastname": "Maro",
"Email": "amaro@company.com",
"Title": "Director, Eastern US",
"Training": false
},
{
"Firstname": "Anthony",
"Lastname": "Dunn",
"Email": "adunn@company.com",
"Title": "Social Media Director",
"Training": true
},
{
"Firstname": "Rich",
"Lastname": "Harris",
"Email": "rharris@company.com",
"Title": "Principal Developer",
"Training": false
}
// more data
]
1. Open the Designer page.
2. Click to create a new pipeline.
3. Change the label to “Employees training” and click save.
4. At this step, we already have a new empty pipeline.
Then, find the “JSON Generator” snap from the side panel and drag it to the canvas screen. This snap generates a JSON document for the next snap in the pipeline. We will set it as an input source.
5. Click at the JSON Generator snap to open the configuration dialog and click “Edit JSON.”
Then, replace all JSON with the value below.
[
{
"Name": "Albert Maro",
"Location": "Field",
"Extension": 4357,
"Email": "amaro@company.com",
"Title": "Director, Eastern US",
"Department": "Sales",
"Dept ID": 1100
},
{
"Name": "Anthony Dunn",
"Location": "HQ",
"Extension": 4387,
"Email": "adunn@company.com",
"Title": "Social Media Director",
"Department": "Marketing",
"Dept ID": 1200
},
{
"Name": "Rich Harris",
"Location": "CO",
"Extension": 4368,
"Email": "rharris@company.com",
"Title": "Principal Developer",
"Department": "Engineering",
"Dept ID": 1300
}
// more data
]
Click “Ok” and save button () before close the dialog.
6. Wait for the validation to finish. If it doesn’t run validation, click the validation button to manually validate the pipeline.
7. Find the “Mapper” snap and drag it to after the JSON generator. The Mapper snap transforms incoming data with the specific mappings and produces new output data.
8. Click on the Mapper snap to open the configuration dialog.
We focus on the five blocks at the bottom of the dialog.
Next, set the mapping table with the information below. To add multiple mapping, click in the top right corner.
Expression |
Target path |
$Name.split(' ')[0] |
$Firstname |
$Name.split(' ')[1] |
$Lastname |
|
|
$Title |
$Title |
$Location == "HQ" && $Department == "Marketing" |
$Trainging |
The finish configuration will look like this.
Click save and close the dialog.
9. Click the preview button after the Mapper snap. The output should be like this.
SnapGPT is an interactive tool inside SnapLogic Designer. It uses the power of LLMs to democratize integration by helping users create and manage integrations using natural language prompts. The SnapGPT can do six main functions in SnapLogic.
You can open the SnapGPT panel by clicking on the SnapGPT logo in the header bar. Then, the panel will be displayed with a welcome message.
Next, we will show how to use each feature of SnapGPT on the SnapLogic platform.
Prompt direct to the SnapGPT
Example prompts:
Open the pipeline you want to describe, then go to the SnapGPT panel and ask, “Describe the pipeline.”
Example prompts:
Open the pipeline you want to analyze, then go to the SnapGPT panel and ask, “Analyze the pipeline.”
Example prompts:
Result:
SnapGPT identifies issues with the pipeline and makes suggestions for improvement, and Snaps in the pipeline offers suggestions.
Example prompts:
To begin, simply open a snap and select the icon. This action activates the expression generation feature, enabling me to assist you in creating expressions. I can start creating expressions for you either in our chat or inside the expression-enabled field itself by typing the prompt and then clicking on the SnapGPT icon .
Example prompts:
Open a Snap that supports SQL or SOQL queries and open SnapGPT.
For example, if you open the Salesforce SOQL Snap, the suggestion Create SQL query appears above the SnapGPT prompt. SnapGPT generates the query and displays it in the SQL Preview panel. You can review the generated SQL before applying to the snap.
Example prompt:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.