Create many database with a loop

Hello,
I'm using sqlite node to create a database and fill it with data.
During development I found out it would be handy to create more than one database with a loop. For example I would like to create 10 databases with the following name:
data_1.db, data_2.db ... data_10.db.

Is there a way to do this with some kind of loop? The only way I have found is to add 10 different sqlite nodes, each one with a specific name.

Thanks!

each database will need a separate sqlite node. You name the database when configurating the node.

You could use a loop to create multile tables in a database.

Ok! That's what I'm doing. So I guess there is no other way to do that while having a single sqlite node.
What about other sql nodes? I know Node-RED has other nodes for database mangement.

As far as I’m aware they all work the same way. It might be possible to use an exec node to create the databases but to use the SQLite node, you would still need a node per database.

You could create them with a command line batch job using the exec node if the sqlite node can't do it.

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