Basic string transformations not working
Hi Team, I observed that basic string transformations are not working, few of the scenarios have been listed below: Trimming spaces from the text Changing the text from uppercase to lowercase and vice-versa I have used both the mapper and conditional snap however haven’t found any luck to it. Examples for the above-listed scenario: (1) Text is Darsh and if I put the transformation to change this to uppercase, it should return DARSH however the end result remains as is (2) Text is " Darsh", after using trim(), trimLeft(), trimRight(), the expected result should be “Darsh” however the end result doesn’t change. Any help on this would be highly appreciated. Regards, DarshSolved3.4KViews0likes4CommentsLooping through Api call
Hi We have a requirement where, If we do an api call , we get response something like below { records_remaining : “200”, records_processed: “100”, failed: “0” }, “entity”: [ "rec1: “abc”, “rec2”:“xyz” ] Pagination does not support by Api . we need to wait for 10 sec for every api call until we get records_remaining is 0 for example https:abc.com/8080/getfullload?batch=50 -----> wait for 10 sec and do the same call until we get records remainining to 0 @bojanvelevski Any best way we can achieve this? please help!Solved3.7KViews0likes3CommentsHow To Generate Rank with Partitions
Hi I need to generate the rank for the below data where data should be partitioned by No and Date order by value and want to get the top 3 ranked categories for each No and each Month. Input : No Category Date Value Rank 1 Dog 01-01-2022 32 1 Rabbit 01-01-2022 95 1 Fish 01-02-2022 4 1 Ox 01-02-2022 23 2 Cat 01-01-2022 4 2 Mouse 01-01-2022 12 2 Woman 01-02-2022 66 2 Man 01-02-2022 56 3 Bird 01-01-2022 54 3 Bee 01-01-2022 43 3 Cow 01-02-2022 32 3 Pig 01-02-2022 89 Expected Output : No Category Date Value Rank 1 Rabbit 01-01-2022 95 1 1 Ox 01-02-2022 23 1 1 Dog 01-01-2022 32 2 1 Fish 01-02-2022 4 2 2 Mouse 01-01-2022 12 1 2 Woman 01-02-2022 66 1 2 Cat 01-01-2022 4 2 2 Man 01-02-2022 56 2 3 Bird 01-01-2022 54 1 3 Cow 01-02-2022 32 1 3 Bee 01-01-2022 43 2 3 Pig 01-02-2022 89 25.1KViews0likes5CommentsFlatten multilevel/nested JSON Objects and Arrays
Hello there, Is there a way to flatten a nested JSON (multiple objects inside objects/arrays) without using a Script Snap? Take this input for example: { "msg":"Hello, World", "num":1, "fruits":{ "apple":1, "orange":4, "inner2":{ "message":"found" }, "cars":[ "bmw", "audi", "dacia" ], "cars2":[ { "bmw":"something" }, { "audi":"else" } ] } } The output should look like this: { "msg": "Hello, World", "fruits.cars2.1.audi": "else", "fruits.orange": 4, "num": 1, "fruits.cars.1": "audi", "fruits.cars.0": "bmw", "fruits.apple": 1, "fruits.cars.2": "dacia", "fruits.inner2.message": "found", "fruits.cars2.0.bmw": "something" } So every key name is constructed from the inner objects/arrays of key names delimited with “.” in the case of objects. In the case of arrays, the key name should also have the index number of the current item. One way to do this is using the script snap using any available language. A function that loops through the root object and check the type of the current property. If it’s of type Object or array then I can call the function again. I’ve tried using expression libraries but with no luck. Any ideas?5.1KViews0likes4CommentsHow to give multiple key columns in join?
I have multiple tables and I need to join them all with different key columns by using the join snap, but it is resulting in the following error:-Failure: Right join path not found for input2, Reason: Right join path required, Resolution: Please address the reported issue. Below you can see the screenshot that we are joining with different key columns Please help me how can we do the join with different key columns?4.6KViews0likes5CommentsUsing list of values in Filter snap
Hi Team, Is it possible to function a list of values in the filter snap? Let’s assume, I want to filter IDs whose values are 100, 110, 300, etc., how can I put this in Filter snap without using || function? I was planning to use $ID IN (100, 110, 300, etc.) but this one doesn’t seem to work so I have been using a conventional way as below: $ID == "100" || $ID =="110" || $ID =="300" Thanking in advance for your suggestions. Regards, DarshSolved9.2KViews0likes12CommentsPerforming an Action when there is no data
A common integration pattern is to do something when no data is received. For example, we might read a file, parse it, and find that no records meet some filter criteria. As a result, we might send an email, or insert a ticket into a ticket management system like ServiceNOW. However, in SnapLogic, this can be somewhat more difficult than it seems initially because of the streaming architecture. In fact, many snaps will not execute without input documents - rather hard to accomplish when there is no document to flow through: So, how can we take an action, even though there’s no document to run the snap? The trick is to make a document and force it into the stream with a Join Snap (set to Merge): Note in this figure that even though nothing flows into the top view of the Join Snap, it still produces an output. This enables us to use the Router snap to check whether or not a field that we know will exist in the source does in fact exist. If it does, we know that data has passed through the Filter snap and then been merged with the Sequence data. If it does not, we know that only the Sequence data has been passed through and therefore nothing made it through the Filter . Only one of these views will have anything pass through it. The magic here is in the Merge option in the Join snap. As long as it is receiving data on a view, it will output - even if it has nothing to ‘join’ to. Meanwhile, the Sequence snap will always output the number of documents that you set it to. In this case, only one is required. (This pipeline here: Do something after no doc filter_2017_04_26.slp (11.1 KB) )14KViews7likes14CommentsRequire API to build a pipeline to find the high CPU and memory utilization of an individual pipeline during its runtime
We are trying to design a pipeline in Snaplogic to identify the high CPU and memory utilization of an individual pipelines that ran in a month using public API. We tried using runtime API but we are not able to get the expected output. API used: “https://elastic.snaplogic.com/api/1/rest/public/runtime/ ” “https://elastic.snaplogic.com/api/1/rest/public/runtime/Environment/ ”+$Runtime_ID Is there an API for it? which can give the expected output.1.4KViews0likes0CommentsPrefixing/Suffixing multiple Input Schema in Mapping table expressions (i.e. Target Path) under a mapper snap
Hi Team, Can we prefix/suffix multiple field names in mapping table expressions under mapper snap in a single shot? As per the above screenshot, I can either: Select All as is Manually select required field names, do necessary transformations (if any) and then save it with a same or a different name in target path Let’s assume I have n (where n>=10) snowflake tables to read and eventually I would be joining them, each table is having 300+ columns and I need to prefix/suffix those column names in my snapLogic pipeline ONLY with something through which I can distinguish each field name. Is it possible to do that inside a mapper snap? I’m fine to use the same field name as Input Schema but the only addition would be a prefix/suffix text and that to saving manual efforts on 300+ columns for n different tables I read. Screenshot below on how I would want each field name to appear with reduced manual efforts (it could be either of prefix or suffix, I’m not looking for a combination at this point of time) P.S.: If there is any other snap than mapper that does the job for me, I would appreciate the help and leads. Thanking in advance. Best Regards, DTSolved5.6KViews0likes6Comments