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

Disallow NULL/None for implied dimension values in data IDs

    XMLWordPrintable

    Details

      Description

      The Gen3 Registry's implied dimension dependencies (e.g. visit.physical_filter, exposure.visit) are allowed to be None, which translates nicely to NULL in SQL.  Unfortunately SQL NULLs and Python Nones compare differently, and we want the latter behavior in SQL queries.  That means we need to either

      • add special NULL-handling logic to the query-generation code
      • do our own mapping from Python None to sentinal values in all fetch/insert code
      • drop support for None/NULL in implied dimensions and make the associated foreign key columns in the database NOT NULL to support this.

        Attachments

          Issue Links

            Activity

            jbosch Jim Bosch created issue -
            jbosch Jim Bosch made changes -
            Field Original Value New Value
            Epic Link DM-21254 [ 414685 ]
            jbosch Jim Bosch made changes -
            Link This issue relates to DM-21832 [ DM-21832 ]
            jbosch Jim Bosch made changes -
            Link This issue relates to DM-21836 [ DM-21836 ]
            jbosch Jim Bosch made changes -
            Labels gen3-middleware gen2-deprecation-blocker gen3-middleware
            yusra Yusra AlSayyad made changes -
            Epic Link DM-21254 [ 414685 ] DM-22586 [ 427653 ]
            yusra Yusra AlSayyad made changes -
            Epic Link DM-22586 [ 427653 ] DM-23737 [ 431393 ]
            yusra Yusra AlSayyad made changes -
            Epic Link DM-23737 [ 431393 ] DM-25268 [ 435627 ]
            yusra Yusra AlSayyad made changes -
            Epic Link DM-25268 [ 435627 ] DM-26786 [ 439736 ]
            yusra Yusra AlSayyad made changes -
            Epic Link DM-26786 [ 439736 ] DM-27956 [ 442730 ]
            yusra Yusra AlSayyad made changes -
            Epic Link DM-27956 [ 442730 ] DM-29149 [ 458506 ]
            jbosch Jim Bosch made changes -
            Status To Do [ 10001 ] In Progress [ 3 ]
            jbosch Jim Bosch made changes -
            Status In Progress [ 3 ] To Do [ 10001 ]
            yusra Yusra AlSayyad made changes -
            Epic Link DM-29149 [ 458506 ] DM-30468 [ 509193 ]
            jbosch Jim Bosch made changes -
            Summary Handle NULL values for optional implied dependencies in query logic Disallow NULL/None for implied dimension values in data IDs
            yusra Yusra AlSayyad made changes -
            Epic Link DM-30468 [ 509193 ] DM-30536 [ 511194 ]
            yusra Yusra AlSayyad made changes -
            Epic Link DM-30536 [ 511194 ] DM-30543 [ 511201 ]
            yusra Yusra AlSayyad made changes -
            Epic Link DM-30543 [ 511201 ] DM-30551 [ 511217 ]
            jbosch Jim Bosch made changes -
            Link This issue relates to DM-33942 [ DM-33942 ]
            jbosch Jim Bosch made changes -
            Urgent? off
            Description The Gen3 Registry's implied dimension dependencies (e.g. visit.physical_filter, exposure.visit) are allowed to be None, which translates nicely to NULL in SQL.  Unfortunately SQL NULLs and Python Nones compare differently, and we want the latter behavior in SQL queries.  That means we need to either add special NULL-handling logic to the query-generation code, or do our own mapping from Python None to sentinal values in all fetch/insert code.  Right now it feels like the former is cleaner, but I'm open to opinions. The Gen3 Registry's implied dimension dependencies (e.g. visit.physical_filter, exposure.visit) are allowed to be None, which translates nicely to NULL in SQL.  Unfortunately SQL NULLs and Python Nones compare differently, and we want the latter behavior in SQL queries.  That means we need to either
            - add special NULL-handling logic to the query-generation code
            - do our own mapping from Python None to sentinal values in all fetch/insert code
            - drop support for None/NULL in implied dimensions and make the associated foreign key columns in the database NOT NULL to support this.
            Labels gen2-deprecation-blocker gen3-middleware gen3-middleware gen3-registry-incompatibility
            jbosch Jim Bosch made changes -
            Status To Do [ 10001 ] In Progress [ 3 ]
            jbosch Jim Bosch made changes -
            Link This issue relates to DM-34616 [ DM-34616 ]
            yusra Yusra AlSayyad made changes -
            Epic Link DM-30551 [ 511217 ] DM-32153 [ 779823 ]
            yusra Yusra AlSayyad made changes -
            Epic Link DM-32153 [ 779823 ] DM-32161 [ 779857 ]
            yusra Yusra AlSayyad made changes -
            Epic Link DM-32161 [ 779857 ] DM-32168 [ 779882 ]

              People

              Assignee:
              jbosch Jim Bosch
              Reporter:
              jbosch Jim Bosch
              Watchers:
              Christopher Waters, Jim Bosch, John Parejko, Tim Jenness
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:

                  Jenkins

                  No builds found.