DBOutputTable error

Support/help with CloverETL (4.9) and CloverDX (5.0 or newer) implementation problems

Loris89
Posts: 8
Joined: Tue May 10, 2016 12:51 pm
Location: Italy

DBOutputTable error

Postby Loris89 » Thu Jun 02, 2016 8:36 am

Hi everyone.

I get an error (or a warning) on the first port of the DBOutputTable component when i try to write data in a MySQL table.

The error is: "compatibility of field types could not have been validated (not supported by the driver)".

In input i have my final metadata, and i map the fields of the metadata to the DB table using "Field mapping" of the DBOutputTable.

I can't understand if i'm writing in the database, because if i try to execute a query over the database (SELECT * FROM my_table)
with the DBExecute component, it returns only 1 record with null values on the second output port.

If i execute the SQL query using the prompt, i get the table with the correct values!

Note: In my graph, i first execute a query that clears the table (phase = 0), then i execute the main graph (all components have phase set to 1), and finally i execute the query (phase 2).

cholastal
Posts: 135
Joined: Tue Sep 01, 2015 1:22 pm

Re: DBOutputTable error

Postby cholastal » Thu Jun 02, 2016 3:26 pm

Hi Loris89,

This is actually not an error it's just a warning and as such won't cause the graph failure. However, the graph (or the component) cannot inform you whether the fields in the DBOutputTable are compatible with the fields in the database and that may cause an error (if they don't match). This warning is there because the driver cannot provide this compatibility check and is more or less useless (the information itself). There is already a ticket in our system and this warning will be probably removed in some of our future releases.

So if the component is set correctly, then the records are successfully written into the database as you can see when you check the database via some external tool.

The reason why you are getting some invalid values from the DBExecute is that it is not designed for input and select statements. For these operations you should always use DBInputTable and DBOutputTable. It is quite hard to set the DBExecute to read/write information from/to a database. Therefore we have three basic database components. So if you want to load the records from the database, please use the DBInputTable.

Best regards,

---
Lukas Cholasta
CloverCARE Support
CloverDX

Visit us online at http://www.cloverdx.com

Loris89
Posts: 8
Joined: Tue May 10, 2016 12:51 pm
Location: Italy

Re: DBOutputTable error

Postby Loris89 » Mon Jun 06, 2016 9:00 am

Thank you! So, which is the purpose of the DBExecute component?

cholastal
Posts: 135
Joined: Tue Sep 01, 2015 1:22 pm

Re: DBOutputTable error

Postby cholastal » Tue Jun 07, 2016 12:47 pm

The DBExecute is being used basically for every other operation besides select (DBInputTable), insert, update and delete (DBOutputTable). For example create table, manual begin and commit/rollback transaction, select and insert inside a database (not for (un)loading data from/to DB), etc.

Best regards,

---
Lukas Cholasta
CloverCARE Support
CloverDX

Visit us online at http://www.cloverdx.com


cron