timifasubaa commented on a change in pull request #5303: [csv-hive] Use schema
form field in upload csv
URL:
https://github.com/apache/incubator-superset/pull/5303#discussion_r199570414
##########
File path: superset/db_engine_specs.py
##########
@@ -984,14 +984,22 @@ def convert_to_hive_type(col_type):
return tableschema_to_hive_types.get(col_type, 'STRING')
table_name = form.name.data
+ schema_name = form.schema.data
+
+ if '.' in table_name and schema_name:
+ raise Exception(
+ "You can't specify a namespace both in the name of the table "
+ 'and in the schema field. Please remove one')
if config.get('UPLOADED_CSV_HIVE_NAMESPACE'):
- if '.' in table_name:
+ if '.' in table_name or schema_name:
Review comment:
Because there are two ways to specify the namespace, we need to check if
either method was used before loading the table.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]