Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
w0jt4z
Contributor III
Contributor III

Generic Load from QVD

Hi,
I need Your help, Guys. I tried to use Generic Load to reversal my table with Attributes. Unfortunately, it's about 80 000 000 records, and system  memory is full. I want to store every table to QVD in Generic Load, and then join every table from qvd, not from memory. My script looks now like that:

Attributes:
Generic LOAD
%OrderBookingKey,
Code,
Value
Resident Attributes_tmp;

Set vListOfTables = ;
For vTableNo = 0 to NoOfTables()
Let vTableName = TableName($(vTableNo)) ;
If Subfield(vTableName,'.',1)='Attributes' Then
Let vListOfTables = vListOfTables & If(Len(vListOfTables)>0,',') & Chr(39) & vTableName & Chr(39) ;
End If
Next vTableNo

CombinedGenericTable:
Load distinct %OrderBookingKey Resident Attributes_tmp;

Drop Table Attributes_tmp;

For each vTableName in $(vListOfTables)
Left Join (CombinedGenericTable) Load * Resident [$(vTableName)];
Drop Table [$(vTableName)];
Next vTableName

Store CombinedGenericTable into [lib://Transformed (win-f2om7p4maoo_followup)/Attributes_transformed.qvd] (qvd);

I think I should store the "little tables" to QVD before creating CombinedGenericTable, but I don't know how can I load all of them to my Generic table.

Thanks in advance for Your help!

Labels (1)
14 Replies
w0jt4z
Contributor III
Contributor III
Author

More "classical" model is ok, but I can't use it here, because for the one line i get many rows, it is very important to me to have everything in the same row. For the 10 attributes i get 10 lines.

Main and sub-groups are ok, I'll try it. Can i use it "keep" table for it? So, for example, I'll create at the beggining 3 sub-groups. For example, it will be BookingAttributes, DocumentAttributes, OrderAttributes, every table joined just like it's been until now, but to the 3 different tables. At the end of my script I'll try to keep this tables. What do You think? Isn't it the same?

marcus_sommer

Where is the problem with the multiple records for an ID - which calculation / view didn't work or isn't possible?

- Marcus

w0jt4z
Contributor III
Contributor III
Author

The problem is many if's. If I want show others attributes in one row and different columns i have to use if.
I have about 150 AttributeTypes and I need to show every of them. So I can't do it just like that:

OrderId AttributeId Value

1, 1, 1

1, 2, 2

Etc.

I need it in one line, just like that:

OrderId, AttributeId =1, AttributeId =2

1, Value, Value.

In the second case i need to write in every column if(AttributeId =1, Value), If (AttributeId =2, Value).
It is very slow...

marcus_sommer

You could just use a pivot-chart and used the attributes as horizontally dimension to get all of them within a single row without an if-loop.

- Marcus

w0jt4z
Contributor III
Contributor III
Author

It is not possible in my case. I need to show my data in specific way. But i "clear" a little my data, i had duplicate in AttributeId, it was the reason in my opinion.
Thanks for all Your tips.
Best Regards,
Wojtek