EnxDev commented on code in PR #45342:
URL: https://github.com/apache/superset/pull/45342#discussion_r4296182508
##########
superset/commands/dataset/create.py:
##########
@@ -225,6 +226,12 @@ def validate(self) -> None: # noqa: C901
sql=sql,
catalog=catalog,
schema=schema,
+ # Jinja-templated SQL only reveals the tables it reads
+ # once rendered with the params the dataset is saved with.
+ template_params=template_params_for_access_check(
Review Comment:
One follow-up in d47e3c9259. Column sync (`get_virtual_table_metadata`)
renders the SQL with `process_template(sql, **template_params_dict)`, which
does expose `removed_filters` as a variable. With the check stripping the
names, sync could run the branch the check skipped. It only reads column
descriptions, but it still sends that SQL to the warehouse. Sync now drops the
same names, and so does create's schema derivation, so the check, chart
execution, sync and derivation all render the same SQL. Added a test for the
sync path.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]