betodealmeida commented on a change in pull request #15241:
URL: https://github.com/apache/superset/pull/15241#discussion_r654007140
##########
File path: superset/jinja_context.py
##########
@@ -551,3 +553,45 @@ def get_template_processor(
else:
template_processor = NoOpTemplateProcessor
return template_processor(database=database, table=table, query=query,
**kwargs)
+
+
+def dataset_macro(dataset_id: int) -> str:
+ """
+ Given a dataset ID, return the SQL that represents it.
+ """
+ from superset import db
+ from superset.connectors.sqla.models import SqlaTable
+
+ dataset = db.session.query(SqlaTable).filter_by(id=dataset_id).one()
+ columns = [column.column_name for column in dataset.columns]
+ query_obj = {
+ "apply_fetch_values_predicate": False,
+ "granularity": "order_date",
Review comment:
Need to remove this
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]