usc-isi-i2 / datamart-api

MIT License
1 stars 2 forks source link

Update sql backend to support user defined key-value metadata for variables #61

Open kyao opened 4 years ago

kyao commented 4 years ago

Update sql backend to support tag metadata for variables.

See issue #60 for context.

Add support for new tag property P2010050001 with type string. A variable can have multiple tags

For example, the variable a_variable below has three tags:

e1 a_variable P2010050001 "FactorClass:EconomicAgricuturalCapability"
e2 a_variable P2010050001 "Relevance:1"
e3 a_variable P2010050001 "Normalizer:Longitudinal"

Support query for tags based on exact string match

kyao commented 4 years ago

Here is a tag test dataset: kgtk edges and annotated Excel file

test-tag-edges.zip

test_tag.xlsx

zmbq commented 4 years ago

Updated in the itay/tags branch. Variable metadata now contains an additional tag field with the tags (it's singular, since qualifier is also singular). Fuzzy search supports a tag query argument. Multiple arguments are ORed.

saggu commented 4 years ago

Tested the variable metadata and get data api. Merged itay/tags into development

saggu commented 4 years ago

Update:

  1. The database should have the backup restored from this file https://drive.google.com/file/d/1U_9ta0jo1yyuj8pAvY14Ybk5wLFhEpiG/view?usp=sharing
  2. Created the tags for all 74 variables (see attached file, import into database and then refresh search views)
  3. Get metadata and Get data API is working.
  4. Have not tested search metadata API. This is for @zmbq to implement and test

causx_tags_metadata_id_exploded.tsv.zip

checked into development

saggu commented 4 years ago

database containing the above information - https://drive.google.com/file/d/1buKO4UghTGOY_gVnPeW8rW-t4yKnSWiq/view?usp=sharing