villebro commented on a change in pull request #8867: Make schema name for the
CTA queries and limit configurable
URL:
https://github.com/apache/incubator-superset/pull/8867#discussion_r384755271
##########
File path: superset/views/core.py
##########
@@ -243,6 +244,17 @@ def _deserialize_results_payload(
return json.loads(payload) # type: ignore
+def get_cta_schema_name(
+ database: Database, user: ab_models.User, schema: str, sql: str
+) -> Optional[str]:
+ func = config.get(
+ "SQLLAB_CTA_SCHEMA_NAME_FUNC"
+ ) # type: Optional[Callable[[Database, ab_models.User, str, str], str]]
Review comment:
Same as above. Also, we prefer using square brackets when reading configs,
i.e. `config["SQLLAB_CTA_SCHEMA_NAME_FUNC"]` to avoid having to check for
`None` (doesn't really apply in this case, but it's a convention nonetheless).
----------------------------------------------------------------
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]