Question
Merkle
CA
Last activity: 23 Nov 2020 11:10 EST
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?
https://community.pega.com/knowledgebase/articles/data-management-and-integration/84/list-files-api
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