bkyryliuk commented on a change in pull request #9971:
URL: 
https://github.com/apache/incubator-superset/pull/9971#discussion_r434269467



##########
File path: superset/db_engine_specs/hive.py
##########
@@ -163,10 +163,11 @@ def convert_to_hive_type(col_type: str) -> str:
             bucket_path,
             os.path.join(upload_prefix, table.table, 
os.path.basename(filename)),
         )
-        # TODO(bkyryliuk): support other delimiters
+
         sql = f"""CREATE TABLE {str(table)} ( {schema_definition} )
-            ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' STORED AS
-            TEXTFILE LOCATION '{location}'
+            ROW FORMAT SERDE 
'org.apache.hadoop.hive.contrib.serde2.MultiDelimitSerDe'
+            WITH SERDEPROPERTIES ("field.delim"="{csv_to_df_kwargs['sep']}")

Review comment:
       good point, I would suggest to use params for this one: 
https://docs.sqlalchemy.org/en/13/core/connections.html#sqlalchemy.engine.Engine.execute




----------------------------------------------------------------
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to