Hi,
I have a mysql database in normal form with around 20 tables, with numerical id key.
I need to copy data to a postgresql database, uuid based, that is similar but not identical to first one (it is a new version of the same application).
I am a newbye of knime, I would like to understand if knime help me saving time or it is better to write some code.
So I ask:
has knime some nodes to help migrating from id to uuid?
has knime some nodes to map columns for source table to destination table?
@mgiammarco concerning the transfer you might want to think about streaming like in this example.
Then depending on the database it might support UUIDs so you could create them in the DB, maybe after storing the table after transfer in a temporary table.
@mgiammarco here is an example. You would have to change the DB nodes. Your initial database is in the H2 DB with some data in: “data_insert_types”.
Based on this table an empty table “data_insert_types_transfer” is being created in the Postgres DB. Then this empty table gets adapted so that it will automatically produce an additional column called “my_uuid_column” with this command:
ALTER TABLE "public"."data_insert_types_transfer" ADD COLUMN my_uuid_column UUID DEFAULT (uuid_generate_v4());
In the component Streaming will be used in order to speed up the process (you can experiment with the chunk size and also do additional manipulations):
Thanks for detailed replies I am positively suprised!
I have just another question: main table has several one to many relationships. How can I recreate them on destination db? Is there a component that can fill a lookup table while streaming data from main table?
Thanks,
Mario