etr2460 commented on a change in pull request #9734:
URL: 
https://github.com/apache/incubator-superset/pull/9734#discussion_r426987520



##########
File path: superset/config.py
##########
@@ -586,11 +586,24 @@ class CeleryConfig:  # pylint: 
disable=too-few-public-methods
 # The directory within the bucket specified above that will
 # contain all the external tables
 CSV_TO_HIVE_UPLOAD_DIRECTORY = "EXTERNAL_HIVE_TABLES/"
+# Function that creates upload directory dynamically based on the
+# database used, user and schema provided.
+CSV_TO_HIVE_UPLOAD_DIRECTORY_FUNC: Callable[
+    ["Database", "models.User", str], Optional[str]
+] = lambda database, user, schema: CSV_TO_HIVE_UPLOAD_DIRECTORY
 
 # The namespace within hive where the tables created from
 # uploading CSVs will be stored.
+# Make it a func, e.g. /hive/warehouse/<dbname>.db/<tablename>
 UPLOADED_CSV_HIVE_NAMESPACE = None
 
+# database
+ALLOWED_USER_CSV_SCHEMA_FUNC: Callable[
+    ["Database", "models.User"], List[str]
+] = lambda database, user: [
+    UPLOADED_CSV_HIVE_NAMESPACE  # type: ignore

Review comment:
       really? even if you type `UPLOADED_CSV_HIVE_NAMESPACE: 
Optional[List[str]] = None`?




----------------------------------------------------------------
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:
us...@infra.apache.org



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

Reply via email to