Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
airobles
Contributor II
Contributor II

Incremental loading multiple files

Hello


How can I upload several files and update by adding information to different fields?

Examples, I have 30 files of the month where I have to add elements such as minutes, data, etc, for a key. In the end I need the grouped qvd to do other analyzes


Example Load:


CARGA_ARCHIVO_CONSUMO:

LOAD      @1 AS NUM_TELEFONO,

          @4 AS FECHA_ALTA,

          MAX(@5) AS DIAS_CONSUMO,

          SUM(IF(@6='BYTEGR',@7))/1024/1024 AS MBYTES,

          SUM(IF(@6='MINF',@7))/60 AS MINUTOS,

          SUM(IF(@6='SMSGR',@7)) AS SMS,

          SUM((IF(@6='BYTEGR',@7))/1024/1024)*0.0344 AS COSTE_MBYTES,

          SUM((IF(@6='MINF',@7))/60)*0.0398 AS COSTE_MINUTOS,

          SUM(IF(@6='SMSGR',@7)*0.0049) AS COSTE_SMS

FROM

(txt, codepage is 1252, no labels, delimiter is '|', msq)

GROUP BY @1,@4;

STORE CARGA_ARCHIVO_CONSUMO INTO D:\RUTA\CARGA_ARCHIVO_CONSUMO.QVD;

DROP TABLE CARGA_ARCHIVO_CONSUMO;

The script is grouping and summarizing but by file inserting 30 clusters. what I need is only one that contains all the grouped of the 30 files


I hope you can help me, because by doing it this way I take up a lot of space and resources, Tanks

1 Reply
petter
Partner - Champion III
Partner - Champion III

So what is not working for you - it the "example" script working at all or not?

It seems that you load multiple files in the ADQ_EVENT*.txt .... it that where the 30 files come in or do you have 30 different folders/directories with multiple files in each?