Forward slash (/) character in SAP Vora table columns

2k views Asked by At

I've got data from a SAP BW InfoProvider written to HDFS. Now I'm trying to make that data available for reporting in Vora 1.3.

I'm trying to run a statement in Vora Tools SQL console, starting with:

CREATE TABLE F002_5_F (calyear string, 
    calmonth string, 
    /bic/zfiscweek string, 
    doc_currcy string,
    co_area string, 
    /bic/zbillamt decimal(17,2),
    ......)
USING com.sap.spark.vora
OPTIONS (.....

And upon execution Vora reports a syntax error in lines for fields with names containing "/bic/" part. As a workaround, I tried quoting field names, e.g. "/bic/zfiscweek". But then Vora reported a syntax error in the line "USING com.sap.spark.vora".

Any comment on how field names with "/" character should be treated in Vora modelling?

2

There are 2 answers

1
reinholdk On

Quoted column names are not supported. You have to replace the slash "/" with another character so that the column name becomes a valid SQL identifier.

0
Frank Legler On

Try surrounding the column names with backticks.

CREATE TABLE SLASHTABLE (`/A1` double, `/A2` int, `/A3` string) 
USING com.sap.spark.vora 
OPTIONS (files "/user/vora/test.csv");

This also works in SELECT queries:

SELECT `/A1` from SLASHTABLE;