SAP-samples / hana-developer-cli-tool-example

Learn how to build a developer-centric SAP HANA command line tool, particularly designed to be used when performing SAP HANA development in non-SAP tooling (for example from VS Code).
Apache License 2.0
90 stars 24 forks source link

massConvert to hdbtable #98

Closed karthicktsb closed 1 year ago

karthicktsb commented 1 year ago

Hi Thomas,

I am trying to convert all my hdbdd files to hdbtable files. while converting hdbdd having entity as shown below.

entity ARTICLE {
    ID_DATASET: Integer not null default 1;
    ID_PARAM: Integer not null;
    INCLUDED: hana.TINYINT not null default 1;
    PLAN: TYPE.ARTICLE;
    BLOCKED: hana.TINYINT not null default 0;
};

upon converting to cds it works and returns as below

@cds.persistence.exists Entity HFP_PMT_TABLE_IO_PLAN_ARTICLE { ID_DATASET: Integer default "1" not null @title: 'ID_DATASET' ; ID_PARAM: Integer not null @title: 'ID_PARAM' ; INCLUDED: UInt8 default "1" not null @title: 'INCLUDED' ; PLAN_MO: String(4) @title: 'PLAN_MO' ; PLAN_MATERIALNR: String(18) @title: 'PLAN_MATERIALNR' ; PLAN_DGRP: String(10) @title: 'PLAN_DGRP' ; PLAN_STATUS: String(2) @title: 'PLAN_STATUS' ; PLAN_IPCCODE: String(18) @title: 'PLAN_IPCCODE' ; BLOCKED: UInt8 default "0" not null @title: 'BLOCKED' ; }

But while converting to -o hdbtable failed with below error CDS compilation failed

.cds:2:30-33: Error: Deprecated delimited identifier syntax, use ‘![1]’ - strings are delimited by single quotes .cds:4:26-29: Error: Deprecated delimited identifier syntax, use ‘![1]’ - strings are delimited by single quotes .cds:10:25-28: Error: Deprecated delimited identifier syntax, use ‘![0]’ - strings are delimited by single quotes I believe even in CDS "1" should not contain quotes. Can you please check from your side? Regards, Karthick
jung-thomas commented 1 year ago

I've corrected the DEFAULT delimited identifier and will push it to npm shortly as a new version 3.202302.3