glamod / glamod-ingest

Database preparation and ingestion for GLAMOD
BSD 2-Clause "Simplified" License
2 stars 1 forks source link

Collect up tasks for Dave #43

Open agstephens opened 3 years ago

agstephens commented 3 years ago
  1. Review the trigger code (currently commented out):

See: #29

  1. Add cluster (sort) ability to playbook:

See: #34

david-i-berry commented 3 years ago

Hi Ag, I'm struggling with the best way to document the triggers (and the database build scripts in general). Any pointers would be welcomed.

david-i-berry commented 3 years ago

I've updated the readme and re-organised the code / scripts (including renaming to be more obvious). See https://github.com/glamod/glamod_database.

agstephens commented 3 years ago

Hi @DavidBerryNOC, I didn't know you would look at that. Sorry, I am working off here, which is significantly different already:

https://github.com/glamod/glamod_database/tree/refactor/use-default-schema

We are using that branch for our production build.

I suspect we can bring the changes together.

agstephens commented 3 years ago

@DavidBerryNOC coming back to your question about documenting the triggers. I think we just need a description of the required components:

It can just be in a README file, so that I can follow it.

david-i-berry commented 3 years ago

I've edited the readme under the original. I think this is what you are after.

I've only had a brief look at the refactored code, I think you should be able to copy the functions and triggers directories from the old to the new without issues (I've changed cdm_v1 to __INSERT_SCHEMA__ throughout. I've also edited the make_database.sql to call the correct files.