DiggidyDave edited a comment on issue #7422: Add "validation_only" queries to 
the backend
URL: 
https://github.com/apache/incubator-superset/pull/7422#issuecomment-488331948
 
 
   > it seemed like a lot of duplication of effort to pull over all the other 
conditional modifications we do on queries before executing them
   
   I don't think it is much more effort... you can still use all of that. I 
_think_ it would literally just become:
   
   ```
       @classmethod
       def make_validation_query(cls, sql):
           '''
           throws: Exception if no validator type is configured for engine
           '''
           return SQLValidator.get(cls.engine).validate(sql)
   ```
   
   And that type would just do the last bit of prep that the method currently 
does, for that impl. The main thing here is this would move it to a 
configuration option and provide abstractions for impls, rather than make it an 
intrinsic property of database types.
   
   Why am I pushing on this? LOL... I would love to see this be a feature that 
works well for all databases eventually, not just a patchwork or one-off if the 
customer has the right thing.  A consistent, delightful experience that isn't 
tied to the db in use, or at least leaving that possibility open.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to