pacificclimate / modelmeta

An ORM representation of the model metadata database
GNU General Public License v3.0
1 stars 0 forks source link

Create generate_manifest script and python module #100

Closed eyvorchuk closed 4 years ago

eyvorchuk commented 4 years ago

This PR is for issue 96, which is to generate a manifest of files that were indexed after a specific date in a list of ensembles from a given database. This was tested using the DSN postgresql://db3.pcic.uvic.ca/ce_meta. I wanted to check if I'm filtering the ensembles correctly since running

session.query(DataFile.filename).filter(Ensemble.name == ensemble).all()

returns the same output no matter what ensemble is (as long as it is a possible ensemble name). I was also wondering what additional functionality the script should have.

jameshiebert commented 4 years ago

returns the same output no matter what ensemble is

Good catch! No, your query will need to join through the data_file_variables and ensemble_data_file_variables tables (which, I believe are the DataFileVariable and EnsembleDataFileVariable classes, respectively).

jameshiebert commented 4 years ago

Looks great! Many thanks!