Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Experts!
I'm loading multiple tables at once using for loop and working fine, below is the my script.
but my users are asking to load only required columns, is there any possibility ?
Thanks in Advance!
using SELECT with the * character.
This will return all existing fields in the SQL table.
Simply insert the required fields by removing the character.
SQL SELECT
FieldA,
FieldB,
FieldC
FROM $(vTable);
fields should be automated..
let say Category Table has 3 fields and Product table has 10 fields.
If I keep all the column names it will through an error.
Yes, it's possible to apply something like this:
Hi @paulwalker , one thing is creating the QVDs, that usually store all the columns, and then users, or in a users App, you load just the required fields.
Yes, your correct.
but It is taking more time to load all the tables into QVD's (Many tables have description kind of data and QVD's size also it's huge like showing GB's).
Just this is my thought, if I create like below structure (Required column is like flag, 1 should be required column and 0 we don't require - in future if we want any column just change 0 to 1)
Such structure might be loaded per:
t: load Table, concat(Field, ',') as Fields from XLSX where Required = 1 group by Table;
for i = 0 to noofrows('t') - 1
let t = peek('Table', $(i), 't');
let f = peek('Fields', $(i), 't');
...
and if the data-set are really huge you may add like above hinted appropriate where-clauses and/or extending the logic by implementing an incremental approach, for example storing the max. date from each load in a variable and then only loading newer data and adding them to the historic ones. There are a lot of possibilities to reduce the workload of the data-base - of course by increasing the complexity ...