mistercrunch commented on a change in pull request #6484: Hook for auditing
queries
URL:
https://github.com/apache/incubator-superset/pull/6484#discussion_r239699423
##########
File path: superset/models/core.py
##########
@@ -809,12 +810,29 @@ def needs_conversion(df_series):
return True
return False
+ username = utils.get_username()
Review comment:
(optional): was trying to think of a way to duplicate less lines of code,
maybe an inline function definition above the with block:
```python
def _log_query(sql):
if log_query:
log_query(
engine.url,
sql,
schema,
username,
'superset.models.core',
)
```
then the 2 calls in the with block would be one-liners
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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]