cancel
Showing results for 
Search instead for 
Did you mean: 

HANA PAL tutorial PAL 10 Clustering - Anomaly Detection.sql fails

0 Kudos

System: SPS10

Scenario: HANA PAL tutorial PAL 10 Clustering - Anomaly Detection.sql

Following line fails: CALL SYSTEM.AFL_WRAPPER_GENERATOR ('PAL_AD', 'AFLPAL', 'ANOMALYDETECTION', PAL_AD_SIGNATURE);

Error:

Could not execute 'CALL SYSTEM.AFL_WRAPPER_GENERATOR ('PAL_AD', 'AFLPAL', 'ANOMALYDETECTION', PAL_AD_SIGNATURE)' in 333 ms 363 µs .

SAP DBTech JDBC: [423]: AFL error:  [423] "SYSTEM"."AFL_WRAPPER_GENERATOR": line 61 col 5 (at pos 1844): [423] (range 3) AFL error exception: AFL error:  [423] "SYSTEM"."AFLPM_CREATOR": line 10 col 5 (at pos 193): [423] (range 3) AFL error exception: AFL error: registration finished with errors, see indexserver trace

Trace file shows:

[49187]{224053}[34/-1] 2015-11-03 19:13:49.861611 e cePlanExec       cePlanExecutor.cpp(07145) : Error during Plan execution of model SYSTEM:_SYS_SS_CE_181477_140464959917888_2_INS (-1), reason: "SYSTEM"."AFL_WRAPPER_GENERATOR": line 61 col 5 (at pos 1844): [423] (range 3) AFL error exception: AFL error:  [423] "SYSTEM"."AFLPM_CREATOR": line 10 col 5 (at pos 193): [423] (range 3) AFL error exception: AFL error: registration finished with errors, see indexserver trace

[49236]{224061}[35/-1] 2015-11-03 19:14:26.872630 i TraceContext     TraceContext.cpp(00823) : UserName=SYSTEM, ApplicationUserName=I311817, ApplicationName=HDBStudio, ApplicationSource=csns.admin.commands.AdministrationHandler$1$1.call(AdministrationHandler.java:338);csns.admin.commands.AdministrationHandler$1$1.call(AdministrationHandler.java:1);java.util.concurrent.FutureTask.run(FutureTask.java:266);java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142);java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617);java.lang.Thread.run(Thread.java:812);

[49236]{224061}[35/-1] 2015-11-03 19:14:26.872614 e PlanViz          PlanVizAction.cc(00045) : PlanVizContext is NULL!!

[49236]{224061}[35/-1] 2015-11-03 19:14:26.872646 e PlanViz          PlanVizAction.cc(00046) : Current session context: systemWatermark=1000375,slaveInitCount=-1,version=5,contextId=29114,globalSessionId=224061,anchorGlobalSessionId=224061,version=0,user=SYSTEM,schema=SYSTEM,locale=en_US,collate=BINARY,client=,curr_id_val=-1,app=HDBStudio,app_user=I311817,dateformat=,reserveprefix=true,ddlautocommit=false,checkPasswordChangeNeeded=false,abapVarcharMode=false,largeNumberOfParametersSupport=false,isFederationCallbackSession=false,associatedConnectionId=0,totalRowCount=0,enableDeferredLobOperation=0,hasStatefulCtxBitmap=4,tmpTableCount=0,transactionIsolationLevel=1

[49236]{224061}[35/-1] 2015-11-03 19:14:26.872713 e PlanViz          PlanVizAction.cc(00047) : Stack trace:

482919[thr=49236]: SqlExecutor at

1: 0x00007fc319789052 in Execution::ContextFunctions::dumpInfo(Execution::Context&, ltt::basic_ostream<char, ltt::char_traits<char> >&, bool, bool, bool, bool, bool)+0x390 at ContextFunctions.cpp:657 (libhdbbasis.so)

2: 0x00007fc30de681aa in ptime::PlanVizActionParam::init(ptime::Env const&)+0x506 at PlanVizAction.cc:48 (libhdbrskernel.so)

3: 0x00007fc30de10ce2 in ptime::BuiltinProcedure_PLANVIZ_ACTION::execute(ptime::Env&) const+0x190 at PlanVizAction.h:14 (libhdbrskernel.so)

4: 0x00007fc30d3ce4f6 in ptime::Proc_call::execute(ptime::Env&) const+0x3a2 at qe_proc_call.cc:268 (libhdbrskernel.so)

5: 0x00007fc30d3cf06c in ptime::Proc_call::operator()(ptime::Env&) const+0x728 at qe_proc_call.cc:141 (libhdbrskernel.so)

6: 0x00007fc30dcb82ae in ptime::Query::_execute(ptime::Transaction&, char const*, ptime::Query::Plan*, ptime::Query::param_t*, ptime::Query::result_t*, bool)+0x5fa at query.cc:5249 (libhdbrskernel.so)

7: 0x00007fc30dcbe9db in ptime::Query::execute(ptime::Transaction&, char const*, ptime::Query::param_t*, ptime::Query::Plan*, ptime::Query::result_t*, ptime::Statement*, bool)+0x647 at query.cc:701 (libhdbrskernel.so)

8: 0x00007fc30c9e0b79 in ptime::Statement::execute_(Execution::Context&, bool, bool, bool, bool)+0x355 at Statement.cc:2054 (libhdbrskernel.so)

9: 0x00007fc30ca0a03c in ptime::CallableStatement::execute(Execution::Context&, bool, bool, bool, bool, ptime::Statement::BatchProcessingState, bool, bool, bool)+0x588 at CallableStatement.cc:503 (libhdbrskernel.so)

10: 0x00007fc3146f2c8f in ptime::Session::executeQuery(Execution::Context&, ptime::Action&)+0xdb at sm_session.cc:1357 (libhdbsqlsession.so)

11: 0x00007fc3146e7ff0 in ptime::SessionHandler::handleEvent(Execution::Context&, ptime::AppEvent*)+0x4f0 at sm_handler.cc:846 (libhdbsqlsession.so)

12: 0x00007fc3146e9401 in ptime::SessionHandler::receiveMessage(Execution::Context&, ptime::CommEvent*)+0x960 at sm_handler.cc:647 (libhdbsqlsession.so)

13: 0x00007fc31470807c in ptime::TcpReceiver::doWork(Execution::Context&, ptime::CommMgr*)+0xd78 at tcp_receiver.cc:505 (libhdbsqlsession.so)

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Hi,

1. You need to have the role AFLPM_CREATOR_ERASER_EXECUTE

2. Your signature table should be of below structure

CREATE COLUMN TABLE PAL_AD_SIGNATURE( "ID" INT, "TYPENAME" VARCHAR(100), "DIRECTION" VARCHAR(100) );

Please check if any of the above is missing. If still exists, reply with the sequence of SQL statements you tried.

Thanks,

Sathish

0 Kudos

Thanks

Philip Muggelstone put me on track by telling me not to use the code snippets before PAL 84.

And refered me to the latest SP10 PDF to get the sample code from

http://help.sap.com/hana/sap_hana_predictive_analysis_library_pal_en.pdf