Alteryx Designer Desktop Knowledge Base

Definitive answers from Designer Desktop experts.

Error running query in Databricks: org.apache.spark.sql.catalyst.parser.ParseException: mismatched input '-' expecting <EOF>

HenrietteH
Alteryx
Alteryx
Created

Environment Details


  • Alteryx Designer
    • All versions
  • Databricks

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"}]}')



    Cause


    There is an invalid character in the table name.

    Resolution


    Remove the invalid character from the table name. In the example above, the character to remove is '-'.
    Rerun the workflow. 
    Comments
    ASloan
    5 - Atom

    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?

    rag-ryx
    9 - Comet

    @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