PostgresSQL - ST_GeomFromGeoJSON

Five Stars

PostgresSQL - ST_GeomFromGeoJSON

HI, 

 

I have a simple insert into statement i'm trying to execute using PostgresSQL. In other tools the statement works as expected, however when using the PostgresRow component it flags an error 'delete token on error'


INSERT INTO xx.xxx (geom, grid, verificationstatus, submitter)
VALUES ((ST_SetSRID(ST_GeomFromGeoJSON('{"type":"LineString","coordinates":[[-4.5346101,50.8679411],[-4.5327421,50.8675484],[-4.5316245,50.8672181],[-4.5310114,50.8670082]]}'), 4326)),
77222, 1, 'TapTest2')

 

we need to overcome this as soon as possible. 

 

Thans

Moderator

Re: PostgresSQL - ST_GeomFromGeoJSON

Hello,

For compilation problems, Syntax error on tokens, delete these tokens, does the java code show error?

To find which one , open your job and looks at the code ; on the right border you sould have a "red pointer" , click on it and you got the mistake. Propably a String parameters in a field without quote.

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Employee

Re: PostgresSQL - ST_GeomFromGeoJSON

Hi,

 

    In your SQL, you are having double quotes and due to this reason, the Talend component may not be able to identify the right SQL. Could you please add escape characters to the double quotes used within your SQL?

image.png

This will make sure that the SQL statement is closed correctly.

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Have you checked out Talend’s 2019 Summer release yet?

Find out about Talend's 2019 Summer release

Blog

Talend Summer 2019 – What’s New?

Talend continues to revolutionize how businesses leverage speed and manage scale

Watch Now

6 Ways to Start Utilizing Machine Learning with Amazon We Services and Talend

Look at6 ways to start utilizing Machine Learning with Amazon We Services and Talend

Blog