Close popover
Sudesh Kothare (SudeshK0)

SudeshK0 Member since 2012 6 posts
Posted: June 17, 2020
Last activity: November 23, 2020

how to get Records Count in a file using Repository API (List Files API)

Hello Product team:

I have been using Repository APIs to manage files on the Cloud SFTP server folders.

There is a Use Case to obtain Number of Records in few files sitting on the SFTP directories. I could not find any Repository API that provides this count.

Can you provide some insight if there is any method to get this count, without using Java? Is any Product Enhancement planned to add this Meta data about the file?

The List Files API returns the following metadata for files and folders in the directory that you defined: •pyName – the short name of the file or folder. •pyPath – the complete path to the file or folder. •pyIsFolder – a Boolean value that is true if the content is a folder and false if it is a file. •pyLength – the size of a file in bytes. This value is not returned for folders. •pyLastModifiedTime – the last time that a file or folder was modified.  

In addition to the above, it would be helpful to see other meta data related to that file, like Number of Records in the file, Average Size of Record, maybe even add Optional parameter to compute Number of Occurrences of a particular string. This is more like an Enhancement Request

Pega Platform 8.4.1 Cloud Services Financial Services Lead System Architect