ContributionsMost RecentMost LikesSolutionsInserting timestamp string to DB2 database table Hello, I am having trouble with writing to a db2 database table using the jdbc generic insert, or being more specific writing a timestamp format string to a timestamp column. I have to read from a csv fle and insert the rows into a db2 database table I can perfectly do so by skipping the timestamp column but that will cause the field in the table record to take the current timestamp value(which obviously is not the intended outcome) when I try it with the date value i get the next error “Batch failure. The batch was submitted, but at least one exception occurred on an individual member of the batch”, I only get this error when including the date in the mapper output to the jdbc insert. the initial date&time string is in his format: “M/DD/YYYY HH.MM” and I format it in two steps(mappers) first: Date.parse($[‘Date & Time’]).toLocaleDateTimeString() OUTPUT=>“2018-08-21T16:48:00.000” second: ($DATE_PROCESSED.slice(0,10)+“-”+$DATE_PROCESSED.slice(11).replaceAll (“:”,“.”)+“000”).toString() OUTPUT=>“2018-08-21-16.48.00.000000” this is the format(TIMESTAMP) that is stored in the database but for some reason the insert still fails only when I include it in the mapper and I have tested the same string that the mapper gives me by inserting through query and it works fine… I don’t know what could be messing in the middle that I am not seeing… I’d appreciate any insights you can have on the way I am managing things. THANK YOU. Auto login to OKTA when refreshing the token Hi guys, we have implemented secutiry in our api with okta using a token and works fine but when the token expires it won’t refresh the token automatically (even though Auto-refresh token is checked) so we have to enter to the Account(REST OAuth2 Account) and click authorize to get a new one but it opens a pop up window asking to put your okta credentials, so we always have to do it manually because we don’t want to be spreading the credentials nor have to be refreshing the tokens manually. Is there a way to make the Account to automatically log in to okta and to refresh the token without someone having to get a new token every hour and a half? note.refresh button in Account window won’t work as it displays “error: access token refresh failed” thanks for reading. Re: Connecting Windows based SFTP servers using SnapLogic well you most likely solved it already but for anyone that comes to your post something similar happened to me, it was all fine but the snaplex I was using was the wrong one, It was set by default to one that pointed to google cloud and all I had to do was changing the snaplex to one that we had that pointed to aws, and it just worked! (and putting the url between double quotes, having the = button pressed) Re: Sending CSV file from SFTP server to API (REST Post) robert_parks: I ran into something simillar – we had a file we had to stage on a WEBDAV and it seems we should use a REST, but we were able to send the file to the API using the FileWriter with the account set up as Basic Authority. thank you for taking the time to reply! although I don’t know if that could work for me as I have to use a token for security but it’s nothing I can’t try 😀 Re: Sending CSV file from SFTP server to API (REST Post) aleung: @dwhite comment is correct. Here is what your pipeline should look like: sFTP file reader > File Writer (local SLDB: tmp file) > REST POST (with mutipart) > File Delete (remove tmp file) Hi thank you for replying, I have this : Label*=InnovaZones REST Post Service URL*=http://10...*:****/v1/innovazones HTTP entity=(blank) Batch size=(blank) Show all headers(unselected) Single file upload: File=…/shared/innovaZones_corrected.csv Single file upload: File key=file Single file upload: Filename to be used=innovaZones_csv_file Upload transfer request type=chunked after encoding Upload body type=Multipart form data Single file upload: Multipart Content-Type= application/octet-stream HTTP header: Key=Content-Type Value=application/x-www-form-urlencoded key=Authorization Value="Bearer " + account.access_token and I only need this to connect through postman: I swear I have read to death the doc of the snap but it haven’t worked so that’s why I feel I need to ask “is that snap well settled?” 😢 thank you again for taking the time to reply. Sending 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.