-
1. Re: wkt geometry in cvs file
shawkins Mar 19, 2018 11:14 AM (in response to michelespinella)Does your texttable indicate that there is a header line? It looks like the header is being processed as data.
-
2. Re: wkt geometry in cvs file
michelespinella Mar 19, 2018 6:06 PM (in response to shawkins)I have deleted the header, but I get the same error. Using the WKT format is correct or I have to use a binary format such as WKB? The geometry format in teiid is based on Base64Binary.
Thank you in advance
-
3. Re: wkt geometry in cvs file
shawkins Mar 19, 2018 7:01 PM (in response to michelespinella)Please show the texttable sql that you are using.
-
4. Re: wkt geometry in cvs file
michelespinella Mar 20, 2018 3:39 AM (in response to shawkins)Here the texttable
SELECT
A.WKT, A.X, A.Y, A.gml_id
FROM
(EXEC CsvSourceModel.getTextFiles('civicilecceogc.csv')) AS f, TEXTTABLE(f.file COLUMNS WKT geometry, X string, Y string, gml_id string DELIMITER ';') AS A
Thank you
Michele
-
5. Re: wkt geometry in cvs file
shawkins Mar 20, 2018 7:45 AM (in response to michelespinella)I should have realized this initially - since there is not built-in string to geometry cast this requires the use of a function:
SELECT
ST_GEOMFROMTEXT(A.WKT), A.X, A.Y, A.gml_id
FROM
(EXEC CsvSourceModel.getTextFiles('civicilecceogc.csv')) AS f, TEXTTABLE(f.file COLUMNS WKT string, X string, Y string, gml_id string DELIMITER ';') AS A
It would be better if the text table logic checked to see if there is a valid cast from string to the given type in column list and produced a better validation warning. Please log an issue to improve that: - JBoss Issue Tracker