on 01-12-2016 4:34 PM
Hi All,
I have created my tables using HANA developer perspective using *.hdbtable files
Now I want to add spatial fields to this table by editing this definition file
Any help is appreciated
Thanks
I want to add a field
CORD of type ST_POINT to this table
Current Definition :
table.schemaName = "LOC";
table.tableType = COLUMNSTORE;
table.columns = [
{name = "ZIPID"; sqlType = INTEGER; nullable = false;},
{name = "ZIPCODE"; sqlType = NVARCHAR; nullable = false; length = 5; },
{name = "ZIPCODETYPE"; sqlType = NVARCHAR; nullable = true; length = 10; },
{name = "CITY"; sqlType = NVARCHAR; nullable = true; length = 100; },
{name = "STATE"; sqlType = NVARCHAR; nullable = true; length = 2; },
{name = "LOCATIONTYPE"; sqlType = NVARCHAR; nullable = true; length = 20; },
{name = "LAT"; sqlType = DECIMAL; nullable = true; precision = 10; scale = 6;},
{name = "LONG"; sqlType = DECIMAL; nullable = true; precision = 10; scale = 6;},
{name = "XAXIS"; sqlType = DECIMAL; nullable = true; precision = 5; scale = 2;},
{name = "YAXIS"; sqlType = DECIMAL; nullable = true; precision = 5; scale = 2;},
{name = "ZAXIS"; sqlType = DECIMAL; nullable = true; precision = 5; scale = 2;},
{name = "REGION"; sqlType = NVARCHAR; nullable = true; length = 2; },
{name = "COUNTRY"; sqlType = NVARCHAR; nullable = true; length = 2; },
{name = "LOCATIONTEXT"; sqlType = NVARCHAR; nullable = true; length = 100; },
{name = "LOCATION"; sqlType = NVARCHAR; nullable = true; length = 100; },
{name = "DECOMMISIONEDFLAG"; sqlType = NVARCHAR; nullable = true; length = 5; }
];
table.primaryKey.pkcolumns = ["ZIPID"];
Hi All,
I have same issue I am not able to use blob sql datatype in Hana Studio.
kindly provide the help.
Regards,
Pragnesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Meyyappan,
HDBTABLE format won't support spatial data types. You have to use CDS for that which is the going-forward framework for building the persistence layer in HANA (tables, views, etc). SAP will still keep hdbtable around only for backward compatibility but it won't receive any further developments or features.
So, for tables that contains spatial data you'll have to define the table like this:
namespace myspace.dev.data;
@Schema: 'MySchema'
@Catalog.tableType:#COLUMN
@nokey
entity MYGEOMETRY{
ID : String(10);
SHAPE : hana.ST_GEOMETRY(4326);
};
Note: 4326 is the SRID() which by default is 0.
Hope this still helps you.
Cheers.
Christian.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Meyyappan,
According to Table Configuration Syntax - SAP HANA Developer Guide for SAP HANA Studio - SAP Library - the sql data types available with .hdbtable syntax are:
enum SqlDataType {
DATE; TIME; TIMESTAMP; SECONDDATE; INTEGER; TINYINT;
SMALLINT; BIGINT; REAL; DOUBLE; FLOAT; SMALLDECIMAL;
DECIMAL; VARCHAR; NVARCHAR; CHAR; NCHAR;CLOB; NCLOB;
ALPHANUM; TEXT; SHORTTEXT; BLOB; VARBINARY;
};
So probably spatial columns are not available yet.
I'm in the same problem - so if you find a solution I'll be glad to hear about it.
Yaron Inghel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.