Options

COPY Command : [Vertica][VJDBC](5191) INTERNAL: Unhandled expression type 306

Hi,

 

I've been tryign to load data into into a table but I'm getting "Unhandled expression type 306"

if I do a normal insert statement it works fine.

 

Table1(

Table1_PK IDENTITY(1) PRIMARY KEY,

Table2_FK Int,

Table3_FK1 Int,

Table3_FK2 Int

...

);

 

Tabe2(

Table2_PK IDENTITY(1) PRIMARY KEY,

...

);

 

Table3(

Table3_PK IDENTITY(1) PRIMARY KEY,

....

);

 

The copy statement is loading data into the 3 foreign key columns, and all keys exist in the primary tables.

 

Any ideas how to troubleshoot this?

 

Thanks!

Comments

  • Options

    Can you show the copy command that you are executing?

  • Options

    Hi,

     

    I'm using a very simple copy command

     

    COPY Table1(FK_1, FK_2, FK_3) FROM LOCAL 'C:/tmp.csv' WITH DELIMITER AS ',';

     

    After some investiagations, I dropped one of the pre-join projections I've created and now the copy command works. This projection is joining based some of the FKs in the table.

     

    Is there any limitations or considerations on using pre-join projections with COPY commands?

  • Options

    Yes it has some considerations that you can find the documentation .

     

    http://docdev.verticacorp.com/doc/7.1.2/HTML/#Authoring/AdministratorsGuide/BulkLoadCOPY/LoadingDataIntoPre-joinProjections.htm%3FTocPath%3DAdministrator's%2520Guide%7CBulk%2520Loading%2520Data%7C_____10

     

    However, the error messages means something different, can you check in jdbc log for more details? have you tried the command in vsql directly. The command that you posted has an error :

     

    COPY Table1(FK_1, FK_2, FK_3) FROM LOCAL 'C:/tmp.csv' WITH DELIMITER AS ',';

     

    should be

     

    COPY Table1(FK_1, FK_2, FK_3) FROM LOCAL 'C:/tmp.csv' DELIMITER AS ',';

     

     

    Hope this helps.

     

    Eugenia

  • Options

    Hi,

     

    Thanks for the document.
    I double checked and all foreign keys are already present in the master table.

    I'm testing now with just 1 record from vsql and still getting the same error.

     

    Any ideas what else could be the reason?

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file