I am currently connecting to a postgresql database and want to create a table in it. I am using the Database Table Creator node. However, when I connect the data I would like to write to it and try to execute it, I get the following error:
ERROR Database Table Creator 2:2 Execute failed: ERROR: syntax error at or
Why am I getting this and how do I fix it?
what database are you connected to? This seems to be a problem with the generated SQL that is send to the database. To inspect the SQL you can enable the logging of the generated query via the Advance tab of the corresponding DB Connector node. If you are using the generic DB Connector node to connect to a database KNIME doesn’t provide a dedicated connector to you might need to tweak some settings in the connectors “Advanced” tab such as the identifier delimiter.
I am using the Postgresql connector.
sorry I missed in your first post that you are connecting to a Postgres database. Ok this should work out of the box. you connect a KNIME data table to the node which should be used to specify the structure of the db table right?
Do you use the dynamic settings option? If not the node will use the information entered in the “Columns” tab which might contain an unsupported database type. Do you specify any additional information in the “Additional Options” tab? These get appended to the end of the create table statement and might contain some type or other incompatible entries.
If you use the dynamic settings option and have no entries in the “Additional Options” tab it would help a lot if you could send me the KNIME data table specification e.g. column names and column types. You can get this information either via the “Spec” tab of the tables out port view or by using the Extract Table Spec node. If this information is sensitive please let me know and I will contact you via PM.
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.