The JOIN clauses used to build this table are inconsistent in how ID columns are cast. This causes an incompatibility issue when using with LDP 1.X source tables:
LEFT JOIN invoice_lines AS invl ON (invl.data #>> '{invoiceId}')::uuid = inv.id::uuid
LEFT JOIN invoice_adjustments_in_addition_to AS invadj ON invadj.invoice_id = inv.id
LEFT JOIN invl_total AS invltotal ON inv.id = invltotal.inv_id
LEFT JOIN finance_transaction_invoices AS fintrainv ON fintrainv.invoice_id = inv.id AND fintrainv.invoice_line_id IS NULL
LEFT JOIN finance_transaction_invoices AS fintrainvl ON fintrainvl.invoice_line_id = invl.id
The finance_transaction_invoices columns invoice_id and invoice_line_id are created in the finance_transaction_invoices script as type uuid, but the id columns for both invoice_invoices and invoice_lines are VARCHAR(36). Trying to build this table with LDP 1.X results in the error:
ERROR: operator does not exist: uuid = character varying
LINE 53: ...ion_invoices AS fintrainv ON fintrainv.invoice_id = inv.id A...
^
HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
The JOIN clauses used to build this table are inconsistent in how ID columns are cast. This causes an incompatibility issue when using with LDP 1.X source tables:
The
finance_transaction_invoices
columnsinvoice_id
andinvoice_line_id
are created in the finance_transaction_invoices script as typeuuid
, but theid
columns for bothinvoice_invoices
andinvoice_lines
areVARCHAR(36)
. Trying to build this table with LDP 1.X results in the error: