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.

@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.

image

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

BR,
Spiro Taleski

2 Likes

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

@alok.tiwari

Directory Browser is always an option :smiley:

BR,
Spiro Taleski

3 Likes

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.

3 Likes

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 ?

Hi @alok.tiwari,

If your goal is to access the pipeline statistics from another pipeline please refer to:
Pipeline Monitoring API.

Sample response:

BR,
Aleksandar.

3 Likes

@AleksandarAngelevski its working and can use its fields for further process.
Thank You :slightly_smiling_face:

1 Like

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 :sparkler: :sparkler: :sparkler: :sparkler: :sparkler: :sparkler:

Thanks,
Em

1 Like

Hi @AleksandarAngelevski
Can you please share me the sample pipeline or the config which I can use to get this data populated at output.
It will help a lot…

1 Like

Thank You @alchemiz