Actions
task #8908
openClean up descriptive dataset data for Cactaceae
Start date:
Due date:
% Done:
0%
Estimated time:
Severity:
normal
Description
Thinks to do:
remove empty DescriptionElementBaseremove aggregated taxon descriptionsremove cloned specimen descriptions (first remove them from descriptive dataset, then delete from specimen)update specimen description titleCachesremove empty taxon descriptionsrerun aggregation- run key creation
Maybe also:
- remove DnaSamples from taxon descriptions
- split ABCD import descriptions from default descriptions
- remove determinations from DnaSamples if higher level determination exists
- fix unlabeled field units
- clean up additivity_ontology DB
Helpful SQLs:
SELECT
-- deb.id
db.DTYPE, db.types, db.id dbId, deb.DTYPE, deb.id, f.titleCache feature, sd.id sdId, smv.id smvId, smv.value smValue,
-- mu.titleCache unit, deb.unit_id,
sob.id sobId, sob.titleCache specimen, f.id featureId,
deb.*
FROM DescriptionElementBase deb
INNER JOIN DescriptionBase db ON db.id = deb.indescription_id
LEFT JOIN SpecimenOrObservationBase sob ON sob.id = db.specimen_id
LEFT JOIN DefinedTermBase f ON f.id = deb.feature_id
LEFT JOIN StatisticalMeasurementValue smv ON smv.quantitativedata_id = deb.id
LEFT JOIN StateData sd ON sd.categoricaldata_id = deb.id
LEFT OUTER JOIN DefinedTermBase_MeasurementUnit MN ON MN.feature_id = f.id
LEFT OUTER JOIN DefinedTermBase mu ON mu.id = MN.recommendedmeasurementunits_id
WHERE (deb.DTYPE = 'CategoricalData' OR deb.DTYPE = 'QuantitativeData') AND db.types LIKE '%#CLO#%'
-- AND db.DTYPE = 'SpecimenDescription'
-- AND sd.id IS NULL AND smv.id IS NULL
ORDER BY sob.id, db.id, mu.id, f.id
SELECT *
FROM DescriptionElementBase
WHERE id IN (xx)
SELECT osb.id sourceId, link.id linkId, link.description_id linkedDescription, db.id dbId, db.titleCache, db.DTYPE, db.taxon_id,
tn.titleCache, osb.*
FROM CdmLink link
INNER JOIN OriginalSourceBase osb ON osb.cdmSource_id = link.id
INNER JOIN DescriptionBase_OriginalSourceBase MN ON MN.sources_id = osb.id
INNER JOIN DescriptionBase db ON db.id = MN.DescriptionBase_id
INNER JOIN TaxonBase tb ON tb.id = db.taxon_id
INNER JOIN TaxonName tn ON tn.id = tb.name_id
WHERE link.description_id IS NOT NULL
ORDER BY tb.titleCache, db.taxon_id, db.id
DELETE
FROM DescriptiveDataSet_DescriptionBase
-- INNER JOIN DescriptionBase db ON db.id = MN.descriptions_id
WHERE descriptions_id IN (SELECT id FROM DescriptionBase db WHERE db.types LIKE '%#CLO#%')
UPDATE DescriptionBase
SET titleCache = Replace(titleCache, ' Neues Descriptive Data Set:', ' Korotkova Cactaceae Morphology:')
WHERE DTYPE LIKE 'Specimen%' AND id IN (SELECT MN.descriptions_id FROM DescriptiveDataSet_DescriptionBase MN);
Updated by Andreas Müller about 4 years ago
- Target version changed from Release 5.14 to Release 5.15
Updated by Andreas Müller almost 4 years ago
- Target version changed from Release 5.15 to Release 5.18
Updated by Andreas Müller over 3 years ago
- Target version changed from Release 5.18 to Release 5.19
Updated by Andreas Müller about 3 years ago
- Target version changed from Release 5.19 to Release 5.21
Updated by Andreas Müller about 3 years ago
- Target version changed from Release 5.21 to Release 5.22
Updated by Andreas Müller about 3 years ago
- Target version changed from Release 5.22 to Release 5.46
Actions