[ 
https://issues.apache.org/jira/browse/SQOOP-1361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14067798#comment-14067798
 ] 

Sai Karthik Ganguru commented on SQOOP-1361:
--------------------------------------------

[~jarcec] I think just incorporating the 
[ClassWriter.toIdentifier|https://github.com/apache/sqoop/blob/trunk/src/java/org/apache/sqoop/orm/ClassWriter.java#L214]
 method alone to clean up the column names will not be sufficient for this 
use-case because the '$' symbol which is a currency as well and hence is valid 
when cleaning up columns with isJavaIdentifierPart() method. So we should do 
some additional processing for this. Let me know if additional check for '$' 
apart from the 
[ClassWriter.toIdentifier|https://github.com/apache/sqoop/blob/trunk/src/java/org/apache/sqoop/orm/ClassWriter.java#L214]
 method should suffice.

> When a special character like '$' is encountered in the column names then the 
> Sqoop script fails
> ------------------------------------------------------------------------------------------------
>
>                 Key: SQOOP-1361
>                 URL: https://issues.apache.org/jira/browse/SQOOP-1361
>             Project: Sqoop
>          Issue Type: Bug
>          Components: connectors
>    Affects Versions: 1.4.3
>            Reporter: Sai Karthik Ganguru
>            Assignee: Sai Karthik Ganguru
>            Priority: Minor
>         Attachments: SQOOP-1361.patch
>
>
> If any of the characters like '$' are present in one of the column names that 
> we are trying to Sqoop (as an Avro data file using the option 
> --as-avrodatafile) then the Sqoop script fails with an exception.
> Trying to Sqoop a table (using the --as-avrodatafile option) whose column 
> names are as follows: Name$, Age$, Profession$



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to