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

suprita commented on PHOENIX-4234:
----------------------------------

Hi Ankit,

Once I Got a response from you regarding phoenix.

Actually I want a quick response ,so posting you my query personally if you 
could answer this along  with posting on Jira group to get immediate response 
if possible for you.

My doubt is described below:

I am using apache phoenix to create table and then dump csv data into table.
But now I want to alter one colomn’s datatype length from varchar(7) to 
varchar(14),without losing the existing data into table.

Can it be done?
If yes how?

I tried the command to address the above mentioned issue but
ALTER TABLE G1V3IN_ADITI ALTER "INVOICE"."SBNUM" set data type varchar(15), 
column "INVOICE"."SBNUM" drop default;

Where sbnum is the colomn whose existing datatype length is 7 but we want to 
change it to 15.
G1V3IN_ADITI is table name.

But facing the below error:
Error: ERROR 601 (42P00): Syntax error. Encountered "ALTER" at line 1, column 
26. (state=42P00,code=601)
org.apache.phoenix.exception.PhoenixParserException: ERROR 601 (42P00): Syntax 
error. Encountered "ALTER" at line 1, column 26.
        at 
org.apache.phoenix.exception.PhoenixParserException.newException(PhoenixParserException.java:33)
        at org.apache.phoenix.parse.SQLParser.parseStatement(SQLParser.java:111)
        at 
org.apache.phoenix.jdbc.PhoenixStatement$PhoenixStatementParser.parseStatement(PhoenixStatement.java:1283)
        at 
org.apache.phoenix.jdbc.PhoenixStatement.parseStatement(PhoenixStatement.java:1364)
        at 
org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1427)
        at sqlline.Commands.execute(Commands.java:822)
        at sqlline.Commands.sql(Commands.java:732)
        at sqlline.SqlLine.dispatch(SqlLine.java:808)
        at sqlline.SqlLine.begin(SqlLine.java:681)
        at sqlline.SqlLine.start(SqlLine.java:398)
        at sqlline.SqlLine.main(SqlLine.java:292)
Caused by: NoViableAltException(7@[])
        at 
org.apache.phoenix.parse.PhoenixSQLParser.from_table_name(PhoenixSQLParser.java:9081)
        at 
org.apache.phoenix.parse.PhoenixSQLParser.alter_table_node(PhoenixSQLParser.java:3229)
        at 
org.apache.phoenix.parse.PhoenixSQLParser.oneStatement(PhoenixSQLParser.java:846)
        at 
org.apache.phoenix.parse.PhoenixSQLParser.statement(PhoenixSQLParser.java:499)
        at org.apache.phoenix.parse.SQLParser.parseStatement(SQLParser.java:108)
        ... 9 more

Please help to solve this.

It would be great help if I get some solution ASAP for this.


Thanks
Suprita Bothra






> Unable to find failed csv records in phoenix logs
> -------------------------------------------------
>
>                 Key: PHOENIX-4234
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-4234
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: suprita bothra
>
> Unable to fetch missing records information in phoenix table.How can we fetch 
> the missing records info.
> Like while parsing csv into hbase via bulkloading via mapreduce,and using 
> --igonre-errors  option to parse csv.
> So csv records having error are skipped but we are unable to fetch the info 
> of records which are skipped/failed and dint go into table.
> There must be logs of such information .Please help in identifying if we can 
> get logs of failed records



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to