1

Topic: Expanding taxonomic hierachy in a batch update

I am currently attempting to modify the batch update JNCCDes2AssignTaxonsToDesignationRuck.xml so that in addition to assigning the selected designation to all items in the rucksack, it also assigns it to all sub-taxa (child taxa, subspecies etc.).

I know that this must use the organism table, but at the moment I am having trouble working out the syntax.

I have got the code to extract the Taxon List Item Keys from the Rucksack into a temporary table, now presumably I need to convert these into Taxon Version Keys, to link to the Organism table, then link this to another copy of the organism table (Organism key to parent key) and loop though this process to pick up all the subtaxa, converting them back to TLIKs and inserting them into the Temp table as I go.

I have looked at this a few times, based on a much simpler structure I use to select sub-sites of locations (copied from one of Mike's reports), but so far I just can't seem to get it right.

Any help would be gratefully recieved.

Rob Large
Wildlife Sites Officer
Wiltshire & Swindon Biological Records Centre

2

Re: Expanding taxonomic hierachy in a batch update

Hi Rob

If you assign the designations to the parent taxa and then rebuild the Index Taxon Designation (ITD) table won't the designations then appear in any queries on the sub-taxa automatically (if the query uses the ITD table)?

I think this is what happens with the national/international designations, e.g. Whales and Dolphins are listed on the WACA sch 9 sect 9 at the Order level only but that designation appears when you query any of the family/genus/species below.  Is that what you need?

Andy

Andy Foy
Systems Manager
Greenspace Information for Greater London (GiGL) CIC
www.gigl.org.uk

3

Re: Expanding taxonomic hierachy in a batch update

An interesting notion Andy and one I hadn't considered. However the reason behind this question is that we carry out planning screening via an external system which identifies important species records using the taxon designation table (employing some locally defined designations and designations sets, but not the index). This system was developed by a former volunteer who is no longer as accessible as he once was and I am trying to avoid having to modify his code too much (or at all if I can help it) since it is very well written, but hugely complex & I don't have the time to track down all the ramifications of a substantial change.

I have just had a quick look and I am not even sure you are right. There is a stored procedure in the database called usp_Index_Taxon_Designation_Rebuild, which I have been assuming is the mechanism by which the index is rebuilt. This does not appear to make any reference to the taxonomic hierarchy. Of course it is possible that there is another mechanism I haven't found yet. I will investigate further if I get a chance.

Rob Large
Wildlife Sites Officer
Wiltshire & Swindon Biological Records Centre

4 (edited by RobLarge 28-11-2013 13:56:19)

Re: Expanding taxonomic hierachy in a batch update

No you are correct, index_taxon_designation does contain all the subtaxa. Glad that got cleared up and also indirectly supplied the solution to my problem.

Since I don't want to rework the planing screen software I still need to get he batch update to work, but the solution is simple. The solution lies within Index_taxon_group.

Thanks Andy

Rob Large
Wildlife Sites Officer
Wiltshire & Swindon Biological Records Centre

5

Re: Expanding taxonomic hierachy in a batch update

Thanks again for that Andy

I did in the end go through & revise the planning screen stuff. It was a lot easier than I thought it would be.

Rob Large
Wildlife Sites Officer
Wiltshire & Swindon Biological Records Centre