Search in Array
hi there, I have data coming in these structures source1 - { "@type": "array", "order-line": [ { "line-num": "00010", "attachments": { "@type": "array", "attachment": { "type": "AttachmentText", "text": "Testing the Long Text Documents" } } }, { "line-num": "00020", "attachments": { "@type": "array", "attachment": [ { "type": "AttachmentText", "text": "This is the Third time being sent.\n\nIn our continuing efforts to reduce transportation costs and increaseefficiency Clearway Energy Inc. has contracted Malark Logistics andjointly developed the following routing instructions. Please complywith the following instructions. Failure to comply will result inescalating non-compliance fees beginning at $50.00 per shipment andreaching $250 plus freight costs for subsequent violations.\n" }, { "type": "AttachmentText", "text": "This is the second time being sent.\n\nIn our continuing efforts to reduce transportation costs and increaseefficiency Clearway Energy Inc. has contracted Malark Logistics andjointly developed the following routing instructions. Please complywith the following instructions. Failure to comply will result inescalating non-compliance fees beginning at $50.00 per shipment andreaching $250 plus freight costs for subsequent violations.\n" } ] } } ] } and source2 - { "line-num": "00020", "attachments": [ { "type": "AttachmentText", "text": "This is the second time being sent.\n\nIn our continuing efforts to reduce transportation costs and increaseefficiency Clearway Energy Inc. has contracted Malark Logistics andjointly developed the following routing instructions. Please complywith the following instructions. Failure to comply will result inescalating non-compliance fees beginning at $50.00 per shipment andreaching $250 plus freight costs for subsequent violations.\n", "Id": null } ] } how can I compare to see Source2 Atttachment.Text exists in Attachment.Text of Source1’s , where line-num is same? Any help is greatly appreciated. Thanks ManoharSolved28KViews0likes8CommentsUsing 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 appreciated16KViews1like21CommentsHow 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, DTSolved15KViews0likes18CommentsCan 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, DTSolved13KViews0likes19CommentsConnect SFTP server to fetch multiple files
Hi All, I am trying to connect SFTP server and fetch multiple files from the source remote directory. File Reader snap has an option to get SFTP account but doesn’t find how to provide remote directory path. In the remote directory, we are getting different types of files like *.txt where I need to apply filters based on the filenames to differentiate and invoke the different process to load into SQL DB. Once I fetch the files from remote location how to delete the files. Appreciate your inputs and any relevant links to look into more details. Let me know if you need any further details. Thanks in advance, Amar13KViews0likes16CommentsJoin 2 arrays
I have 2 different arrays, one having id, header and another having id,name. Need to join these 2 arrays and get an output file of id,header,name. I need json splitter json path, I have just for id which is jsonPath($, “id[*]”). How do I include both id and header. File.txt (4.2 KB)Solved13KViews1like15CommentsRemoving 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, DarshSolved13KViews0likes5CommentsSending CSV file from SFTP server to API (REST Post)
Hi fellows, I am trying to send a csv file from an sftp server to an api endpoint but I can’t make the REST POST to work, I keep getting error:400 from the api I have tried 3 different pipelines but all of them get the same error I tried 3 different ways to pass it the input: the fisrt one I format the file i get form the sftp and transform it to a document input: error: POST setting: then I tried just to read it and put it right away though the binary to document input: error: POST settings: then I tried to just write it(not in the pipline underneath) and read it from the local file store from snaplogic but didn’t work either error: POST settings: Hopefully someone will spot what I’ve been doing wrong because I’ve spent a lot of time triyng to get this right :c pd.I already tried guiding myself with these two posts I found with no success: REST Post Trying To Send a CSV File Designing Pipelines restful_post_example.docx (314.4 KB) Hello Everyone. I am brand new to SnapLogic as well as brand new to RESTful API’s so please bear with me and not make fun of me too much. :slight_smile: I attached a document to help visualize what I am trying to do. I am just trying to do a proof of concept for a project using the REST Post snap to upload a CSV file but I cant get it to work and I was wondering if someone might be able to help point me in the right direction. Thanks in advance for your ki… REST POST A File? Designing Pipelines Seems like a silly question, but I have a pipeline with a REST POST snap like below which posts a file pulled directly from the SLDB filesystem and posts it to a URL, specifying an Upload File and Upload File Key. This seems to work fine… [works] But my file won’t really be coming from the SLDB filesystem, so I want to pretend my file is coming in via prior snaps in the pipeline and reference that in the REST POST using the HTTP Entity. So instead I’m loading the file separately and then run… thank you in advance for reading.12KViews0likes9Comments