đ Join our Navigation Study and Help Shape SnapLogic's User Experience!
Hello SnapLogic Community! Weâre conducting a study to improve navigation within SnapLogic, and we want your input! By sharing your valuable feedback, youâll play a pivotal role in improving the user experience of SnapLogic. This is an unmoderated study and should take less than 10 minutes of your time. :memo: STUDY IS CLOSED Your insights matter to us, so donât miss this opportunity to make a difference! Thank you, The SnapLogic Team3.3KViews6likes3CommentsBasics of SnapLogic
Introduction 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). SnapLogic Designer 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: Canvas - The field for visualizing and editing the pipeline Side Panel / Asset Palette - The panel contains the menu list. (The left picture is the Side Panel view. The right picture is Asset Palette enabled) Snaps Catalog - lists all available Snaps. https://docs-snaplogic.atlassian.net/wiki/x/ePIV Pipelines Catalog - list all pipelines that you can access. https://docs-snaplogic.atlassian.net/wiki/x/w-IV Patterns Catalog - list all the patterns that you can access. https://docs-snaplogic.atlassian.net/wiki/spaces/SD/pages/3022160260/Patterns+Catalog Toolbar - The list of tools for the pipeline 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 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. Snaps Type 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. Examples: Mapper, Aggregate, Join Flow Changes the output or direction of data in a pipeline. Examples: Router, Gate, Union 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 Connecting Snaps The key to creating a Pipeline in SnapLogic is connecting Snaps. There are a few things to consider when placing Snaps in a Pipeline. Connection Shapes 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. Disconnect Linked Snaps 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. Remote-Connect Link 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. Data model SnapLogic will pass the data between Snaps with two models: Document data The document data models will be 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. Binary data The document data models will be 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. Configuration Snaps 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. Expression 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. Operations List of supported and unsupported operations available on (document https://docs-snaplogic.atlassian.net/wiki/spaces/SD/pages/1438042/Understand+Expressions+in+the+SnapLogic+Platform) Accessing Pipeline Parameters 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 the Pipeline Execute 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> Accessing Input View Variables as Part of Expressions 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' Accessing secret value from the secrets manager 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. Account 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. Validation & Execute Pipeline 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. Validate & Execute - this option makes the snaps run on both the validation and execution steps. Execute only - this option makes the snaps run on only the execution step. The snap writer type uses this as a default value. Disabled - this option prevents the snaps from running. Note: By default, the validation will be triggered every time we change the configuration of the snaps in the pipeline. Preview Data 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. JSON Table Raw Create First Pipeline 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 ] Steps 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. Input Schema - shows the schema of input data Mapping table - is the configuration to map from input data to new output data Target Schema -shows the schema of output data. But this snap hasnât been validated yet, so it shows nothing. Input Preview - shows the current input data Output Preview - shows the current output data 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 $Email $Email $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 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. Generate pipelines Describe pipelines Analyze pipelines Ask anything about the SnapLogic Intelligent Integration Platform (IIP) Generate SnapLogic expressions Create SQL queries Usage SnapGPT 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. Generate pipelines Prompt direct to the SnapGPT Example prompts: Extract opportunity object records from Salesforce and add them to Snowflake Create a Pipeline using Salesforce Read to fetch my Opportunities, Filter out any opportunities outside of the last fiscal quarter, then write them to Snowflake. Extract opportunity object records from Salesforce closed before â2022-10-01â and add them to Snowflake. Create a pipeline that fetches my SnapLogic Activity Logs from the SnapLogic API. Describe pipelines Open the pipeline you want to describe, then go to the SnapGPT panel and ask, âDescribe the pipeline.â Example prompts: Describe the pipeline Analyze pipelines Open the pipeline you want to analyze, then go to the SnapGPT panel and ask, âAnalyze the pipeline.â Example prompts: Analyze the pipeline Result: SnapGPT identifies issues with the pipeline and makes suggestions for improvement, and Snaps in the pipeline offers suggestions. Ask anything about the SnapLogic Intelligent Integration Platform (IIP) Example prompts: How do I build a pipeline? When and how should I use the Salesforce SOQL snap? How can one pipeline call another pipeline? Can pipelines use recursion? How is an Ultra pipeline different from a regular pipeline? Generate SnapLogic expressions 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: Generate an expression to filter my closed lost opportunities. Generate an expression to grab the current date and time. Create SQL queries 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: Generate a SQL query to get the total amount of opportunities closed within the last quarter grouped by the account's country and deal status.6.2KViews5likes0CommentsWe Need You: Influence Our Next Big Thing
Hey there, Iâm Jackie Curry, a new member of the user experience team at SnapLogic. Weâre working on some exciting improvements to SnapLogic and I need your help to influence our upcoming products through user research. Weâd like to show you some early concepts of what weâre working on to get your feedback and input. We want to know if these changes would help you do your job more efficiently. Plus, as a thank you, weâre offering a $100 gift card incentive to all participants who complete the study. If youâre interested, please email me at designresearch@snaplogic.com and Iâll set up a time to chat. Donât worry, I promise to keep it brief! Thank you, Jackie â Jackie Curry Principal User Experience Designer jcurry@snaplogic.com2.4KViews5likes1CommentCLI for BCP (SQL SVR) and dynamic file names
The scenario I needed to accomplish was to pull data from SQL server, group the data sets together based on different fields and then dynamically define the file name based on those groupings. Performance was the #1 consideration and competitive tool sets were able to complete the action in under 2 hours with a 300M record set. For my testing and documentation below, Iâm using a local data set of 3.6M records. Initial attempts at using the SQL Read and SQL Execute snaps quickly excluded those based on required throughput (was getting somewhere between 12k and 18k records per second over the network, 26k records per second local). Calculated out, that would have taken 7-10 hours just for the query to complete. The final solution ended up being broken down into 3 main steps: Command line execution to call a BAT file which invokes the BCP command Reading the dataset created from step 1 and performing the GROUP BY and a mapper to prep the data Document2Binary snap and then a file write which utilizes the $[âcontent-locationâ] value to dynamical set the name. Attached to this post is the ZIP export of the project which contains 3 pipelines along with a SAMPLE bat file which starts the bcp utility. You will need to edit the bat file for your specific database requirements, the pipeline parameter for where the output of the bat file is stored and the location of the file you want written out. Pipeline: 1_Run_BCP_CLI NOTE: There is a pipeline parameter for the BCP output file that gets generated âReference to BATâ - points to a file on the local drive which executes the actual BCP process. (My files are located in c:\temp\bcp_testing) âDEL BCP Outâ will delete the bcp file if it already exists (optional as the bcp process will just overwrite the file anyway) âcli to runâ is renaming the bat key value (originally done as I was testing the cli and bcp execute - could be removed) âremove nullsâ will clear out the results from the âDEL BCP Outâ since itâs not part of the command line that needs to be executed. âExecute CLIâ is a script snap which will kick off the bat file and once completed, return a single record with the results. âProcess BCPâ Outâ is a pipeline execute which calls 2_BULK_DAT_READ and passes the pipeline parameter for the file to read in the next step Pipeline: 2_BULK_DAT_READ âBCP Out File Readâ will use the pipeline parameter value specified for which file to read âCSV Parserâ self explanatory - does NOT have any headers on the data file (to enhance the pipeline, you could add the second input and define the file format with column names and types) âGroup by Fieldsâ takes the first 2 field names (field001 and field002) and will create groupings for each set. This is the results of the initials for both first and last name from the BCP SQL Query. âMapperâ will convert the JSON payload to $content as well as define $[âcontent-locationâ] based on the grouped by fields. The expression is $groupBy.field001+"_"+$groupBy.field002 âPipeline Executeâ will provide both $content and $[âcontent-locationâ] to the next pipeline Pipeline: 3_DynamicFile_Write âDocument to Binaryâ with the option for âDocumentâ as the Encode or Decode setting allows the JSON records to be output as a binary stream. âFile Writerâ will build the protocol, folder specification and the file name based on the provided $[âcontent-locationâ] value from before. Execution Results The 3.6M records were actually processed in 16 seconds. The BCP process itself took 24 seconds. My group by was based on the first characters on both First name and Last name. This process ended up creating 294 files (locally) and used the naming convention of _.json Sample screen cap of the A_A.json file: Notes and File The file created contains a KEY for âcontentâ and is not pretty print json. For the screen cap above, Iâm utilizing the JSTool â JSFormat plug-in for Notepad++. This approach will only create JSON formatted data (not CSV or other formatter options) BCP is required to be installed and this was only tested on a WINDOWS groundplex EricBarner-SQLSvr_BCP_CLI_Community.zip (4.4 KB)5.7KViews4likes2CommentsCommon Error Handler
Hi, As requested in another thread, here is our common error handler which weâre trying to use across all projects. Feel free to share your own and any ideas! Here is the screenshot (pipeline definition is attached below): Key features: We have multiple potential notification mechanisms - currently e-mail and/or ServiceNow We have the option for either critical failures (fails the parent Pipeline) or non-critical (send error notification but does not fail the parent) We use a parameters file to configure error behavior for each calling/parent pipeline so that this can be changed for each environment (including things like the e-mail recipients) Parameters are also driven by an âerror codeâ which is passed in from the parent - this allows us to have different error behavior in different section / scenarios of the parent pipeline It is up to the pipeline designer to correctly map the document data which is input into the error handler, including identifying the relevant data to include in the message (e.g. the unique identified of the record which is in error). The package below includes the error handler, the parameters file and an example demonstrating its use. ErrorHandler.zip (6.8 KB) Cheers, C.J.3.2KViews4likes0CommentsDetecting schema change
Here are two pipelines that everyone can relate to. Detecting schema change in an upstream data source (SQL Server in this example) and identifying the exact nature of change. Also check out our blog post on this topic. SchemaChange_SaveOriginal.slp (5.7 KB) SchemaChangeDetection_Compare.slp (39.6 KB)2.3KViews3likes0CommentsMapper vs. JSON Splitter
Did you know that you can use the Mapper snap to the same effect as JSON Splitter? There are some other reasons why you may want to use JSON Splitter. First of all letâs look at how mapper can achieve similar functionality of JSON Splitter To achieve the same split, in the mapper, just drag the array into the left hand expression and map it to $ in the right hand side target path. Basically this will split the array elements into the outgoing documents. Using JSON Splitter however, you get additional benefits of including scalar parents as well as including different output paths as part of the split. Attached is an example (simple one of course). json split vs mapper_2017_08_08.slp (7.1 KB)4.5KViews2likes0CommentsDesigning a pipeline to route depending if there is or is not data in an initial query
Hi, I am trying to design a pipeline where it initially will pull in a query result set. I am trying to create a route that identifies whether the query result set returned records or did not return records. Any idea on how to design this pipeline?2.3KViews1like2Comments