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
Mention Haskell client library #245
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Create new tables with JSONB columns to store statistics. One table each for user, artist, release and recordings. All these tables are inside a new schema `statistics` Also minor changes in `db/testing.py` to bring the SQL there out of the code and into the `admin/sql` directory.
First drop schemas with cascade and then drop the rest of the tables
Also, some refactoring to make the `update_last_login` function use PostgreSQL's NOW() method, considering we never change the `last_login` value to anything else.
First run an SQL query to update the last login value to unix epoch. Then call the function and assert that the value now is greater than 0.
LB-167: Create schema for storing statistics in PostgreSQL
The stats module is gonna be similar to the db module. All the queries we make to BigQuery should be contained here.
run_query takes a query and its parameters and then returns the results of the that query. get_top_tracks is an example query that gets the top tracks of the user over a particular interval of time.
Also, add a non-parametrized query for getting the sitewide total artist count to check if it works.
Add release_mbid and recording_mbid to docstrings
LB-176: Create a stats module and add functions to run queries on Google BigQuery
LB-187: Add NOT NULL constraint to the last_login field
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.