Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-27374

Add ingest time support to queryDatasets

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: daf_butler
    • Labels:
      None
    • Story Points:
      2
    • Team:
      Data Access and Database
    • Urgent?:
      No

      Description

      In DM-25180 we added ingest time to the datasets table. Now we need to be able to include the ingest time in a queryDatasets call to allow a query to retrieve all the files ingested between two dates. This will allow OODS to be able to clear out old files without having to know about datastore implementations.

        Attachments

          Issue Links

            Activity

            Hide
            jbosch Jim Bosch added a comment -

            For some other query expressions involving datasets (e.g. the timespan associated with a dataset in a CALIBRATION collection), I was planning to use the dataset type name as a table-like identifier, and map that in ClauseVisitor to the subquery that searches for that dataset type in the given sequence of collections.  So I think that's a good choice if we did want to allow ingest time filtering on just some dataset types.  I don't know how much it informs what we should do if we always want to do this filtering on all dataset types, which is what I think is more likely for OODS.

             

            Show
            jbosch Jim Bosch added a comment - For some other query expressions involving datasets (e.g. the timespan associated with a dataset in a CALIBRATION collection), I was planning to use the dataset type name as a table-like identifier, and map that in ClauseVisitor to the subquery that searches for that dataset type in the given sequence of collections.  So I think that's a good choice if we did want to allow ingest time filtering on just some dataset types.  I don't know how much it informs what we should do if we always want to do this filtering on all dataset types, which is what I think is more likely for OODS.  
            Hide
            tjenness Tim Jenness added a comment -

            I imagine OODS doesn't care about datasetType and just wants where ingest_date < 'some_date'. I could definitely though envisage being able to purge by dataset type so that you can delete all the PVIs ingested before a date. Steve Pietrowicz can confirm about the need for datasetType for OODS though.

            Show
            tjenness Tim Jenness added a comment - I imagine OODS doesn't care about datasetType and just wants where ingest_date < 'some_date' . I could definitely though envisage being able to purge by dataset type so that you can delete all the PVIs ingested before a date. Steve Pietrowicz can confirm about the need for datasetType for OODS though.
            Hide
            salnikov Andy Salnikov added a comment -

            I think this is ready for review. Implementation is not too terrible but it has some dialect-specific code. I tested it with both SQLite and PostgreSQL, seems to be working OK.

            Show
            salnikov Andy Salnikov added a comment - I think this is ready for review. Implementation is not too terrible but it has some dialect-specific code. I tested it with both SQLite and PostgreSQL, seems to be working OK.
            Hide
            jbosch Jim Bosch added a comment -

            A few minor comments on the PR.

            Show
            jbosch Jim Bosch added a comment - A few minor comments on the PR.
            Hide
            salnikov Andy Salnikov added a comment -

            Thanks for review and suggestions, unit test moved, merged.

            Show
            salnikov Andy Salnikov added a comment - Thanks for review and suggestions, unit test moved, merged.

              People

              Assignee:
              salnikov Andy Salnikov
              Reporter:
              tjenness Tim Jenness
              Reviewers:
              Jim Bosch
              Watchers:
              Andy Salnikov, Jim Bosch, Steve Pietrowicz, Tim Jenness
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Jenkins

                  No builds found.