Skip to Content
0

problem accessing synonym in flowgraph or calculationview

Feb 20 at 12:48 PM

93

avatar image

in the Webide in HANA2 Express i have created a synonym to a table in the "normal" database. it is accessed via a user created service as detailed in the manual (though with added information to database which is still missing there)

i can access the content of the table in the Database Explorer using the synonym in database explorer (accessing the XSA_DEV-<longid>-hdi_db container). i can also do a "select * from "<synonym"

when i try to create a flowgraph to get the contents of the table into a table in my app created by CDS (doing some ETL on the side) i can choose the synonym (explicitly choosing to only find synonyms in this dialog) and everything seems to work - all columns detected and such. when i revisit the datasource i can see that it is said to be DATABASE_TABLE instead of SYNONYM. when i try to build the flowgraph i get an error stating that the datasource is missing it's first defined column.

when i instead try to create a calculationview i can again use this synonym as datasource for the projection as usual, all columns detected, everything without error message. but also here build fails though with the less obvious error message

HDI: 8201003 Database error 2048: : column store error: fail to create scenario: [34012] Internal error during pre-instantiation;Structured Details: <?xml version="1.0" encoding="utf-8"?><createCalculationScenario version="1"><status><message>Internal error during pre-instantiation</message><errorCode>34012</errorCode></status></createCalculationScenario>

what can be done to debug this?

10 |10000 characters needed characters left characters exceeded

even more strange:

i have to synonym files in different Folders but both actually referencing tables in the same Schema. same Cups Service. same grantor file, same roles giving Access.. all the same.

i can use the other ones fine, only the one i used first still is not working. meanwhile had obviously deleted the flowgraph and the calculationview and tried a new calculationview.. it still doesn't work. the other synonyms work well, but with this one i get

Error: com.sap.hana.di.calculationview: Mapped source attribute <firstcolumn> is missing in node <synonym>Invalid datatype, length or/and scale are missing: type=0, intDigits=0, fractDigits=0Attribute <firstColumn> is missing in node <Synonym> (node: finalNode, status: Inconsistent calculatoin model, code: 34011) [8252017]

0

just to make sure the problem is not in the synonym file or such i added a synonym to the table in the working synonym file - still nothing changed. every other table works, this one doesn't. (and btw: the object privileges for the roles used are for the whole scheme, not single tables, so no chance that different privileges are the problem)

0

getting closer to an answer. In case someone comes across this with a similar problem:

i realized that when even though i do see that first column when doing a SELECT *, i can not directly do a SELECT <firstcolumname>. that made the suspicion grow that there might be a special character hidden in the column name that is not shown even when looking at the results of SELECT * in database explorer.

Interesting enough, it can be shown in the indexserver_<hostname>.39003.unloads.000.trc - when looking at the tracefile in database explorer the special character even gets a red background.

0
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Mike Beck Feb 28 at 02:38 PM
-1

hmm.

as so often is the case the problem sat in front of the computer. by working with the ddl statement i used in classic to create the table i somehow got a new line in the column name as in:

CREATE COLUMN TABLE "TESTLEVELOFUSERSTUPIDITY" (
" 
MANDT" TINYINT CS_INT, "TPLNR" NVARCHAR(50),
"MLANG" NVARCHAR(1),
"TPLKZ" NVARCHAR(5),
"FLTYP" NVARCHAR(1)
);
SELECT * FROM "TESTLEVELOFUSERSTUPIDITY";
SELECT "MANDT" FROM "TESTLEVELOFUSERSTUPIDITY";
Share
10 |10000 characters needed characters left characters exceeded