Stream Database Error with Postgres 9

mituw16
mituw16 New Altair Community Member
edited November 5 in Community Q&A
Hello,

I am facing an issue when trying to stream a very large table in Rapid Miner Studio 7 from Postgres 9.

It appears that Rapid Miner is creating the secondary index mapping table, but it always errors out with the following text.  Process failed: Database error occurred: ERROR: syntax error at or near "IDENTITY"
  Position: 76


The table does have a compound primary key like the following, perhaps that is causing issues?

CONSTRAINT pk_nc9_fullfile PRIMARY KEY (field1, field2)


This table that I am trying query is very large, too large to load the entire thing into memory using the Read Database or Retrieve data operators. Has anyone seen this behavior before?

Thanks

Answers

  • mituw16
    mituw16 New Altair Community Member
    Bump....does anyone have any ideas on this one?
  • BalazsBarany
    BalazsBarany New Altair Community Member
    Did you read the help text of the Stream Database operator in Studio?

    Stream Database needs a special index structure. It can't work with your table as it is now.

    The error message is coming from the futile attempt to create a new index field in your table. But this uses non-standard (probably MySQL) syntax that PostgreSQL doesn't accept.

    Try to find combinations from your compound index or other factors that allow you to do the batching yourself. Then you could use the Loop Values operator to execute the query for each batch.
  • mituw16
    mituw16 New Altair Community Member
    I did, and also thought that the compound key was could be an issue. I actually tried removing the compound key and just used a single column primary key, and I still received the same error.

    It would appear this operator does not work well with postgres
  • mituw16
    mituw16 New Altair Community Member
    I also tried removing the keys entirely and letting rapid miner do it's thing with creating a new primary key. That also failed with the same error message.
  • mituw16
    mituw16 New Altair Community Member
    I finally made the stream operator work by removing all custom keys for the table, and then re-adding a new serial primary key of "RM_INDEX".

    I still don't understand why I have to do this, as it defeats the purpose of having rapid miner make a new key mapping table or adding the itself, but it's a solution for now.

    Thanks for looking.