You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "craig-rueda (via GitHub)" <gi...@apache.org> on 2023/05/03 21:11:00 UTC

[GitHub] [superset] craig-rueda commented on a diff in pull request #23925: fix(migration): add log for values unseen in `Slice.datasource_type`

craig-rueda commented on code in PR #23925:
URL: https://github.com/apache/superset/pull/23925#discussion_r1184288057


##########
superset/migrations/versions/2023-03-27_12-30_7e67aecbf3f1_chart_ds_constraint.py:
##########
@@ -63,9 +63,15 @@ def upgrade():
     session = db.Session(bind=bind)
 
     with op.batch_alter_table("slices") as batch_op:
-        for slc in session.query(Slice).filter(Slice.datasource_type == "query").all():
-            upgrade_slc(slc)
-            session.add(slc)
+        for slc in session.query(Slice).filter(Slice.datasource_type != "table").all():
+            if slc.datasource_type == "query":
+                upgrade_slc(slc)
+                session.add(slc)
+
+            else:
+                print(

Review Comment:
   Can we use a logger here? Print is a little nasty for aggregators like Datadog :P



-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org