Using Date.now() while exporting files
Hi Team, While writing files via sftp, I’m unable to ingest Date.now() in the filename itself as seen in the snaps below: (1) Successful execution [passing pipeline parameter and selecting the ‘=’ decorator (2) Failed execution [NEITHER passing any parameter NOR selecting ‘=’ decorator] The reason behind not selecting = decorator is - “I’m not passing any parameter to dynamically generate filename” If the file name needs to be constant and it needs to be exported via sftp with Date.now(), what tweaks should I do? I’m pretty sure, snapLogic would be able to handle that and I might be doing something wrong here. Thanks in advance for your help 🙂 Regards, DTSolved16KViews0likes21CommentsCan We create a Variable in Mapper
Hello Everyone, I am trying to create an incremental addition let say i have 2 columns empl_id and salary so in target i want to derive third column with cumulative salary. I can do it by using variable, have done it using Different tool but never implemented it in snaplogic Hence the question can we create Variable in mapper? any help is appreciated16KViews1like21CommentsConvert Base64 to HEX
I am working on a Snaplogic pipeline to copy data from Oracle to Snowflake. A few tables at source have BLOB column which needs to be copied. Snaplogic sees them as “Base64 encoded data” but Snowflake needs the data in HEX format. I would like to know if its possible to convert the data as required and load into Snowflake tables. I’ve attached a sample pipeline. TEST_2021_06_18.slp (7.1 KB)16KViews0likes17CommentsHow to remove blank rows from an input flat file?
Hi Team, How can I remove all the blank rows from an input flat file? I cannot use a condition restricted on a single column as the other records are needed. All I want to do is filter out ALL ROWS that doesn’t have any data (like Row 4, 5, 7, 8 shown in the screenshot below) Desired Output: Thus, final output should be: Thanking in advance. Regards, DTSolved15KViews0likes18CommentsCapitalize First Letter of Every Word in a String
Is there a good way to capitalize the first letter of every word in a string with the rest lowercase natively in a Mapper or other snap? For example: fort worth => Fort Worth SAN ANTONIO => San Antonio I see the upperFirst() and capitalize() functions but they only work on the first character in the string, not every word.Solved14KViews0likes2CommentsPerforming 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) )14KViews7likes14CommentsIs there a way to selectively exclude fields output from a mapper snap?
I have a case where many fields may have to be excluded from mapper output, as if they never existed, selectively during a run. I am going to a cloud instance of a routine that will take null values in, and display them, or may delete wanted values, if this is not implemented correctly. Is there some way of implementing a way to selectively disable/enable the “target path” declaration on a mapper, while it is running? I even tried passing all nulls, and it doesn’t work.Can we hyperlink inside a mapper snap?
Hi Team, I was tryin to use native JS function link in order to hyperlink inside a mapper. I found that it doesn’t work, does anyone know a similar functionality or a workaround? Basically, I was trying to hyperlink an existing column “ID” and wanted to output this in an excel file. Snaps below for reference: Thanking in advance for your help 🙂 Regards, DTSolved13KViews0likes19CommentsRemoving curly brackets after using "to.String()" across a group of fields
to.String() works as expected for a single field however for multiple fields together, I’m getting an additional { } as seen in the snaps below, would you be able to help me get rid of this? (1) Single Field without using to.String() (2) Single field with to.String() (3) Multiple fields in group without to.String() (4) Single field from a group with to.String() (5) Multiple fields in group with to.String() [The extra curly brackets are in this snap which needs to be removed] Should I go ahead with the route of using another mapper after this and replacing ‘{’ with “”? Thanking in advance for your time and help 🙂 Regards, DarshSolved13KViews0likes5CommentsTransformation rules inside mapper snap not exported to output file
Hi Team, I have found one of the transformational rules applied on “date field” not getting exported to the final output file (i.e. excel file) when the pipeline has been executed. Output preview on the snap does show the right data (i.e. expected one), pipeline validation also shows the right data however the file which gets generated after pipeline execution doesn’t get those details. I have tried the following: validated pipeline via shift+validate tweak the transformation rule, save the pipeline and check the output in the preview validated the preview file (with default 50 records) deleted the file generated by “validate & execute” snap on File writer with default 50 records so that new instance of data comes in executed the pipeline with different file name multiple times It’s a simple pipeline consisting of Snowflake Execute --> Mapper --> Excel Formatter --> File Writer Sharing some screenshots to help it understand better: (1) Pipeline with 4 snaps (2) Snowflake execute output preview in JSON format (highlighted yellow fields needs transformation) (3) Transformation Rules on Date fields (4) Transformation Rule: $Expire_Date.toString().replace('{Timestamp=',"").replace('.000+0000}',"Z") (5) Output preview after transformational rule (6) Mapper output preview shows different data → I’ve observed certain times that the transformation rules won’t work so I go inside the mapper, modify the rule a bit, bring it back to default rule so that I can save it (save is not enabled if there is no change thus this workaround) (7) As shift+validate didn’t work, had to change the transformation rule, save it and then this is the output preview on mapper snap: (8) Settings under excel formatter snap for reference: (9) Settings under File Writer snap for reference: (10) File generated with default 50 records due to validate & execute on File writer snap (11) Downloaded the file that gets generated in step 10 and below is the output (expected) (12) Executed Pipeline (13) Output File of Executed pipeline I’ve seen this happening numerous times particularly to fields containing timestamp in other pipelines too, am I doing something wrong over here? Any settings that needs to be changed either in Mapper, Excel Formatter or File Writer snap? Thanking in advance for your valuable time and suggestions on this one. Best Regards, DTSolved11KViews0likes23Comments