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

Remove aliases for NASIS columns, replace with physical column name #368

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

brownag
Copy link
Member

@brownag brownag commented Dec 10, 2024

Will close #242. Nearly time to rip off the band-aid. For now just a draft PR to facilitate testing.

This is a breaking change for many things that rely on soilDB to query NASIS. It can be difficult to explain to new soilDB users why some columns are aliased and others follow the data model. It will be good to rely on the defined physical column names and standard associated metadata for better parity with internal NASIS queries, web reports, and the official data model in general.

Removes the following aliases in use in fetchNASIS()- and fetchVegdata()-related functions.

Replacing with NASIS physical column name as follows:

  • site_id => usiteid
  • pedon_id => upedonid or assocuserpedonid (as needed)
  • describer => descname
  • vegplot_id => vegplotid
  • vegtransect_id => vegtransectid or vegtransectiid (as needed)
  • x_std => longstddecimaldegrees
  • y_std => latstddecimaldegrees
  • elev_field => elev
  • slope_field => slope
  • aspect_field => aspect
  • es_classifier => siteecositehistory.classifier (distinguished from classifier which is petaxhistory.classifier)
  • sand => sandtotest
  • silt => silttotest
  • clay => claytotest
  • genhz => dspcomplayerid

Aliases are still used for the foreign key columns that end in "ref" as many soilDB queries target multiple related tables, so it doesn't always make sense to include "ref" and users benefit from the shorter name e.g. peiid rather than peiidref

@dylanbeaudette
Copy link
Member

It is probably time. We should make sure that as many people as possible know about this as it is going to break a lot of code.

What is assocuserpedonid ?

@brownag
Copy link
Member Author

brownag commented Dec 11, 2024

What is assocuserpedonid ?

This is the "Associated User Pedon ID" in the Vegetation Plot table.

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

Successfully merging this pull request may close these issues.

ensure soilDB uses NASIS/SDA column names at all times
2 participants