Skip to content
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

minMaxHeightOfMeasure validation #129

Open
illume opened this issue Dec 9, 2022 · 1 comment
Open

minMaxHeightOfMeasure validation #129

illume opened this issue Dec 9, 2022 · 1 comment

Comments

@illume
Copy link
Collaborator

illume commented Dec 9, 2022

See "instructions for writing a validation function". Below are notes from the spec.

minMaxHeightOfMeasure  Min & Max Height of Measurement (HOM) NEW ADDITION   Makes sure HOM is within range for a given site. Must be greater than 0. Usually HOM is at “breast height” approximately 1.3m.

Note, this is a new validation without an existing validation function.

@siddheshraze
Copy link
Collaborator

Here is an updated procedure to run this and mark its errors in the CMVErrors table! Function's been reviewed with GPT so it should work as intended, but full testing is still pending:

create
    definer = azureroot@`%` procedure ValidateHOMUpperAndLowerBounds(IN minHOM decimal(10, 2), IN maxHOM decimal(10, 2))
BEGIN
    INSERT INTO forestgeo_bci.cmverrors (CoreMeasurementID, ValidationErrorID)
    SELECT
        CoreMeasurementID,
        3 AS ValidationErrorID
    FROM
        forestgeo_bci.coremeasurements
    WHERE
        MeasuredHOM < minHOM OR MeasuredHOM > maxHOM;
END;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants