-
Notifications
You must be signed in to change notification settings - Fork 11
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
Fixing value name. Adding updates #335
Conversation
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.
Left a comment about the column name.
Aside from that, I would prefer to put the UPDATE
query before the SELECT
one. We prefer clients to use UPDATE
(less hits to the DO database) so let's make it more visible if you agree.
catalog/templates/column.html
Outdated
@@ -192,16 +277,36 @@ | |||
"normalization": "predenominated"}]' | |||
, 1, 1) meta | |||
FROM data) | |||
SELECT id, (data->0->>'value')::{{ col.type }} as per_sq_km | |||
SELECT id, (data->0->>'value')::{{ col.type }} as raw_count |
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.
Uhm, I'm not sure if it's available in the RSTs, but the optimal solution would be to use the same column name we autogenerate for Builder, i.e: the suggested_name
column of the GetMeta result.
If not, we can probably add it to the query to generate rsts, or replicate this logic in python:
https://github.com/CartoDB/observatory-extension/blob/develop/src/pg/sql/41_observatory_augmentation.sql#L249-L257
Putting the |
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.
Code looks nice, let's see how it works!
For reference, this is how this looks: Some questions/suggestions:
|
Answering your suggestions:
|
Fixing value name (
per_sq_km
)Adding
UPDATE
queriesCloses #310