mistercrunch commented on a change in pull request #8867: [WIP] Customize
schema name for the CTA queries
URL:
https://github.com/apache/incubator-superset/pull/8867#discussion_r360617492
##########
File path: superset/views/core.py
##########
@@ -2591,6 +2600,15 @@ def sql_json_exec(
# Set tmp_table_name for CTA
if select_as_cta and mydb.force_ctas_schema:
tmp_table_name = f"{mydb.force_ctas_schema}.{tmp_table_name}"
+ elif select_as_cta:
+ dest_schema_name = get_cta_schema_name(
+ schema, sql, g.user.username if g.user else None
Review comment:
`g.user` will only be there if you're in sync mode (inside the scope of a
web request), won't work on Celery.
----------------------------------------------------------------
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]