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).
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,
Thank you! So, which is the purpose of the DBExecute component?
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,