Quantcast
Channel: SCN: Message List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 9165

Re: Import CSV with WKB

$
0
0

hi Jay,

 

using two tables works for me assuming that the first transition table has the data stored as varchar. have a look at the following script which worked for me...temptest2 would be the transition table where you've got all of your data including a varchar column to store your wkb, at least in varchar format for now. test2 is the destination table and the select * from temptest2 into test2 seems to work okay at least in this simple test.

 

CREATE COLUMN TABLE "GEO"."TEMPTEST2" (

"ROW_ID" INTEGER CS_INT,

XY_BIN VARCHAR(1000),

PRIMARY KEY ("ROW_ID")

);

 

CREATE COLUMN TABLE "GEO"."TEST2" (

"ROW_ID" INTEGER CS_INT,

XY_POINT ST_POINT,

PRIMARY KEY ("ROW_ID")

);

 

INSERT INTO "GEO"."TEMPTEST2" VALUES(1, '010100000000000000000024400000000000003440');

 

INSERT INTO GEO.TEST2 (SELECT * FROM GEO.TEMPTEST2);

 

SELECT *, XY_POINT.ST_AsWKT() FROM GEO.TEST2;



i tried to using an import via a control file but have had no success when trying to import wkb. there are no errors in the studio but 0 rows are affected.


i hope this helps,

jamie


Viewing all articles
Browse latest Browse all 9165

Trending Articles