10 Replies Latest reply: Jun 14, 2017 5:16 AM by Michele De Nardi RSS

    routine file csv

    Federica Posadino

      Hello to all,


      Problem: I have the .csv files I receive daily from the crates. Are located in different folders (subdivided by point of sale). I would like to create an automation that allows me to take the file daily and load it directly onto qlikview. Does anyone have any advice? thank you


      - - -

       

      Ciao a tutti,

       

      problema: ho dei file .csv che ricevo giornalmente da delle casse. si trovano in cartelle differenti (suddivise per punti vendita).

      Vorrei creare un automatismo che mi permetta di prendere giornalmente il file e lo carichi direttamente su qlikview.

      qualcuno ha dei consigli?

      grazie

        • Re: routine file csv
          Michele De Nardi

          To give the correct answer we need some other details like:

          1) Have these .csv files the same structure (columns) ?

          2) Are these .csv files always present in your sales points folders or there is a task that delete old file every night ?

            • Re: routine file csv
              Federica Posadino

              1) yes, they have the same columns

              2) they are always present in my folders, from the opening date to now. So, the amount of data is high.

              thanks

                • Re: routine file csv
                  Michele De Nardi

                  MainTab:

                  Load

                       *,

                       'Sales Point 1' as SalesPoint

                  From [C:\folder1]*.csv (txt, codepage is 1252, no labels, delimiter is '\t', msq);

                   

                  Concatenate(MainTab)

                  Load

                       *,

                      'Sales Point 2' as SalesPoint

                  From [C:\folder2]*.csv (txt, codepage is 1252, no labels, delimiter is '\t', msq);

                    • Re: routine file csv
                      Federica Posadino

                      yes, but when i recive a new file in the sales point folder 'n' is automatically added to qlikview?

                      Because i recive daily new files from sales point....

                        • Re: routine file csv
                          Michele De Nardi

                          Yes.

                          You have to create a load statement for each Sales point folder.

                          When a .csv files is added to these folders it's automatically (with document reload ) loaded in your analysis because with this type of load (with the asterisk) you are telling to Qlik something like: Load all files with .csv extension in this specific folder:

                           

                          MainTab:

                          Load

                              *,

                              'Sales Point 1' as SalesPoint

                          From [C:\folder1]*.csv (txt, codepage is 1252, no labels, delimiter is '\t', msq);

                            • Re: routine file csv
                              Federica Posadino

                              it doesn't work.... Qlik tells me that it's unable to open the 'C:\Sviluppo\68426', unable to find the specified file.

                              i try again:

                               

                              MainTab:

                              Load

                              *,

                              'Name of the folder' as name of the folder

                              From [C:\name of the folder]*.csv (txt, codepage is 1252, no labels, delimiter is '\t', msq);

                            • Re: routine file csv
                              Michele De Nardi

                              When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads as HELPFUL if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads as HELPFUL if you feel additional info is useful to others.

                      • Re: routine file csv
                        Basel Elias

                        Federica,

                         

                        Do you want this scheduled load?

                        • Re: routine file csv
                          Federica Posadino

                          Hi guys,

                          i'm managed to improve my qw file like Michele told me, but now i have another problem:

                          in my point of sales' folders i have different kind of .csv files and i only want those who are called like "TBVENDPC_idpointofsales_date". obviously they are as many as are the closing day of the cash.

                          how can i do?

                          thanks

                            • Re: routine file csv
                              Michele De Nardi

                              Hi Federica,

                              you have to change the loads from:

                              Load *

                              From [C:\folder1\]*.csv (txt, codepage is 1252, no labels, delimiter is '\t', msq);


                              to


                              Load *

                              From [C:\folder1\]TBVENDPC_idpointofsales_date*.csv (txt, codepage is 1252, no labels, delimiter is '\t', msq);

                               

                              Doing this QlikView load all files with .csv extension and which start with TBVENDPC_idpointofsales_date.