Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: Exception: Truncate not supported

  1. #1
    Join Date
    Sep 2011
    Posts
    16

    Default Exception: Truncate not supported

    Hi,

    I am trying to output data in a table stored in vertica.
    This is just a test, the data is just randomly generated.

    I end up with the exception:
    Code:
    java.lang.UnsupportedOperationException: Truncate not supported.
        at org.pentaho.di.core.database.VerticaDatabaseMeta.getTruncateTableStatement(VerticaDatabaseMeta.java:91)
    As I did not find a way to log all SQL statements, I replaced the table output by a sql file output, hoping to see the issue. The same kind of error happens:
    Code:
    SQL File Output - org.pentaho.di.core.exception.KettleStepException: 
    Truncate not supported.
        at org.pentaho.di.trans.steps.sqlfileoutput.SQLFileOutput.processRow(SQLFileOutput.java:144)
    The weird thing is that when issuing the TRUNCATE in a SQL script step, the truncate *does* work.

    What could make those 2 types of TRUNCATE being different?

    Thanks,
    Guillaume

  2. #2
    Join Date
    Sep 2011
    Posts
    16

    Default

    This seems to be a bug for me:
    at src-db/org/pentaho/di/core/database/VerticaDatabaseMeta.java:
    public String getTruncateTableStatement(String tableName)
    {
    throw new UnsupportedOperationException("Truncate not supported.");
    }

    Whereas TRUNCATE is indeed supported with the syntax TRUNCATE TABLE [schema_name.]table

    In the same file,
    public boolean supportsViews()
    {
    //TODO: This will change in Vertica 3.0
    return false;
    }

    can be updated as well.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.