Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Load repeats fetches of records

I am fairly new to the QV application.  I am attempting to load different CSV files of different lengths and different number of records.  In all cases except the last (most recently added table), the load process repeats the fetch of records and the lines fetched is double (see below).  It does not happen in all of my QVW files only some.  PLEASE HELP!!!

TABLE1 << FILE1.CSV 116,303 lines fetched

TABLE1 << FILE1.CSV 232,606 lines fetched

TABLE2 << FILE2.CSV 205,401 lines fetched

TABLE2 << FILE2.CSV 410,802 lines fetched

TABLE3 << FILE3.CSV 3,129 lines fetched

TABLE3 << FILE3.CSV 6,258 lines fetched

TABLE4 << FILE4.CSV 139,154 lines fetched

TABLE4 << FILE4.CSV 278,308 lines fetched

TABLE5 << FILE5.CSV 526 lines fetched

TABLE5 << FILE5.CSV 1,052 lines fetched

TABLE6 << FILE6.CSV 2,124 lines fetched

TABLE6 << FILE6.CSV 4,248 lines fetched

TABLE7 << FILE7.CSV 866 lines fetched

1 Solution

Accepted Solutions
Not applicable
Author

I figured it out actually.  The CSV file I was loading was created on a SAS server.  For some reason, it caused the load statements to execute twice.  I moved the CSV files to my laptop and QV executed the load properly.  Go figure...thank you for sticking with me on this even on the weekend...:-)

View solution in original post

9 Replies
JonnyPoole
Employee
Employee

Are you expecting each file to create a new table or are you trying to stack the rows in each file into 1 large table in Qlik ? 

I suspect some of your files have the same field names and same number of field names as others. In that situation, qlik will automatically combine the 2 tables into one long table with a table name equivalent to the first table name (which will be the file name by default).

If you share your load script that will help but please consider how you want the table to link or stack in qlik.

Not applicable
Author

I am expecting each file to create a new table.  In my load script, I have changed the field names by prepending a qualifier (i.e. TBL1_) to differentiate fields.  When I open a brand new document and load, QV does not exhibit this behavior.

JonnyPoole
Employee
Employee

it does seem strange that it's 2x loading....every file.

WHat happens when you hit the debug button from the load script and step through the script line by line? Any insights on why it repeats?

Not applicable
Author

I see that it repeats there as well.  I am at a loss.

Not applicable
Author

In debug, after the load, it does not move to the next load step but remains on the same load step and executes a 2nd time.

JonnyPoole
Employee
Employee

if you copy paste the script to a new qvw does it do the same ? If yes can u share the script?

Not applicable
Author

Hi Jonathan.  Yes it does the same....I also ran in debug and after the first fetch, the debug pointer stayed on this load step after it completed and run again prior to going on to the next step.

LOGINS:

LOAD SESS_ID,

    CUST_ACCT_NUM,

     HIT_ID,

     SEASON_CD,

     LOGIN_VISIT_ID,

     APP_NAME_VER_DESC,

     RPTG_ST_NAME,

     USER_DEVICE_NAME,

     USER_DEVICE_TYPE_NAME,

     USER_DEVICE_OS_NAME,

     LOGIN_PT_TMSTMP,

     LOGIN_PT_HR_NUM,

     LOGIN_USER_LOC_TMSTMP,

     LOGIN_USER_LOCAL_HR_NUM,

     USER_TMZ_OFFSET_VAL,

     LOGIN_CONN_TYP_NAME,

     IN_HOME_IND,

     CUST_TYPE_NAME,

     WS_CUST_ELGBTY_CODE,

     LOGIN_PT_DATE,

     CUST_ACCT_NBR,

     OFFER_USED,

     OFFER_TYPE,

     TENURE

FROM

(txt, utf8, embedded labels, delimiter is ',', msq);

JonnyPoole
Employee
Employee

you mentioned the last csv only loaded once . If you place it first in the order does it load twice and the (new) last csv load once ?

if you type the following line in front of the load statement it should just load 10 rows of data. Does it cause the load to load 2*10 = 20 rows of data ?

first 10

lastly, is this the first time you are using qlikview? im just wondering what was happening up until now and what might have changed ?

Not applicable
Author

I figured it out actually.  The CSV file I was loading was created on a SAS server.  For some reason, it caused the load statements to execute twice.  I moved the CSV files to my laptop and QV executed the load properly.  Go figure...thank you for sticking with me on this even on the weekend...:-)