Thanks Ted trick worked, need to commit this feature in next spark release.
Thanks Sri Sent from my iPhone > On 26 Jan 2016, at 15:49, Ted Yu <[email protected]> wrote: > > Please take a look at getJDBCType() in: > sql/core/src/main/scala/org/apache/spark/sql/jdbc/PostgresDialect.scala > > You can register dialect for Netezza as shown in > sql/core/src/main/scala/org/apache/spark/sql/jdbc/JdbcDialects.scala > > Cheers > >> On Tue, Jan 26, 2016 at 7:26 AM, [email protected] >> <[email protected]> wrote: >> Hi All, >> >> I am using Spark jdbc df to store data into Netezza , I think spark is >> trying to create table using data type TEXT for string column , netezza >> doesn't support data type text. >> >> how to overwrite spark method to use VARCHAR instead of data type text ? >> >> val >> sourcedfmode=sourcedf.persist(StorageLevel.MEMORY_AND_DISK).write.mode("overwrite") >> sourcedfmode.jdbc(TargetDBinfo.url,TargetDBinfo.table,targetprops) >> >> Thanks >> >> >> >> -- >> View this message in context: >> http://apache-spark-user-list.1001560.n3.nabble.com/org-netezza-error-NzSQLException-ERROR-Invalid-datatype-TEXT-tp26072.html >> Sent from the Apache Spark User List mailing list archive at Nabble.com. >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >
