Closed dwaring87 closed 3 years ago
After looking into this some more, it looks like the materialized_phenotype_jsonb_table
does not get properly refreshed after adding trait data to a trial.
The materialized_phenotype_jsonb_table
only gets refreshed when the refresh_matviews
function/script gets called with the phenotypes
option. Currently, the only time the script is used with this option is in the BrAPI v2 store observations function.
Expected Behavior
Example of the problem:
From the trial detail page of a trial with 5 traits sampled:
Possible Reason Why:
The
materialized_phenoview
table correctly has the data summarized.Example of a single plot from a problematic trial -
materialized_phenoview
withphenotype
joined (includes all 5 traits):Example of the same trial and plot from
materialized_phenotype_jsonb_table
:Note that the
observations
JSON only includes 2 traits:Temporary Workaround
Manually forcing the CXGN::Phenotypes::PhenotypeMatrix class to use
Native
search type instead ofMaterializedViewTable
fixes the problem of missing data.For Bugs:
Environment
Steps to Reproduce