How to write into PostgreSQL hstore using Spark Dataset

后端 未结 2 926
予麋鹿
予麋鹿 2021-01-18 11:23

I\'m trying to write a Spark Dataset into an existent postgresql table (can\'t change the table metadata like column types). One of the columns of this table is of type HSto

2条回答
  •  甜味超标
    2021-01-18 12:19

    It turns out I have just to let postgres try to guess the appropriate type of my column. By setting stringtype to unspecified in the connection string as described in the official documentation.

    props.put("stringtype", "unspecified")
    

    Now it works perfectly !!

提交回复
热议问题