adobe / helix-run-query

service that executes queries on BigQuery datasets generated by Helix-Logging
Apache License 2.0
6 stars 11 forks source link

return correct total in response to make pagination possible bdf-query #911

Open MarquiseRosier opened 1 year ago

MarquiseRosier commented 1 year ago

Description currently a non-numerical total is returned,

To Reproduce query rum-pageviews-bdf with an authorized domain key.

Expected behavior total needs to be numerical like the limit parameter. so we can determine how much info is missing and we need to provide materials for folks to paginate.

Screenshots Screen Shot 2023-07-13 at 9 04 11 AM

issue raised by David Barrat of the DAAS team.

langswei commented 1 year ago

I believe this relates to #921 which needs to be merged first. Since a change would be required to the file named rum-pageviews-bdf.sql, I'd like to take the opportunity to move it to a folder (bdf@rum-pageviews.sql) which also requires some work in the dash-queries branch to be merged.

langswei commented 1 year ago

RE: non-numerical values, that is likely due to https://github.com/adobe/helix-run-query/blob/main/src/util.js#L165-L166. My suggestion at this time is to not consider the offset and total fields as having any relation to pagination (which is not implemented at this time).