Making test database

I will be using Knime on a test database. What's the best way making a copy (=test database) of a production database (all tables plus data) using Knime nodes? Di i have to copy each separate table or can this be done in a quicker way?

 

Hi,

I do not know a way to copy a complete database without using a db specific tool to create a dump of the db schema. however what you can do is you can automate the data copying using KNIME. To do so I created a small workflow that loops over all tables within an SQLite db and copies the data within these tables to new tables in another SQLite database.

Notice:

  •  The worklfow is applicabale to any JDBC complained database but you have to adapt the query to retrieve the table names since this is database specific.
  • The workflow only copies the data but no references such as primary and unique key constraints.

Bye,

Tobias

Thanks Tobias!

I had to change sqlite to mysql. Athough slow, it works.