on 08-06-2014 10:27 AM
Hi,
We are creating tables in HANA with hdbtable.
We need to add default values for the date fields as current date. However, the regular CURRENT_UTCDATE is not recognized as a system variable to be assigned. This works fine when we create a table manually using the CREATE statement but not in HDBTABLE.
Is there some other variable I can use?
Regards,
Nehal.
Hi Nehal,
did you try with hdbdd as well?
Regards,
Krishna Tangudu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HDBDD is the replacement for HDBTABLE. Both are still supported, but new enhancements will really only come to HDBDD. If you are starting something new, I would really recommend HDBDD. However what you describe - using a calculated column with a formula - isn't yet available for either artifact. It is planned to be added in the future with HDBDD.
No hdbschema and other artifacts stay the same. There is slight syntax change in the hdbti to reference HDBDD object instead of HDBTABLE. You use CDSTABLE in the HDBTI like so:
{
cdstable = "sap.hana.democontent.epmNext.data::EPM.MasterData.Addresses";
file = "sap.hana.democontent.epmNext.data.loads:addresses.csv";
header = false;
} ];
Also in the HDBDD you can create views, so it also really replaces HDBVIEW as well. Long term, we will certainly move more functionality into the HDBDD as well.
Thanks Thomas,
HDB tables(HDBDD/HDBTABLE) do not seem to support the following:
If we need these functionalities, what then is the recommendation on table creation (especially when we want to transport our table structures to production) ? We're considering the simpler way exporting our entire schema (tables created by the CREATE statement) and then importing them in each system.
Regards,
Nehal.
>Partitioning syntax
Correct. Not currently supported. Planned for the future of HDBDD - a general roundout of the missing SQL Syntax. In other words, its not there yet but we absolutely plan to add it in the future to HDBDD.
>Foreign keys (this i guess is possible, not sure how, read something in the dev guide on using River like associations - it will be great if you can confirm)
Yes you can create associations. Those associations can be used within views that are defined within the same HDBDD. No these associations do not generate database constraints. They also are not currently considered by either XSODATA or automatically in XSJS or SQLScript. You would have to code logic at these levels to enforce the associations as constraints. Today they are mostly for simplified view creation. In the near future they will be exposed to XSJS via an SAP supplied library and will be reusable in XSODATA and will therefore be enforced in CUD operations.
The recommendation is still to use the repository and the built in lifecycle. This would mean coding your logic at a higher level until we have the above mentioned functionality. Or you could generate constraints via SQL on first run of an application to avoid having to have manual SQL setup scripts and/or a more complicated lifecycle management approach.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.