Assimila / DQTools

Tools for working with the DataCube. Includes reading metadata, registering new products and writing new data to the Datacube
0 stars 0 forks source link

Unable to put new data following registration #22

Closed purplecat7 closed 2 years ago

purplecat7 commented 2 years ago

Using the Register class, a user may get new details of product/sub-product/tiles in the datacube but then it is not possible to use Dataset.put() to write the initial data. This is because Dataset.init() retrieves metadata including 'gold' which put() then requires. It is not present for an empty sub-product.

purplecat7 commented 2 years ago

Tracing this down, the Dataset.init() eventually calls Connect.get_subproduct_meta() which calls DQManager._get_subproduct_metadata_for_dqtools(). This in turn ends up in DBView._get_metadata_dict_for_dqtools() where the queries get relfilebanddate.gold (a Boolean) and other things a newly registered product just won't have. 'last_gold' is calculated by sorting the relfilebanddate.datetimes and finding the last to indicate the 'gold'==TRUE. Again, there will be none available.

purplecat7 commented 2 years ago

Need to update user documentation.

purplecat7 commented 2 years ago

See both 02_Datacube(DQTools)_User_Guide_1.3A 04_How to add a new product to the data cube using DQTools_0.1B