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

Problem w/ Incremental Load and the Store statement

So my code looks like this:

MaxDateTable:
LOAD max([Status Update Date]) as 'MaxDate'

FROM [CustomerLog.qvd]
(qvd);
LET INCREMENTAL_EXP = 'WHERE STATUS_UPDATE_DATE >=' & fieldValue('MaxDate', 1);

DROP TABLE MaxDateTable;

CustomerLog:
LOAD
autonumberhash128(#CUSTOMER_ACCOUNT_NUMBER,SERVICE_ADDRESS, STATUS, STATUS_UPDATE_DATE) as 'ID',
#CUSTOMER_ACCOUNT_NUMBER as 'Account Number',
SERVICE_ADDRESS as 'Address',
STATUS as 'Status',
STATUS_UPDATE_DATE as 'Status Update Date',
CREDIT_SCORE_RATING as 'Credit Score'
FROM
[REPORT_CUSTOMER_LOG.01042011.csv]
(txt, codepage is 1252, embedded labels, delimiter is ',', msq)

$(INCREMENTAL_EXP); //Where Status Update Date < Max Date

CONCATENATE LOAD
autonumberhash128([Account Number],[Address],[Status],[Status Update Date]) as 'ID',
[Account Number],
Address,
Status,
[Status Update Date],
[Credit Score]
FROM
[CustomerLog.qvd]
(qvd);

Store CustomerLog INTO CustomerLog.qvd;

The problem is the last statement (in bold). If I leave it as CustomerLog.qvd it will say "Execution of script failed. Reload old data?" (after it does all the loading, but it doesn't matter since it just goes back pre-load anyway) However, if I put it as "Store CustomerLog into CustomerLog2.qvd" it works fine. The only thing I can figure is that I'm storing it as the same file name as the original .qvd that I'm loading the data from and for some reason you can't do that. I've looked at the example in the cookbook many times and I swear it does this same thing with no problem... Can anyone help me out? I'm a real beginner at this stuff and I'm shocked I got it to work at all honestly.

Thanks in advance.

4 Replies
matt_crowther
Luminary Alumni
Luminary Alumni

Try: 'Store CustomerLog Into CustomerLog.qvd (QVD);'

That principal works for me when overwriting old qvd's. The addition of '(QVD)' forces Qv to store the table as a .qvd as apposed to .txt?? - no idea why it has an impact but it has caused issues for me in the past.

Hope that helps,

Matt - Visual Analytics Ltd

Not applicable
Author

Hello everybody,

I have the exact same problem. Adding (QVD) in brackets does not solve it.

If I store the table with another name, it works. For the incremental load i do of course need the identical name:

Concatenate



LOAD

     value_3,

    
periodrw,

    
client,

    
account,

    
project,

FROM Amount.qvd (qvd)

where periodrw <$(vperiodeladenab);


STORE Amount into Amount.qvd (qvd);

Can someone help?

Best regards

Astrid

Not applicable
Author

Hi,

I just found out that the qvd-name may not be equal to the table name. Before  I thought the qvd that I want to store must have another name as the qvd I loaded before...

workes fine:

Tablename1:

concatenate

Load

a,

b,

c from Tablename2.qvd;

store Tablename1 into Tablenam2.qvd

does not work:

Tablename1:

concatenate

Load

a,

b,

c from Tablename1.qvd;

store Tablename1 into Tablenam1.qvd

jvitantonio
Luminary Alumni
Luminary Alumni

Hi, this is because you are loading the file before storing it, and it might remain open (read-only) and therefore you cannot update it.