Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

scripting if statement issue - Error: The Source Document was NOT reloaded successfully. DocumentPath=D:\qlikview workspace\Applications\Data loaders\bookingqvd.qvw

I am having problem with an if statement in a qlikview script and need help The if statement works when I load the qvw and reload the data, but it does not work when I try to run it via the management console??  It works when I remove my if statement.  Any help would be appreciated. code is select dbo.uf_cnx_check_dw_load_status() as dw_load_status; LET var_load_status = peek('dw_load_status'); If '$(var_load_status)' = 'Completed' then product_groups_dw: SELECT product_id as Product_ID, Acct as Accounting, "Bus-Segmnt" as "Business Segment", "Rpt-Family" as "Product Family","Rpt-PlanCd" as "Plan Code", "Rpt-Type" as "Product Type", "Tax", "Rpt-Line" as "Product Line", "Rpt-OptSft" as "Optional Software","Rpt-Functn" as "Product Function","Rpt-PrdCat" as "Product Ctlg Family" ,"Rpt-SWSup" as "Software Support","Rpt-VidMix" as "Product Video Mixers","Fcst" as "Forecast", "VAT","Rpt-Train" as "Training","Rpt-CVM" "Product CVM Options","Rpt-Produc" as "BUM","Rpt-SWElig" as "Software Eligibility","Rpt-Level" as "Product Level","Rpt-BseSft" as "Base Software", "Rpt-EngNo" as "Engineering number","Rpt-I/O" as "Product I/O Options","Rpt-ProdAd" as "Product Administration" FROM (select Product_ID, ProductGroupName, productgroupvalue from dbo.DIM_ProdGroup) AS src PIVOT (MIN(productgroupvalue) FOR productgroupname IN(Acct,"Bus-Segmnt","Rpt-Family", "Rpt-PlanCd", "Rpt-Type", "Tax", "Rpt-Line", "Rpt-OptSft","Rpt-Functn", "Rpt-PrdCat","Rpt-SWSup","Rpt-VidMix","Fcst","VAT","Rpt-Train","Rpt-CVM","Rpt-Produc","Rpt-SWElig","Rpt-Level","Rpt-BseSft","Rpt-EngNo","Rpt-I/O","Rpt-ProdAd" )) AS pvt; End if; the error from the log is Error: The Source Document was NOT reloaded successfully. DocumentPath=D:\qlikview workspace\Applications\Data loaders\bookingqvd.qvw the full log is below (2014-04-23 11:21:04) Information: Starting task 'Booking qvd load'. Id:1cabcebe-eb7b-4d7e-b087-89baa6b9664e. Triggered by 'ManualStartTrigger'. Id:00000001-0002-0003-0405-0607080a0b0c (2014-04-23 11:21:04) Information: Entering Task Execution. (2014-04-23 11:21:04) Information: ClusterID=1 (2014-04-23 11:21:04) Information: QDSID=b6249b30-49a6-8686-d77e-3c8427c51a99 (2014-04-23 11:21:04) Information: TaskID=1cabcebe-eb7b-4d7e-b087-89baa6b9664e (2014-04-23 11:21:04) Information: MaxRunTime=1.00:00:00 (2014-04-23 11:21:04) Information: MachineName=BI-QLIKVIEW (2014-04-23 11:21:04) Information: Max attempts:1 (2014-04-23 11:21:04) Information: Current Attempt=0 (2014-04-23 11:21:04) Information: Task Dependencies are OK (2014-04-23 11:21:04) Information: Document is marked to be Reloaded with fresh data. Initializing Reload for Distribution. (2014-04-23 11:21:04) Information: Opening "D:\qlikview workspace\Applications\Data loaders\bookingqvd.qvw" (2014-04-23 11:21:04) Information: Allocating new QlikView Engine. Current usage count=0 of 4 (of type non-reader). (2014-04-23 11:21:04) Information: Max retries:5(2014-04-23 11:21:04) Information: Attempt:01 (2014-04-23 11:21:05) Information: Allocated QlikView Engine successfully. Current usage count=1 of 4 (of type non-reader). Ticket number=8117. (2014-04-23 11:21:05) Information: Loading document "D:\qlikview workspace\Applications\Data loaders\bookingqvd.qvw" (9.75 Mb)(2014-04-23 11:21:05) Information: Physical FileSize=9.75 Mb. Memory Allocation Delta for this file=4.05 Mb. Available Physical Memory Before Open=66561.22 Mb. Available Physical Memory After Open=66553.47 Mb. Total Physical Memory=73684.15 Mb. (2014-04-23 11:21:05) Information: Attempted to load the document without data. (2014-04-23 11:21:05) Information: The document was loaded successfully. (2014-04-23 11:21:05) Information: Document was opened successfully (2014-04-23 11:21:05) Information: Starting reload (2014-04-23 11:21:05) Information: QlikView->Settings->Document Peferences->Generate Logfile in document is not set. (2014-04-23 11:21:05) Information: The Source Document is being reloaded. DocumentPath=D:\qlikview workspace\Applications\Data loaders\bookingqvd.qvw (2014-04-23 11:21:05) Information: The Source Document reload complete. DocumentPath=D:\qlikview workspace\Applications\Data loaders\bookingqvd.qvw (2014-04-23 11:21:05) Information: Memory Allocation Delta for this file=1.38 Mb. Available Physical Memory Before Reload=66553.27 Mb. Available Physical Memory After Reload=66545.80 Mb. Total Physical Memory=66545.80 Mb. (2014-04-23 11:21:06) Error: The Source Document was NOT reloaded successfully. DocumentPath=D:\qlikview workspace\Applications\Data loaders\bookingqvd.qvw. (2014-04-23 11:21:06) Information: Closing the document. (2014-04-23 11:21:06) Information: Closed the QlikView Engine successfully. ProcessID=6780 (2014-04-23 11:21:06) Error: The task "Booking qvd load" failed. Exception: (2014-04-23 11:21:06) Error: QDSMain.Exceptions.DistributionFailedException: Distribute failed with errors to follow. ---> QDSMain.Exceptions.ReloadFailedException: Reload failed ---> QDSMain.Exceptions.LogBucketErrorException: The Source Document was NOT reloaded successfully. DocumentPath=D:\qlikview workspace\Applications\Data loaders\bookingqvd.qvw. (2014-04-23 11:21:06) Error:    at QDSMain.ReloadTask.VerifyConditions(TaskResult taskResult) (2014-04-23 11:21:06) Error:    at QDSMain.ReloadTask.Reload(String fileName, TaskResult taskResult, String sectionAccessUserName, String sectionAccessPassword, eReloadOptions reloadOption, String variableName, String variableValue, Boolean moniterCpuUsage) (2014-04-23 11:21:06) Error:    --- End of inner exception stack trace --- (2014-04-23 11:21:06) Error:    at QDSMain.ReloadTask.Reload(String fileName, TaskResult taskResult, String sectionAccessUserName, String sectionAccessPassword, eReloadOptions reloadOption, String variableName, String variableValue, Boolean moniterCpuUsage) (2014-04-23 11:21:06) Error:    at QDSMain.DistributeTask.Execute(TaskResult currentTaskResult) (2014-04-23 11:21:06) Error:    --- End of inner exception stack trace --- (2014-04-23 11:21:06) Error:    at QDSMain.DistributeTask.Execute(TaskResult currentTaskResult) (2014-04-23 11:21:06) Error:    at QDSMain.Task.AbstractTask.TaskExecution(ILogBucket logBucket, TaskResult taskResult) (2014-04-23 11:21:06) Information: Task Execute Duration=00:00:02.0436131 (2014-04-23 11:21:06) Information: TaskResult.status=Finished (2014-04-23 11:21:06) Information: Notifying all triggers of new state:FinishedWithErrors (2014-04-23 11:21:06) Information: Notifying all triggers of new state:FinishedWithErrors - completed (2014-04-23 11:21:06) Information: Saving Task Result

1 Solution

Accepted Solutions
MVP
MVP

Re: scripting if statement issue - Error: The Source Document was NOT reloaded successfully. DocumentPath=D:\qlikview workspace\Applications\Data loaders\bookingqvd.qvw

Are you sure the problem is in if statement?

To understand what is wrong we need your document log. In your post I see

Information: QlikView->Settings->Document Peferences->Generate Logfile in document is not set.

To enable the log: flag it (as in image), publish and reload the document in Qlikview server and then post the log of the reload (same folder, same name of Qlik doc, .log extension); the log should be more useful to understand the error

1.png

3 Replies
whiteline
Honored Contributor II

Re: scripting if statement issue - Error: The Source Document was NOT reloaded successfully. DocumentPath=D:\qlikview workspace\Applications\Data loaders\bookingqvd.qvw

Hi.

You'd better to attach some files instead of this plain text.

MVP
MVP

Re: scripting if statement issue - Error: The Source Document was NOT reloaded successfully. DocumentPath=D:\qlikview workspace\Applications\Data loaders\bookingqvd.qvw

Are you sure the problem is in if statement?

To understand what is wrong we need your document log. In your post I see

Information: QlikView->Settings->Document Peferences->Generate Logfile in document is not set.

To enable the log: flag it (as in image), publish and reload the document in Qlikview server and then post the log of the reload (same folder, same name of Qlik doc, .log extension); the log should be more useful to understand the error

1.png

Not applicable

Re: scripting if statement issue - Error: The Source Document was NOT reloaded successfully. DocumentPath=D:\qlikview workspace\Applications\Data loaders\bookingqvd.qvw

In turning on the log it pointed me to the real error message, thank you for this very helpful hint.  my problem was with permission on executing the function.  the management console was running with a qlikview user into the database while I was executing under a different user.

Community Browser