Skip to Content
avatar image
Former Member

Identity column in hdbtable file

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...

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

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

    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);

    };

    Add comment
    10|10000 characters needed characters exceeded

  • May 23, 2017 at 05:37 PM
    -1

    You can remove identity from the definition and try to check

    Regards,
    Krishna Tangudu

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 26, 2017 at 12:29 PM

    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

    Add comment
    10|10000 characters needed characters exceeded