Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

add data to basic table

Hello, I have one basic table and I made application for it. How I add new table in script? To automated add table with opening application. I shall add each day new one to old. I know, that is something like incremental load.

Condition - all tables are same, only values inside new tables are different and name of new table is different (part of name is date).

Example:

I have table with name:                     Basictable
second day                                       Newtable01

third day                                            Newtable02

fourth day                                          Newtable03

etc.

and I need join newtable each day to basic table. But still I need old data from tables that were inside before.

16 Replies
Anonymous
Not applicable
Author

sorry, its txt files

Anonymous
Not applicable
Author

I have qlink sense desktop version

agigliotti
Partner - Champion
Partner - Champion

ok let's try using something like this:

SET searchStr = '*.txt';

SET RootPath = ''; // your folder path

for each File in filelist (RootPath&searchStr)

   

     CONCAT (Basictable)

     LOAD *

     from $(File)

     (txt, codepage is 1252, explicit labels, delimiter is '\t', msq);

next File

but with Qlik Sense Desktop you can't run the app in automatically way.

martinpohl
Partner - Master
Partner - Master

for sure.

how would you get your data?

you can insert the delta load script in your script so you have to reload only one script.

or the Delta load script is running continously so you create new datas near to realtime

Anonymous
Not applicable
Author

I thought, that I can make some variable to automatically load new data and add it to data that were there before, when I open application. When I use "Load data" in dataload editor, it take too much time, because I have huge data files and so many. And all files load again, but old data dont change, I only need join new data table only. It take different time, when system load 301 files or only new 1 file add to 300 old files, that were loaded before.

What is delta script? Whit codes Im not too strong.

Sorry for my bad english.

Anonymous
Not applicable
Author

Thank you. But maybe I wrote it wrong. Sorry for my bad english. I havent problem, that tables dont concatenate. My problem is, that application isnt automaticaly updated about new data from new files, when I open it.

I must go to data load editor and press button "Load data" and system load all data and it take many time. I have many huge files. But my old data dont change, so I only need add new data to "old table" each day.

Now I must press button "Load data" and then system load all files from before - today example 300 files, tomorrow 301, after tomorrow 302 files. And only loading data take me cca 10 min each day.

But to save time for me will be better load each day only 1 new file and add it to table that contain all my old data. I gues that is some possible make with variables, but I dont know how.

Sorry for my english and confusing you.

mato32188
Specialist
Specialist

Hi Daniel,

what about different approach?

First, load all your 300 files and store them into QVD file. I.e.: (INITIAL LOADER)

------------

Table:

Load *

FROM YourLibraryPath\*.txt;

store Table into YourLibraryPath\YourFile.qvd (qvd);

------------

now you can remove INITIAL LOADER code above and do next:

Second, attach only your new data from txt file to existing qvd file. I.e.: (REGULAR LOADER)

-------------

Table:

Load *

FROM YourLibraryPath\YourFile.qvd (qvd);

concatenate(Table)

Load *

FROM YourLibraryPath\YourLatestTXTFile.txt;

store Table into YourLibraryPath\YourFile.qvd (qvd); //This would attach only new data set to existing data

----------


Third, you can use YourFile.qvd in final application. (FINAL APPLICATION)

---------

Load *

From YourLibraryPath\YourFile.qvd (qvd);

--------


You can split your loads into smaller parts that could be helpful when doing reloads. Example above is very basic, I do not know if you have any other constraints on your side.


Thanks.


BR

Martin

ECG line chart is the most important visualization in your life.