I'm looking to retrieve the number of records and columns within a dataset utilizing the APIs within Foundry. One of the APIs that I found that seems to display the number of records is ".../monocle/api/table/stats", however I don't see how to pass through the rid for a dataset.
I'm ultimately trying to get the total columns, records and size for all the datasets I manage in order to build a dashboard using Quiver or Slate to show the amount of data we manage within the Foundry platform.
This other answer uses computeStats and getDatasetStats Foundry APIs. There's another API - getComputedDatasetStats - which gets your required stats and may even perform better.
According to my tests:
sizeInBytes
, but only if computeStats is not run. When I called the computeStats API, and it finished the job,sizeInBytes
became null. getDatasetStats showed null too.To get the row count, column count and dataset size you may try using something similar to this:
Example output: