0 votes

Hello,

In my python receipt, I would like to write in my PostreSQL database (with PostGis extension) data with a geometry type. Therefore, I declared a schema and created my table with this specific schema 

 

schema = [{"name": 'id', "type": 'int'}, {"name": 'value', "type": 'string'}, {"name": 'the_geom', "type": 'geometry'}]

test_schema = dataiku.Dataset("test_schema")
test_schema.write_schema(schema, dropAndCreate=True)

with test_schema.get_writer() as writer:
    writer.write_dataframe(df_test)

However there's no way "Dataiku" recognizes any geometry type I tried. Is it possible to have the list of types that Dataiku can handle?

asked by

1 Answer

0 votes
Hi,

At the moment, it's unfortunately not possible to directly write Postgis types directly from Python. What we would recommend is to write the WKT as a string column, and then use a SQL Script recipe to copy it into a geometry column.

Adding real support for Postgis is on our roadmap, but we do not yet have an ETA for this.
answered by
Ok, thank you for your anwser
972 questions
1,000 answers
1,047 comments
2,391 users

©Dataiku 2012-2018 - Privacy Policy