Forum Discussion

alok_tiwari's avatar
alok_tiwari
New Contributor III
3 years ago
Solved

Check File Size | Writer Snap

Hi,
I am looking for a help in a flow.
I have created a flow where I am reading the file from one location and writing the file to different location in SLDB or other directory using FTP/SFTP.
I wanted to check the Size of the written file is there any way to find out ?.
To check the size of file from read snap or directory we can use Directory Browser Snap.
How to check the size of the file which is written using file writer snap to different location just like Directory Browser Snap.

10 Replies

  • Hi, @alok.tiwari

    Another way to check the file size is to open the Pipeline Statistics and to check the Bytes property for the wanted File Writer Snap.

    Please refer to the attached picture below,

    BR,
    Aleksandar.

    • alok_tiwari's avatar
      alok_tiwari
      New Contributor III

      Thank @AleksandarAngelevski

      Is there any way to use/access the pipeline statistics fields
      in pipeline ?
      I am working on the project where I have to verify the Size of the file which I have read and written using file writer snap.
      Suppose I can use the fields or data from pipeline statistics that will help to compare and verify the sizes.
      Is there any way ?

  • SpiroTaleski's avatar
    SpiroTaleski
    Valued Contributor

    @alok.tiwari

    If you are writing the file to SLDB, then in the Manager Tab(under Files), you will be able to see the File Size(in Bytes) of the written file.

    Using the File Writer Snap, don’t believe that there is an option to check the file size.

    BR,
    Spiro Taleski

  • alchemiz's avatar
    alchemiz
    Contributor III

    Hi Alok,

    Good day, as an alternative you can also use a mapper snap in computing for the content-length before writing the file

    parseInt((Base64.encode($content).replace(/=/g,β€˜β€™).length / 4 * 3).toString())

    Happy Holidays πŸŽ‡ πŸŽ‡ πŸŽ‡ πŸŽ‡ πŸŽ‡ πŸŽ‡

    Thanks,
    Em

  • alok_tiwari's avatar
    alok_tiwari
    New Contributor III

    For file written to SLDB we can check from manger, what if we are writing to another location other than SLDB like S3 or any other file system ?.
    Thanks for your help @Spiro_Taleski