cancel
Showing results for 
Search instead for 
Did you mean: 

How do we use a pipeline parameter in a snap to pass NO account?

stephenknilans
Contributor

I HAVE to handle multiple accounts, by request, so I NEED a pipeline parameter. Unfortunately, I have come across a need to make that NO account, so it reads and writes on the local snaplogic instance, under files in the manager. If I set it to nothing, a blank, or null, I get, in the object using the lack of an account:

Failure: Cannot load account: , Reason: Unexpected character (‘<’ (code 60)): expected a valid value (number, String, array, object, ‘true’, ‘false’ or ‘null’) at [Source: 404 Not Found

Not Found

The requested URL was not found on the server.

If you entered the URL manually please check your spelling and try again.

; line: 1, column: 2], Resolution: Please make sure the computed path to the account is correct

How can I get it to act simply in the default manner as if it had no account because it DOESN’T have an account? BTW The file is also simply the file name, and I tried the default of …/shared/filename.ext

Steve

3 REPLIES 3

tstack
Former Employee

I’m able to make it work by setting it to null. Can you provide a sample pipeline where it does not (along with the error message)?

Here is a screenshot where I am using null with a File Reader and it seems to be working. The preview window is showing the response from (http://httpbin.org/headers) and there is no “Authorization” header, so the account is not being used.

image

eguo
Former Employee

In my current project, I actually used expression _accountSftp == ‘’ ? null : _accountSftp in a file reader snap to allow easy switch between SFTP and SLDB.

Thanks, eguo, it works. I was hoping for some setting or something, rather than a change made on every connection. Unfortunately, this is a connection I use in a lot of areas. I use it to specify an area several files are placed into and/or read from.