2024 Aug 15 2:04 AM - edited 2024 Aug 15 2:05 AM
Hi
I have a Virtual Tables connection from one hana data base to another. I am getting the error ST_POINT or ST_GEOMETRY is not supported when I use the the create virtual table statement. Are these types supported in Virtual Tables ? If not what is the work around . I am trying to migrate some data form one hana database to another using virtual tables.
Thanks
ok create a view in source system to convert the GEO to text.
create or replace view MYSCHEMA.MYVIEW as ( select
GEOFIELD.ST_AsText() as GEOFIELDTEXT
from "MYSCHEMA.TABLE_WITH_GEO" ) ;
in target system create VT to connect to view
Once the VT is created
Then select GEOFIELDTEXT.ST_GeomFromText() as GEOFIELD from VT
The Geo types have been converted back.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There are a number of functions which might be of use.
select ll.ST_AsText() as back2text , ll, toText from (
select ST_GeomFromText( totext ) as ll , toText from (
SELECT NEW ST_Point( 1.0, 2.0 ).ST_AsText() as toText FROM dummy));
Not sure of whether accuracy is maintained during the conversion.
So in the source system maybe set up a view (or table ) of the transformed data to text and then connect a VT to this view and then convert back to GEO.
I'll give it a go - answering my own question yet again.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hej, Virtual Tables do support spatial datatypes, but you can not create a virtual table AND the remote table with a spatial datatype in one statement.
This works if the reomte table contains a spatial datatype:
CREATE VIRTUAL TABLE "schema"."virtual table" AT "remotesys"."<NULL>"."schema"."remote table";
This fails:
CREATE VIRTUAL TABLE "schema"."virtual table" ("ID" BIGINT, "GEO" ST_GEOMETRY(4326))
AT "remotesys"."<NULL>"."schema"."remote table" WITH REMOTE;
So, I guess you need "revrese" your data migration - connecting from the target system to your (remote) source system. The source systems contains the geo data. In the target system, you create a virtual table and select from it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
67 | |
8 | |
8 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.