Skip to Content

SAP VORA Calculated Column

Hello. I'm using SAP Vora Developer Edition, and i'm trying to use a calculated column in my View.

I have a column "TOTAL_SALES_IN_EUR" and another column called "VALOR". I have a third column (it's the calculated) called "T".

The "T" column should receive the result from "TOTAL_SALES_IN_EUR" * "VALOR". I did what you can see in the image:

"T" column configuration:

Then, when i run the data preview, i get the error:

Any Suggestions??

Thanks a lot.

org.apache.spark.SparkException: Job aborted due to stage failure: Task 0 in stage 1292.0 failed 1 times, most recent failure: Lost task 0.0 in stage 1292.0 (TID 36296, localhost): sap.hanavora.jdbc.VoraException: HL(9): Runtime error. (sql_error:1:193-1:206: error: Type exception, SQLSTATE: 22023, data exception (invalid parameter value) SELECT "__subquery4"."COMPANYNAME", "__subquery4"."CURRENCY", "__subquery4"."TOTAL_SALES_IN_EUR", "ZCURR"."VALOR", CHECK_OVERFLOW(("__subquery4"."TOTAL_SALES_IN_EUR" * CAST("ZCURR"."VALOR" AS DECIMAL(25,2)))) AS "T" FROM (SELECT "__subquery1"."COMPANYNAME", "__subquery1"."CURRENCY", SUM("__subquery1"."GROSSAMOUNT") AS "TOTAL_SALES_IN_EUR" FROM (SELECT "__subquery2"."COMPANYNAME", "__subquery2"."CURRENCY", "__subquery3"."GROSSAMOUNT" FROM (SELECT "BUSINESS_PARTNER_MOD"."CURRENCY", "BUSINESS_PARTNER_MOD"."COMPANYNAME", "BUSINESS_PARTNER_MOD"."PARTNERID" FROM "BUSINESS_PARTNER_MOD") AS "__subquery2" INNER JOIN (SELECT "SO_HEADER_MOD"."GROSSAMOUNT", "SO_HEADER_MOD"."PARTNERID" FROM "SO_HEADER_MOD") AS "__subquery3" ON ("__subquery2"."PARTNERID" = "__subquery3"."PARTNERID")) AS "__subquery1" GROUP BY "__subquery1"."COMPANYNAME", "__subquery1"."CURRENCY" ORDER BY "TOTAL_SALES_IN_EUR" DESC LIMIT 5) AS "__subquery4" INNER JOIN "ZCURR" ON ("__subquery4"."CURRENCY" = "ZCURR"."CURRENCY") LIMIT 1000 ^^^^^^^^^^^^^ ) at sap.hanavora.jdbc.driver.HLMessage.buildException(HLMessage.java:97) at sap.hanavora.jdbc.driver.tcp.TcpDriver.checkErrorsV2(TcpDriver.java:477) at sap.hanavora.jdbc.driver.tcp.TcpDriver.sendMessageCheckAndReciveRespone(TcpDriver.java:507) at sap.hanavora.jdbc.driver.tcp.TcpDriver.execute(TcpDriver.java:186) at sap.hanavora.jdbc.HLStatement.executeHelper(HLStatement.java:37) at sap.hanavora.jdbc.HLStatement.executeQuery(HLStatement.java:22) at sap.hanavora.jdbc.AbstractHLStatement.execute(AbstractHLStatement.java:55) at com.sap.vora.jdbc.HanaVoraJDBCConnection$$anonfun$4.apply(HanaVoraJDBCConnection.scala:353) at com.sap.vora.jdbc.HanaVoraJDBCConnection$$anonfun$4.apply(HanaVoraJDBCConnection.scala:349) at scala.util.Try$.apply(Try.scala:161) at com.sap.vora.jdbc.HanaVoraJDBCConnection.execute(HanaVoraJDBCConnection.scala:349) at com.sap.spark.hanavora.HanaVoraConnector.rowIterator(HanaVoraConnector.scala:168) at com.sap.spark.engines.client.BasicEngineExecutor.rowIterator(EngineExecutor.scala:67) at com.sap.spark.engines.client.EngineClient.query(EngineClient.scala:163) at com.sap.spark.engines.EngineRDD.compute(EngineRDD.scala:34) at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:306) at org.apache.spark.rdd.RDD.iterator(RDD.scala:270) at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:38) at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:306) at org.apache.spark.rdd.RDD.iterator(RDD.scala:270) at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:38) at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:306) at org.apache.spark.rdd.RDD.iterator(RDD.scala:270) at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:66) at org.apache.spark.scheduler.Task.run(Task.scala:89) at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:214) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:812) Driver stacktrace: with error code 0, status ERROR_STATUS
img1.png (13.6 kB)
img2.png (9.8 kB)
img3.png (74.4 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jan 08 at 10:47 PM

    Hi Murillo. Did it run without column "T"? Are all values in VALOR convertibe to a decimal value?

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Christian.. Then, i did some tests.. If i remove "T" column it runs.. If i put in T column the value of TOTAL_SALES_IN_EUR or the value of VALOR column, it runs too.. The problem is when i do the multiplication..

      In this example i put "0" as fixed value in "T" Column.

      img4.png (13.3 kB)
  • Jan 08 at 06:30 PM

    Any Suggestion?

    Add comment
    10|10000 characters needed characters exceeded