Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

drop table from data model via script

Hi community,

i have loaded a lot of tables into my app.

now i want a table to be deleted.

so i used Drop Table tablename;

the table is not existing in the script and the drop table runs into table not found but its still

in the datamodel and in the datamanager even after restart of the app.

Please help me thx in advance

17 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

You can share your script with us to investigate.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable
Author

i think i have number 2

sorry if i missunderstood because my english is not that great.

but i have some tables with the same fieldname.

so u say I must drop them all till i can drop the one i want.

So i think its easier to copy all to a new app and load all with a new script so its nice and clean

amayuresh
Creator III
Creator III

Same Field means same field structure

Ex:

Table1: Col1,Col2,Col3

Table2: Col1,Col2,Col3

and loading one after another then both table get merge in first table

Not applicable
Author

ok so drop the fields with same name that got merged and then rebuild the one table i dont want to deleted.

was that right?

Not applicable
Author

hi Kaushik

the script was allready checked by com earlier but i del it by accident.

so script is not the problem

amayuresh
Creator III
Creator III

table1:

Load Col1,Col2, Col3 from x;

table2:

Load Col1,Col2, Col3 from x;


both table get merge into table1. So need to drop table1.

I think this will clear your doubt.

swuehl
MVP
MVP

Eric,

could you describe what the exact issue was, to help people with a potential similar issue?

Since you marked Mayuresh Athalye's answer correct, I assume your issue had something to do with an auto-concatenated table.

But from your original post, this does not explain that you've seen a table in your model called 'NosBos' and you were not able to drop this table in your script using

Drop Tables NosBos ;

Have I missed something inbetween?

Thanks,

Stefan

Not applicable
Author

i wanted to drop a table called NosBos.

and something got wrong while droping it because the table was not in the script anymore but in the data model and manager.

So because the table was linked to other tables i deleted parts of the connected table (the field with same name)

and after i restart the app and started loading data with the script again all was ok.