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

queryMetadata fails to look up bias keys when date is ambiguous

    Details

    • Type: Story
    • Status: To Do
    • Resolution: Unresolved
    • Fix Version/s: None
    • Component/s: butler
    • Labels:
      None
    • Templates:
    • Team:
      Data Access and Database

      Description

      I wanted to look up which rafts had available biases (actually I'd have preferred to look up all the fields – see DM-10632), so I tried butler.queryMetadata("bias", ['raft']) but it failed with this traceback. I'd have expected it to return all the distinct values that had one of the 239 valid dates. It'd be acceptable to return all 239 values without making them distinct.

      Note that bias is a calib dataset, it works if I use raw, but that's not useful.

      butler.queryMetadata("bias", ['raft'])
      Traceback (most recent call last):
        File "<stdin>", line 1, in <module>
        File "/ssd/lsstsw/stack/Linux64/daf_persistence/13.0-20-g8cd6840/python/lsst/daf/persistence/butler.py", line 1211, in queryMetadata
          tuples = repoData.repo.queryMetadata(datasetType, format, dataId)
        File "/ssd/lsstsw/stack/Linux64/daf_persistence/13.0-20-g8cd6840/python/lsst/daf/persistence/repository.py", line 259, in queryMetadata
          ret = self._mapper.queryMetadata(*args, **kwargs)
        File "/ssd/lsstsw/stack/Linux64/daf_persistence/13.0-20-g8cd6840/python/lsst/daf/persistence/mapper.py", line 127, in queryMetadata
          val = func(format, self.validate(dataId))
        File "/home/rlupton/LSST/obs/base/python/lsst/obs/base/cameraMapper.py", line 382, in queryClosure
          return mapping.lookup(format, dataId)
        File "/home/rlupton/LSST/obs/base/python/lsst/obs/base/mapping.py", line 409, in lookup
          (columns, dataId, len(lookups)))
      RuntimeError: No unique lookup for set([u'date']) from DataId(initialdata={}, tag=set([])): 239 matches
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              rhl Robert Lupton
              Watchers:
              John Swinbank, Merlin Fisher-Levine, Paul Price, Robert Lupton
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:

                Summary Panel