Forum Discussion

vipulk10's avatar
vipulk10
New Contributor III
8 years ago
Solved

Dynamic filename in s3

hi all,
I have a pipeline which writes a pdf to s3 bucket but the problem is that the filename has to be dynamic. But i cant get the filename as prior to s3 filewriter I have a document to binary snap. Hence the the variable in which i store the name is not available. can someone please suggest a workaround

  • You can map the file name value to $[‘content-location’] prior to the DocToBin Snap and it will be available to use in an expression in the S3 File Writer.

    TK

4 Replies

  • tk42's avatar
    tk42
    New Contributor III

    You can map the file name value to $[‘content-location’] prior to the DocToBin Snap and it will be available to use in an expression in the S3 File Writer.

    TK

  • mukesh-neosalph's avatar
    mukesh-neosalph
    New Contributor II

    Hi,
    Can the same technique be used in CSV Formatter and File writer. I need to dynamically write file name based on each document and want to know how to pass the dynamic file name (as an document variable) for the file writer snap.
    Thanks,

    • tlikarish's avatar
      tlikarish
      Employee

      Here’s one way to do that using a PipeExec snap.

    • epearson's avatar
      epearson
      New Contributor III

      It worked for me with sftp. Example (_sftpPath is a pipeline parameter): _sftpPath + ‘/’ + $original.username + ‘.jpg’