betodealmeida commented on code in PR #20312:
URL: https://github.com/apache/superset/pull/20312#discussion_r948028138


##########
superset/datasets/api.py:
##########
@@ -769,9 +775,15 @@ def import_(self) -> Response:
             else None
         )
         overwrite = request.form.get("overwrite") == "true"
+        sync_columns = request.form.get("sync_columns") == "true"
+        sync_metrics = request.form.get("sync_metrics") == "true"
 
         command = ImportDatasetsCommand(
-            contents, passwords=passwords, overwrite=overwrite
+            contents,
+            passwords=passwords,
+            overwrite=overwrite,
+            sync_columns=sync_columns,
+            sync_metrics=sync_metrics,

Review Comment:
   Ah, that makes sense, it's for the v0 API! Yeah, in this case it should be 
fine... the v1 API will ignore these extra arguments, and should be fine.
   
   But then my next question is... any reason why you're still using the v0 
API, instead of enabling the `VERSIONED_EXPORT` feature flag? The v0 import 
IMHO is very buggy, the code is incomplete and non-standard across asset types, 
and we should deprecated it as soon as possible.



-- 
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]

Reply via email to