In0cybe
In0cybe

Reputation: 321

Pentaho Error: Duplicate entry for key 'PRIMARY'

The error that Pentaho gives is when trying to insert new records of the steep Merge Rows (diff): Error updating batch codigo_postal.0 - Duplicate entry '01002' for key 'PRIMARY'.

The transformation: transformation

Table input final: is a select from table A: enter image description here

Table input aux: is a select from table B: enter image description here

Merge Rows (diff) (preview): (row 01002 is identical) merge-rows-diff

Switch / Case: (only rows new for codigo_postal steep) switch-case

In steep Switch / Case (previer): the row '01002' is not in the result (only new rows) but the error is Error updating batch codigo_postal.0 - Duplicate entry '01002' for key 'PRIMARY'.

Does anyone know what may be happening?.

Thank you.

Upvotes: 0

Views: 1105

Answers (1)

In0cybe
In0cybe

Reputation: 321

ok, changing the data type to UNSIGNED worked correctly for me:

CAST(cp.id_codigo_postal AS UNSIGNED)

Thank you.

Upvotes: 1

Related Questions