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

Add ccdVisitId to CcdVisit schema

    XMLWordPrintable

    Details

    • Team:
      DM Science
    • Urgent?:
      No

      Description

      When I made the schema for CcdVisit, I forgot to do reset_index() before looking at the list of column names, so I missed ccdVisitId. This column is critical for joins with Source/ForcedSource.

      The Visit table will need a similar fix, but I'd like to defer that because 1) the visit column already contains the same information and 2) the table in qserv hasn't been updated yet, and won't be for a few days, so we would break TAP access by doing the fix before then.

       

       

        Attachments

          Activity

          Hide
          ctslater Colin Slater added a comment -

          Jenkins passed on main, running on v23. I can hold off on the backport until DM-34919 is resolved.

          Show
          ctslater Colin Slater added a comment - Jenkins passed on  main , running on v23 . I can hold off on the backport until DM-34919 is resolved.
          Hide
          yusra Yusra AlSayyad added a comment -

          I don't understand how you can ingest the visit table without a schema that matches... but sounds like you're getting to that.

          visitId is meant to be the primary key to join on the ccdVisit.visitId. The idea is that visitId is a key that has no meaning. visit is some human readable visit number or name. They're the same now. Will they always be? I don't know. But when you see visit vs visitId that's the intent. If you see "visit," pretend it says "visit name"

          Whenever you're ready (not necessarily on this ticket), you'll need to add a

          <snip> 
              def testCcdVisitSchemaMatch(self):
                  """Check CcdVisit Table"""
                  dataId = {"instrument": "LSSTCam-imSim"}
                  self._validateSchema("ccdVisitTable", dataId, "CcdVisit")
           
              def testVisitSchemaMatch(self):
                  """Check Visit Table"""
                  dataId = {"instrument": "LSSTCam-imSim"}
                  self._validateSchema("visitTable", dataId, "Visit")
          

          to test_schema.py in ci_imsim (and ci_hsc_gen3 please) with a "timestamp": "<M8[ns]" added to the typeMapping.

          Show
          yusra Yusra AlSayyad added a comment - I don't understand how you can ingest the visit table without a schema that matches... but sounds like you're getting to that. visitId is meant to be the primary key to join on the ccdVisit.visitId . The idea is that visitId is a key that has no meaning. visit is some human readable visit number or name. They're the same now. Will they always be? I don't know. But when you see visit vs visitId that's the intent. If you see "visit," pretend it says "visit name" Whenever you're ready (not necessarily on this ticket), you'll need to add a <snip> def testCcdVisitSchemaMatch(self): """Check CcdVisit Table""" dataId = {"instrument": "LSSTCam-imSim"} self._validateSchema("ccdVisitTable", dataId, "CcdVisit")   def testVisitSchemaMatch(self): """Check Visit Table""" dataId = {"instrument": "LSSTCam-imSim"} self._validateSchema("visitTable", dataId, "Visit") to test_schema.py in ci_imsim (and ci_hsc_gen3 please) with a "timestamp": "<M8 [ns] " added to the typeMapping .
          Hide
          ctslater Colin Slater added a comment -

          Thanks for the pointers on how to add this to ci_imsim; I filed DM-35184 for that. And I agree that visit and visitId are logically distinct, so we will get that updated.

          Show
          ctslater Colin Slater added a comment - Thanks for the pointers on how to add this to ci_imsim; I filed DM-35184 for that. And I agree that visit and visitId are logically distinct, so we will get that updated.

            People

            Assignee:
            ctslater Colin Slater
            Reporter:
            ctslater Colin Slater
            Reviewers:
            Yusra AlSayyad
            Watchers:
            Colin Slater, Yusra AlSayyad
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Jenkins

                No builds found.