Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change warehouse raw data endpoint to respond with JSON text sequence. #1858

Merged
merged 4 commits into from
May 30, 2024

Conversation

aaronweeden
Copy link
Contributor

@aaronweeden aaronweeden commented May 22, 2024

Description

This PR changes the rest/warehouse/raw-data endpoint to respond with a JSON text sequence rather than one large JSON object. Each row of raw data in the response is now its own JSON array.

Motivation and Context

This is to prevent a bug in which, if the xdmod-data Python API was used to fetch a large number of rows (e.g., 5 months of jobs data), json.loads() would fail to decode the response text as JSON due to running out of memory. With the change in this PR, json.loads() can be called on just a single row of raw data at a time.

xdmod-data is updated to handle this change in ubccr/xdmod-data#19.

Tests performed

I updated my port on xdmod-dev with the changes from this PR and tested using the xdmod-data Python API with the changes from ubccr/xdmod-data#19 to fetch raw data.

Checklist:

  • The pull request description is suitable for a Changelog entry
  • The milestone is set correctly on the pull request
  • The appropriate labels have been added to the pull request

@aaronweeden aaronweeden added Category: Data Analytics Framework php Pull requests that update Php code labels May 22, 2024
@aaronweeden aaronweeden added this to the 11.0.0 milestone May 22, 2024
@aaronweeden aaronweeden marked this pull request as ready for review May 22, 2024 20:43
@aaronweeden aaronweeden merged commit 9204b7b into ubccr:xdmod11.0 May 30, 2024
4 checks passed
@aaronweeden aaronweeden deleted the raw-data-json-seq branch May 30, 2024 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Data Analytics Framework php Pull requests that update Php code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants