Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How does renaming a table affect related data?

I have a fact table that has keys that correspond to dimension tables. I do this in a data transformation qvw that outputs to a qvd.  I'm creating new report qvws and include the qvd but it has more than I need for all reports so I would like to then remove the extranneous data in the reports.  If I want to delete rows out of the fact table, I've researched that I should load a new temp table with the only rows I'd like to keep and then rename that table back to the original table name.  My quesion is how does the new data relate to the old dimension table data?  Does the dimension data just stay out their orphaned?  Does QV do anything automatically?  Do I manually then script the clearing of any data from the dimensions once the new fact is renamed or do I do it before?  I'm new to QV and would like to understand the best practice with this 'stripping' of data.

5 Replies
Anonymous
Not applicable
Author

hope i have understood your question.

and the way i see it, you can try something like below.

first lets assume you have a table A.

A: Load * From somwhere;

Now you want to reduce the data in this table.

B: NoConcatenate Load *, 'D'as TempField Resident A Where your_where_clause;

DROP Table A;

DROP Field TempField;

RENAME Table B to A;

It does not matter if all other dimension tables have been loaded before this or after this. The Key that links to the dimension table will still link to them as normal. None of the data from the Dimension table is going to get affected because of this.

Hope that helps.

Thanks,
Aadil

Anonymous
Not applicable
Author

Cindy

When you load your data from QVD why not simply add a Where clause so it only loads the rows you want.

Best Regards,     Bill

Not applicable
Author

Thank you.

Not applicable
Author


Well I'd like to ideally but the data transformation qvw that does all the work I bring in all at once using

Binary  [..\datatrans.qvw];

I then am left with the whole transformed data.  If I understand what I've researched on how this all works, if I don't do the Binary command with no constraints, then I would have to do a load for every single table in the datatrans document manually and that's even more scripting.  Am I understanding this right?  Also, sorry it's a qvw not a qvd that I load with the Binary command.

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

You can't limit the binary load, but you can still use Aadil M's suggestion after the binary load to reduce the data.

Regards

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein