04-17-2020 10:50 AM - edited 07-21-2021 01:37 PM
User encounters an error creating a table in Databricks due to an invalid character:
Data Stream In (6) Executing PreSQL: "CREATE TABLE table-name¶ROW FORMAT SERDE¶'org.apache.hadoop.hive.serde2.avro.AvroSerDe'¶STORED AS INPUTFORMAT¶'org.apache.had..." : [Simba][Hardy] (80) Syntax or semantic analysis error thrown in server while executing query. Error message from server: Error running query: org.apache.spark.sql.catalyst.parser.ParseException: ¶mismatched input '-' expecting <EOF>(line 1, pos 18)¶¶== SQL ==¶CREATE TABLE table-name¶------------------^^^¶ROW FORMAT SERDE¶'org.apache.hadoop.hive.serde2.avro.AvroSerDe'¶STORED AS INPUTFORMAT¶'org.apache.hadoop.hive.ql.io.avro.AvroContainerInputFormat'¶OUTPUTFORMAT¶'org.apache.hadoop.hive.ql.io.avro.AvroContainerOutputFormat'¶TBLPROPERTIES (¶'avro.schema.literal'= '{ "type": "record", "name": "Alteryx", "fields": [{ "type": ["null", "string"], "name": "field1"},{ "type": ["null", "string"], "name": "field2"},{ "type": ["null", "string"], "name": "field3"}]}')
I have a table in Databricks called. XX_XXX_header - to Databricks this is NOT an invalid character, but in the workflow it is an invalid character. Is there a way to have an underscore be a valid character?
@ASloan - You should be able to create a table in Databricks (through Alteryx) with (_) in the table name (I have done that). Guessing the error might be related to something else.
If you can post your error message/workflow, might be able to help.
Best,
Raghav