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
"attributes": New generic table for misc. information polymorphic relations #505
Comments
From meeting today, it sounds like Option 3 is preferred:
unique type, type_id Here is a description of the json data type https://www.postgresql.org/docs/9.3/static/datatype-json.html and a list of json operations: https://www.postgresql.org/docs/9.3/static/functions-json.html in the postgres documentation. |
@robkooper I am not sure how to identify a site that is available in Clowder ... see e.g. https://terra-mepp.illinois.edu/bety/dbfiles?utf8=%E2%9C%93&DataTables_Table_0_length=25&search=energy+farm&direction=&sort=
New database will be called attributes Make sure to use something following like this to upsert into the database:
|
Table will be called attributes |
A possible application for loading raster formats, per request of @serbinsh:
(This is very pseudo-code-y, but hopefully you get the idea?) |
For reference, here's a nice SO answer explaining how to update PostgreSQL JSON records (PostgreSQL version >= 9.5): https://stackoverflow.com/a/35349699/2477097 In a nutshell, use UPDATE attributes SET value = jsonb_set(value, '{tag}', '5') WHERE ... |
Add a new table that allows for attributes in json form #505
Table name:
miscelaneyiisplease propose ...Use cases:
Implementation (Option 3)
Fields
unique type, type_id
Plus standard ruby stuff
Other options originally considered
Option 1
Four fields:
unique type, type_id, key
Option 2
unique type, type_id, key
Option 2.1
Option 3
unique type, type_id
Plus standard ruby stuff
The text was updated successfully, but these errors were encountered: