Impala Column Name Issue

1.4k views Asked by At

We are facing a problem with Imapla Column naming convention which seems unclear to us.

The CDH imapala documentation (http://www.cloudera.com/documentation/archive/impala/2-x/2-0-x/topics/impala_identifiers.html) 3rd bullet point says : An identifier must start with an alphabetic character. The remainder can contain any combination of alphanumeric characters and underscores. Quoting the identifier with backticks has no effect on the allowed characters in the name.

Now, due to dependency with the upstream SAP systems, we had to name a column name starting with (0) zero as numeric. While defining and extracting the records from the table impala does not show any semantic error. While connecting Imapala with SAP HANA through SDA (Smart Data Access), the extraction is failing for this particular column which is starting with a leading zero (0) and fine for rest of the columns which are starting with an alphabet. The error shows as "... ^ Encountered: DECIMAL LITERAL "

I have to points.

  1. If the documentation says, an identifier can not start anything other that alphabet, then how the imapla query is running without any issues.
  2. Why the error is only raised while it is getting extracted from SAP HANA.

Any insight will be highly appreciable.

1

There are 1 answers

4
Lars Br. On

Ok, I can only say something about the SAP HANA side here, so you will have to check the Impala side somehow. The error message you get while accessing an external table via SDA typically comes from the 3rd party client software, in this case the ODBC driver you use to connect to Impala. So, SAP HANA tries to access the table through the Impala ODBC driver and that driver returns the error message.

I assume that the object name check for Impala is implemented in the client in this case. Not sure if the way you use to run the query in Impala also uses the driver.

But even if Impala has the limitation for the table naming in place, I fail to see why this would force you to name the table in SAP HANA that way. If the upstream data access requires the leading 0 just create a view on top of the table and you're good to go.