Forum Discussion

Johan's avatar
Johan
New Contributor
7 years ago

Retrieve Filename into Mapper from Box Read

How can I catch the Filename “Box Read” Snap opened into the “Mapper” snap?

9 Replies

  • cstewart's avatar
    cstewart
    Former Employee

    If you want to have the name of the file read you can use this technique, which captures the filename in the mapper after the binary router, and then join that with the data output of the parser.
    I configured that mapper like so:

    and the Join like so:

  • slaytanic70's avatar
    slaytanic70
    New Contributor III

    Is your “Box read” a multi-file reader or single? Single, you can pass a parameter in for the file name instead of calling it directly. If it’s multi, you would have to get a bit fancier by doing a binary to document and getting the content-disposition field to get the filename.

    • Pavol's avatar
      Pavol
      New Contributor II

      Hi, can you post a sample pipeline? How do you ensure that the XML Parser reads the content and not the “content-disposition”?

  • what expression did you use in the binary router for the content-location to show up in the mapper?

      • michelle_maraj's avatar
        michelle_maraj
        New Contributor

        Thanks Dimitri, I did set both outputs to true…but its not giving me the content-location in the mapper snap like it did in the picture cstewart provided.

  • aaronb's avatar
    aaronb
    New Contributor

    @skatpally or @cstewart I am working through this same type of issue and have been able to replicate everything but I found that the data within the CSV file/s are not matching to their respective filenames after the join step? Is there something I have wrong on my join by chance?