Possible bug in DB Writer for exporting to PostgreSQL?

Exporting to SQL Server works fine (workflow here), but DB Writer throws an error when trying to export to Postgres. Is that a bug related to the Postgres node or DB writer node?

Hi @tone_n_tune , what kind of error are you getting?

2 Likes

WARN DB Writer 0:13 Configure node and enter a valid table name.
WARN DB Writer 0:13 Configure node and enter a valid table name.

These two message pop up when executing the pipeline with Postgres connector (all settings same as SQL Server).

Hi @tone_n_tune , they’re just warning, not errors, and they usually happen at THAT moment, simply because the upstream nodes have not run yet at THAT moment.

When you run the workflow, all the nodes before the Node 13 would have run before reaching Node 13, and it will not complain about it, at least not complain about what the warning is saying.

@bruno29a but the problem exists regardless. There is nothing getting written in the postgres DB.

Hi @tone_n_tune , do you see any other messages?

Are you able to at least read from the Postgres DB?

@bruno29a Yes, I can connect to the Postgres DB from both Knime and DBeaver.

I have manually created a DB and a schema, and now I can write the data in it. Is this the way to go?
Previously in SQL connector, it was writing to the Master DB without creating any DB or Schema.

Hi @tone_n_tune , The DB Writer will create the table if the table does not exist. As far as DB is concerned, you have to write to an existing DB, meaning you have to have the DB created before hand.

I doubt that with the MS SQL Connector you were able to write to a non-existing DB. You must have connected to a DB which existed.

1 Like

Yes, the Tables are created automatically if they do not exist. I am referring to the need to manually create a DB and a Schema beforehand.

Hi @tone_n_tune , as I said, you can’t write to a non-existing DB or schema, and I’m pretty sure you could not that with the MSSQL Connector either.

I’m sure you connected to a particular DB when you connected to your MSSQL Server, and usually if you don’t specify a schema, it defaults to the “dbo” schema in MSSQL.

For Postgres, I don’t think there is a default schema.

You need to have the DB (and schema if applicable) created before hand.

3 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.