nytai commented on code in PR #21065:
URL: https://github.com/apache/superset/pull/21065#discussion_r947347497


##########
superset/views/database/forms.py:
##########
@@ -39,6 +40,12 @@
 )
 from superset.models.core import Database
 
+
+class DatabasesNotAllowedToFileUpload(str, Enum):
+    GSHEETS = "gsheets"
+    CLICKHOUSE = "clickhousedb"

Review Comment:
   @Antonio-RiveroMartnez Thanks for making that change, multiple places in the 
frontend where you're checking 
   `db?.engine !== Engines.GSheet && db?.engine !== Engines.ClickHouse`. This 
makes adding a new engine that does not support file upload a pain, since you 
have to update a bunch of files across both backend and frontend code. Ideally 
one could just specify in the db_engine_spec  `allows_file_upload=False` and 
that's it. So maybe adding a new api that you could call from the db modal to 
check is a supplied connection string or config supports file uploads would be 
a better approach? 



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