Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have 2 sheets and each sheet requires a different data load script.
So how can I have multiple load scripts..... without reloading every sheets data? In other words - if I'm in sheet1 & I want to reload the data related to sheet1 (& not do a reload for sheet2)?
For example:
(sheet1):
LOAD [@1:n] as 'Text'
FROM
C:\Users\my_docs\folder1\data1
(fix, utf8, no labels);
(sheet2):
LOAD [@1:n] as 'Text'
FROM
C:\Users\my_docs\folder1\data2
(fix, utf8, no labels);
So with this basic example, if I did a reload..... it's reload both?
Maybe use a trigger on activation of your sheets and set a variable.
Then use this variable when reloading to switch to your correct LOAD statement.
Won't the tables that you don't load be dropped from the data model? IMHO this is not too simple...
Yes, it would, unless you are using partial reload.
I haven't read the OP's request as to keep all the data in the other sheet, though.
Well, basically I don't really know what exactely the OP wants to do.
You typically will load all data every time. And then limit the data shown on each sheet by using user selections or Set Analysis.
-Rob
Hi,
you can adapt this script.
Using variable you can make conditional soime part of the script
// Start loading script data that needs to be load always
// replace with first load statements
// check to identify if full reload is needed
// a full reload is needed 1 time a day
if today() > date(ReloadLastFull) or ReloadFullForce='Yes' then
set ReloadType='Full';
ELSE
set ReloadType='Partial';
set ReloadLast='Partial';
// set the last partial reload
let ReloadLastPartial = LocalTime();
// exit point in case full reload is not neeeded
exit script when ReloadType='Partial'
endif
// data that should be load only 1 time a day
// replace with second load statements
// set the variable to show how was the last reload
set ReloadLast='Full';
set ReloadFullForce='No';
// set the variable to show when was the last full load
let ReloadLastFull = Localtime();