Question:
Is it possible to create a Okera table if the column names have dashes? I get the following error by not escaping the dashes:
Could not execute ddl: Could not execute ddl.\nDetail: AnalysisException: Syntax error in line 3:\nfirst-name STRING, \n^\nEncountered: FIRST\nExpected: IDENTIFIER\n\nCAUSED BY: Exception: Syntax error\n
When I escape the dashes, the error changes to:
Could not execute ddl: Could not execute ddl.\nDetail: AnalysisException: Invalid column/field name: first-name\n
Answer:
Okera follows the ANSI SQL-92 standard. This standard defines the rules for all names used in SQL statements including table-name, column-name, view-name, synonym-name, constraint-name, correlation-name, index-name, trigger-name, function-name and procedure-name.
- Can contain only unicode letters and digits, or underscore characters ( _ )
- Must begin with an alphabetic character
- Should have a minimum length of one byte and a maximum of 128 bytes
- Are case-insensitive (use delimited identifiers for case-sensitive)
- Cannot contain quotation marks or spaces
- Cannot be a reserved word
Comments
0 comments
Please sign in to leave a comment.