Skip to Content
0

Identity column in hdbtable file

Apr 26, 2017 at 11:15 AM

496

avatar image
Former Member

Hello,

we are currently migrating our test tables from a schema to a transportable hdbtable-file.

Now we have the problem that we do not find a way to create identity columns. What is the syntax in hdbtable files? Or is there a better way to create tables in a transportable fashion? I mean the normal tables support the identity feature, there must be a way to specify them in the hdbtable files, everything else would be totaly stupid...

SQL
10 |10000 characters needed characters left characters exceeded

Is there any updates on this? I am also facing with the issue "unexpected token "genereated"

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

3 Answers

avatar image
Former Member May 23, 2017 at 09:19 AM
1

Good Morning,

I am trying to create the table with a CDS file, but the generated always as identity throws an error. I tried copying the Syntax from the reference but it still throws the error that it is an unexpected token.

Description Resource Path Location Type
[1310001] Syntax error: unexpected token "generated" at line 20, column 20 .xxx Row 20, Column 20 SAP HANA Activation Problem

namespace "xxx"."Catalog"."UP"."TABLES";

@Schema: 'xxx'

context T_UP_CUST_MD2 {

@Catalog.tableType:#COLUMN

entity T_UP_CUST_MD2 {

"0CUSTOMER_KEY": String(10 )not null;

"CO_BZL_KEY" : String(8);

"CO_AM_KEY" : String(8);

"CO_KAM_KEY" : String(8);

"SALES_OFF" : String(4);

autoId : Integer generated always as identity ( start with 10incrementby2);

};

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Please can you share what HANA revision you are using.

0
Krishna Tangudu May 23, 2017 at 05:37 PM
-1

You can remove identity from the definition and try to check

Regards,
Krishna Tangudu

Share
10 |10000 characters needed characters left characters exceeded
Florian Pfeffer
Apr 26, 2017 at 12:29 PM
0

The hdbtable configuration syntax does not support the creation of identity columns.

hdbtable objects are already some kind of outdated. The future belongs to Core Data Services (hdbdd files in XSC, hdbcds in XSA). Core Data Service entities supports the creation of identity columns (please check the CDS Reference).

Regards,
Florian

Share
10 |10000 characters needed characters left characters exceeded