-
-
Notifications
You must be signed in to change notification settings - Fork 229
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
feat: index chart entities into charts_x_entities
table
#3418
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @marcelgerber and the rest of your teammates on Graphite |
charts_x_entities
table
22cb557
to
2d899e8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Could you add a DbPlainChartXEntity type for completeness and add a similar type in the ETL (or ask Mojmir to do it) and add it to datasette so it will be exported?
Relevant ETL place: https://github.com/owid/etl/blob/master/etl/grapher_model.py
And datasette: https://github.com/owid/analytics/blob/e028289496b31f708fbd65cbae1bfa9b5f68d27d/snail/sqlite_from_mysql.py#L102-L129
9fa5f53
to
75f90b7
Compare
Implements #3401.
Currently, this is just a batch script that will update all charts.
But it is written in such a way that it will be easy to hook into it in the future, and we could call
obtainAvailableEntitiesForGrapherConfig
in a server-sideonSave
handler, and updatecharts_x_entities
for that chart only.Ready for review already, but some TODOs still:
obtainEntityNameToIdMap
into anEntity.ts
model file? We'll probably need the inverse, too...=== "main"
checkOn my local machine, running the script takes 7.5 minutes.
The resulting table has 625,676 rows.