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

Update Butler makeView to use DDLEvents

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      Currently daf.butler.core.views.makeView uses .execute_at('after-create', metadata) (and 'before-drop') to trigger view creation (e.g. execute CREATE VIEW statements).
      Unfortunately this is deprecated and spits out warnings.
      Update to use: DLLEvents (http://docs.sqlalchemy.org/en/latest/core/events.html#sqlalchemy.events.DDLEvents) instead.

        Attachments

          Issue Links

            Activity

            Hide
            pschella Pim Schellart [X] (Inactive) added a comment -

            This turned out to be easier than expected. Unfortunately there seems to be no reliable way to trigger after all tables have been created. So instead I trigger on all table creations. But fortunately (the previously incorrectly assumed to be broken) sqlite support for CREATE VIEW IF NOT EXISTS comes to the rescue.

            Show
            pschella Pim Schellart [X] (Inactive) added a comment - This turned out to be easier than expected. Unfortunately there seems to be no reliable way to trigger after all tables have been created. So instead I trigger on all table creations. But fortunately (the previously incorrectly assumed to be broken) sqlite support for CREATE VIEW IF NOT EXISTS comes to the rescue.
            Hide
            jbosch Jim Bosch added a comment -

            One comment on PR.

            Show
            jbosch Jim Bosch added a comment - One comment on PR.
            Hide
            pschella Pim Schellart [X] (Inactive) added a comment -

            Merged. Punted on tricky triggering work, pushed to DM-14831.

            Show
            pschella Pim Schellart [X] (Inactive) added a comment - Merged. Punted on tricky triggering work, pushed to DM-14831 .

              People

              Assignee:
              pschella Pim Schellart [X] (Inactive)
              Reporter:
              pschella Pim Schellart [X] (Inactive)
              Reviewers:
              Jim Bosch
              Watchers:
              Jim Bosch, Pim Schellart [X] (Inactive), Tim Jenness
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Jenkins

                  No builds found.