Dear Community,
I am a newbie with KNIME and want to create a SQLite File for metabase.
I did create an initial SQLite file and added data via DB Writer. Now I need to add additional columns in the existing table in the SQLite file and I struggle to add those. How do I do this? I would like to keep the old table as it is already binded to the docker container.
Any feedback is highly appreciated.
@AndreasKoehler welcome to the KNIME forum. You can add a column like this in SQLite
ALTER TABLE "my_table" ADD COLUMN COLNew STRING;
Question will be how to populate this later if your table already has existing values. Maybe use update function.
Hi mlauber71,
thanks for the quick reply.
So I use the node DB SQL Executor for this? Is there no node to add colums automatically that do not exist yet in the SQLite file? There is a lot of iterative adding of input fields as I am building an application.
Yes you would send the command via that node.
If you want to dynamically add columns that do not exist you can do that I think. You will have to plan ahead how you want to handle that and if you want also to add information from the new columns and if you have an ID (PRIMARY KEY) that would help to match the information.