Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I'm facing one challenging problem while making data model.
the scenario is...
In our database, PLC system will store all the parameters of machine as one table for every day.
ie one new table will be created on 01/04/2016 as MAC_PARAM_010416,similarly for each day system will create one new table as MAC_PARAM_(DATE).
Now i needs to load the data from these table in to qvd on daily basis , with the simple script.
Hope you guys can give ideas.
Thanks and regards,
Murugesan.
use like below
Let vToday=Date(today-1,'DDMMYY'
MAC_PARAM_$(vToday):
Load * From MAC_PARAM_$(vToday);
Store MAC_PARAM_$(vToday) into MAC_PARAM_$(vToday).qvd;
Drop table MAC_PARAM_$(vToday)
use like below
Let vToday=Date(today-1,'DDMMYY'
MAC_PARAM_$(vToday):
Load * From MAC_PARAM_$(vToday);
Store MAC_PARAM_$(vToday) into MAC_PARAM_$(vToday).qvd;
Drop table MAC_PARAM_$(vToday)
read and store in qvd 1 year of files in loop
FOR i=0 to -365 step -1
LET vDate = Date(Today() +i, 'DDMMYY');
trace $(vDate);
// change with your file name
SourceTable:
load * from .......; // use vDate variable
store * from SourceTable into .......qvd (qvd); // "
NEXT
read all your 2016 files with wildcard (* ?)
LOAD * from MAC_PARAM_????16.csv;
Hi Massimo,
thanks ..it is working fine.
I have one more scenario like this..hope u can give some idea
there are few tables are newly generated in each day with some predefined prefix in my database.
ie, new tables are created in the name of "AVAIL_XXXXX"
in that XXXXX may be any in name..
in our previous scenario we have date filed in the tablename to filter our tables.
but in this current scenario, how can i identify which are all the tables are not loaded to my qvd??
thank you.
try like below ,may be help to you
AVAIL:
Load * From AVAIL_*;
Store AVAIL into AVAIL.qvd;
Drop table AVAIL
it is working fine, but on the next day i should only load which are all the tables are not loaded in the previous day, how can i identify those tables from database?
is there any option to check with directory??
thank you
Yes. is possible .
Let me know what is your type (excel,notepad,xml)?
please close your thread if your initial question is answered:
Qlik Community Tip: Marking Replies as Correct or Helpful
thanks
regards
Marco
Hello Marco Great job really very helpful.
Can u just check this and see if you can help me out ! Badly needs support.