August 15, 2023

Downloading files from MongoDB GridFS – Docs for ESB 6.x

Downloading files from MongoDB GridFS

  1. Double-click tMongoDBGridFSGet to open its
    Component view.

    use_case-mongodbgridfs9.png

  2. Select the Use existing connection check box
    and from the Connection list, select the
    component in which the MongoDB connection to be used is defined.
  3. In the Bucket field, enter the bucket in
    which the files to be retrieved are stored. In this example, it is talend_channel/61.
  4. In the Local folder field, enter the path to
    the local folder in which you want to store the downloaded files. In this
    scenario, it is C:/tmp/output.
  5. Select the Use Document ID as output filename
    check box to rename each downloaded file using the value of its ObjectID attribute.

    Since a file in GridFS is distinct by ID rather than by name, it is possible
    that several files are using the same file name. For this reason, when
    downloading this kind of files into the same directory without renaming them
    differently, an exception is returned to alert that the file being downloaded
    already exists. In order to avoid this error, you can either select the
    Overwrite local files check box to replace the
    existing one with the latest downloaded file or rename these files on the fly
    using their IDs. In this example, the strategy of renaming these files is
    adopted.

Document get from Talend https://help.talend.com
Thank you for watching.
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x