Is there any fast way to get the number of rows in a dataset?
The best idea I can come up with is to do binary probing using $limit and $offset, or maybe some hybrid of binary probing and a final fetch of a single column within a $limit/$offset window when the size is known within, say, 100 or so.
(I checked the HTTP headers... no joy.)
Use the COUNT aggregate function to count the number of rows in a table. This function takes the name of the column as its argument (e.g., id ) and returns the number of rows for this particular column in the table (e.g., 5).
Simple Oracle Document Access (SODA) is a set of NoSQL-style APIs that let you create and store collections of documents (in particular JSON) in Oracle Database, retrieve them, and query them, without needing to know Structured Query Language (SQL) or how the documents are stored in the database.
The Socrata Open Data API allows you to programmatically access a wealth of open data resources from governments, non-profits, and NGOs around the world.
One way you can achieve this is by doing a COUNT(*) operation on the dataset. For example, to get the total row count of this Socrata dataset:
https://data.seattle.gov/City-Business/Sold-Fleet-Equipment/y6ef-jf2w
You could issue this SODA query:
https://data.seattle.gov/resource/y6ef-jf2w.json?$select=count(*)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With